Collision issues when top down object is pressed against 2 static objects - Pics, Files & Test Game


I seem to be having some issues with collisions not playing nice with each other and ‘randomly’ causing stuttering/pushback when there are two objects next to each and a top down object is pushing against them with collisions enable. (this can even be seen in the bomb the crate example in the “Handling collisions in your game” wiki page.

Bit hard to see as a .gif, but when against 2 objects and when against one, you can see there is no stuttering/pushback.

The image below shows the top down object pushing right against 2 objects (same size, hitbox and zlayer) and against a single object.

I have tried the following whilst still having the effect;

  • Moving the movement logic BEFORE the collision logic.
  • Moving the movement logic AFTER the collision logic.
  • Disabling Camera logic.
  • Changing each objects z layer so they are not the same (example [O1 – ZL1][O2 – ZL2][O3 – ZL3])
  • Enabling and disabling pixel perfect rendering.
  • Changing FPS from 60 to 30.
  • Stopped using object groups.
  • Enabled “Ignore objects that are touching each on their edges but not overlapping”.
  • Used a 0.10 timer for collisions (just made things worse)
  • Stopped using external events and had all logic in a single scene.
  • Moving the game from what you see above to a simple scene that only has 2-3 objects, 1 playable character and logic for movement and collisions to rule out any random events that I may have overlooks.
  • Changed my characters from looking like things to 3 different boxes (32 x 32, 32 x 16 and 16 x 32) making sure everything stayed default (origin, hitbox (square) and Centre)
  • Using Sprite Tiles Vs Sprites.
  • Exported to .exe instead of HTML5.

I have linked two test games below, one with pixel perfect (smoothing disabled) and another using linear(smoothing enable) test game below to show the examples as well as the game’s raw files. If anyone has any answers, solutions, etc that would be great.

(Before you comment arthuro555, I know you prefer game jolt over itch but it was easier to upload there :D)

Hello there,
Nice post quality, and thanks for uploading to web!
I’ll suggest an alternative instead since it seems to be how the “Separate two objects” is coded…
Essentially, make each wall type not act as a wall - act only as decoration, and make a tiled/sprite object that goes invisible at start as the actual wall.
I did something like this for my limbo’d platformer:

In this picture, the pink areas are the “collision” or Platform object that interact with the player which is a PlatformerObject, and the rest of the graphic is a single sprite.
This was neccesary because Tilemap didn’t exist in beta52 (it’s coming soon…!) and my game relied heavily on it.

1 Like

This doesn’t seem like normal behavior.
I reported it on the Github. Thanks for the information, the troubleshooting and the links. :+1:


Hi Cat,

Thank you for taking the time to show me this, unfortunately I can’t use the PlatformerObject behavior as the character is using top down behavior. It would be great if I could as it’s collision detection seems to work well.

I have already tried using a single object as a ‘solid’ mask like you have shown in the picture, it’s a vast improvement to what I have now, but these issues still persisted in where two mask objects would intersect (example a corner).

I have added a new example of this in my Test Game – Linear: GDevelop-Collision-Test-LinearSmooth by Eiklahc (option 6)

Hi Gruk,

Thanks for added the report on github. I didn’t want to report it as a bug in case the bug was my brain not working correctly.

1 Like

Ah, so you are using the Top Down behaviour.
In my top down game I created my own movement system, which uses “separate two objects” event each time the player moves, and just confirmed with your setup it happens even there!

Gruk, thank you for reporting it.

1 Like