PS2: Latest GDver and TILED maps from TILED 1.10…now 1.10.2
UPDATE: it looks like a collision boxes problem when changing animation resolution…if its a bug or not i don’t know since it only happens on tiledmaps
OK the problem is caused by wrong point or collision detection on TILED MAPS.
to replicate create a square 240px object as player with origin point at bottom middle.
create an animation with a different image size (eg 360 px ) origin always at bottom middle.
OFC fix collision boxes accordingly…The object will fly away, but only on TILED MAP.
It works on gd native platforms.
IT’S A BUG: probably due to wrong points calculations on TILED MAPS.
really hope for a fix
ADDED PROJECT WITH BUG HERE, JUST PRESS Q AND E TO SWAP ANIM GREEN IS GD PLATFORM, WHITE IS TILED MAP, PROJECT FILENAME IS TILED BUG
FIX THIS BUG IS CRUCIAL TO MAKE GAMES WITH COMPLEX ANIMATIONS
Edit: GD works flkawlessly with walls too
While I’m not going to be able to dig into the examples as I cannot confirm the actual backend code, I do want to specifically call out:
What you’re describing here is not a bug (At least not in the manner you’re thinking). Sprite objects that are using behaviors involving collision are generally supposed to have all of their sprite animations be the same dimensions.
Within the same animation they must be the same dimensions, or they get distorted by the render.
Within the same object, but different animation, you want them to be the same dimensions, or else your collision coordinates can break/interact poorly if you’re switching animations. If you have one animation that is 360px, all of your other animations should also be 360 px, even if that means you need to have transparent space around them.
Otherwise your only option is to do exact math to ensure the collision mask coordinates are exactly the same on each animation (not just based on origin), otherwise the collision points can switch position mid-frame and end up inside of another object. This will be come more apparent on Tilemap object with collisions because each tile is its own unique collision box, rather than one large collision box.
that is indeed what i have done with collision boxes and it works on GD platforms(cos why it souldn’t works?). Have you tried the project?
What happen on TILED platforms, should never happen,
Not all game are platforms, imagine doing a game where you just need to scale some figure.
To me that is clearly an unwanted behaviour…aka… bug.
Nope, as I mentioned I’m not going to dig into the project as I wouldn’t be able to fix the underlying code anyway. The information I posted above was purely to provide context around normal sprite object animation behavior.
If your sprite object is set up correctly as you say, then perhaps one of the contributors or company devs can dive deeper and find out if it is indeed something wronf in the engine.
The tilemap collision mask object is specifically designed for the platform behavior, hence why it has ladder/jump thru/platform options. Other usecases aren’t really relevant.
Additionally, the information above is true for any cluster of objects being tested for collision, not just tilemaps. If a single object being tested against them has the collision mask change at all (and therefore coordinates of collision change) mid-frame, then many of the behavior logic will have to recalculate and will not behave as you expect, especially if it is now tou hing a different object than before based on the new coordinates.
Silver that is a bug…
If i want a sprite and collision boxes generated from given origin, engine must ear me and do it…lol.
As you said i’,m gonna wait dev to check this…since in my game (not always, but in some circumstances) is mandatory.
EDIT: it looks like problem don’t happen if you hit tiled wall, but just when you’re on platforms…If it can help
UPDATE:HERE THE UPGRADED VER. EVEN IF YOU DON’T TOUCH COLLISION BOXES SIZE THE SAME PROBLEM HAPPEN.
THE “POSITION” POINT IS THE PROBLEM, IN FACT TILED MAP POSITION POINT IS IMAGE GENERATED, THAZ WHY THE PLAYER IS FLYING TO TILED POSITION POINT… THIS MUST BE CHANGED…IN SOME WAY…“IF EACH FRAME THE OBJECT/(COLLISON) KNOWS WHERE THE PLATFORM IS…IT SHOULD EVER KNOW WHERE THE PLATFORM IS WHEN THE OBJECT IS UPDATED…”
AS IT IS NOW, GD IS NOT COMPATIBLE WITH TILED
UPDATE:
since i really need this to be fixed, i went more in depth.
And i noticed that disabling the platformer behavior (ofc) doesn’t cause the issue.
So it should be an incompatibility between the GD Platformer Behaviour and The Tiled Map.
I’ve upgraded the project debug so there are 2 proijects.
1 with the bug(conflict) visible and the other with the disabled conflict.
I need this to be compatible because i need the air2floor dive (with sprite size expand/transform) and ofc i need air-collisions to be available
Thank you for reporting this issue and providing an example.
The issue should be fixed in the next release:
Thank you a lot everything works fine now
EDIT:problems with Tiled platforms still occours.
I give up on Tiled.
What was issue the issue?
Too many collision masks incompatibilities.
I sent you a video in pm.
I solved all issues with my Tiled collisions masks.
Posting here what i learnt during the process…
Basically while with GD standard platforms you can freely edit every collision and sprite origins points without get weird situations,with Tiled you can’t, or you gonna get bad collisions behaviours.(This,for a complex/heavy animated platformer game.)
The solution to this is to keep your collisions masks and origin points of your sprites generated from middle bottom in every animation. It may sound obvious but trust me it is not.
Still the latest Davy fix was mandatory to make things works …(with compromises).
Thx to everyone who answered and helped in this thread.
marked as solved