# Defold : Gravity and collision system in a 2D topdown game

**URL:** <https://forum.defold.com/t/defold-gravity-and-collision-system-in-a-2d-topdown-game/61211>\
**Category:** Questions\
**Created:** [August 25, 2019, 6:00pm UTC](https://forum.defold.com/t/defold-gravity-and-collision-system-in-a-2d-topdown-game/61211 "2019-08-25T18:00:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tgdev001](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/t/a8b319/32.png) [@tgdev001](https://forum.defold.com/u/tgdev001)\
**Post date:** [August 25, 2019, 6:00pm UTC](https://forum.defold.com/t/defold-gravity-and-collision-system-in-a-2d-topdown-game/61211/1 "2019-08-25T18:00:38Z")

</div>

Greetings everyone. Hope you’re doing well.  
I’d like to ask for the Defold Engine. Is there any article where all the required elements and code are available to implement a solid gravity and collision system for a topdown 2D platformer game ?  
The best game today with such system is CrossCode and it’s definitely one of the best references to showcase the features. The main things I’d need are the following :

1. Manage to handle particle collision in such system( ideal to implement bullet physics which can simulate air movement in our context );

2. The techniques, logic and knowledge to handle sprites sorting, jump/fly/fall movement, collision in an environment made of variable platform heights.

3. Solving the collision problem of slopes/stairs oriented in the 8 main directions(north, south, east, west, northeast/northwest, southeast/southwest.

Note : This is not only for me, but for any curious game developer interested in the approaches to implement the system. I even recommend adding, if unexistent, Defold tutorials on this on the main website. It will be so so so HELPFUL, you can’t imagine.

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [August 25, 2019, 8:21pm UTC](https://forum.defold.com/t/defold-gravity-and-collision-system-in-a-2d-topdown-game/61211/2 "2019-08-25T20:21:51Z")

</div>

Hello @tgdev001! There is no ready made articles or tutorials on this subject. I wonder if this exists for another engine? Most of the information should be transferable to Defold without much change.
