|Top Previous Next|
2D Movement Code
This month's contribution comes from Superku, a great programmer who uses a good part of his free time to create useful contributions for our community. This time he has put together a 2D side-scroller movement snippet that will make all of you, Mario freaks, smile (wait! I'm one of these freaks!). Basically, Superku has created a player movement snippet which computes the height of all the level blocks and entities below the player, adjusting its z position accordingly (you can set the offset to the ground, of course).
The code supports AABB collision in 2D and works with level blocks, BBOX and POLYGON models. I have included a small demo that showcases this valuable piece of code in action.
Thank you a lot for the great contribution, Superku!