Wednesday, November 13, 2013

Platformer Engine with Editor

      This is a simple Super Mario clone, along with a humble level editor.  You can add and remove bricks from the background using the mouse, and reset the level by clicking the reset button. 



     The bricks are all contained in a single background object.  Mario's physics are designed to function only with square-on-square collisions, so any round or diagonal shapes in the background act a little wonky.  They technically still work, but complex shapes result in weird effects such as running up slopes at higher-than-usual speeds, or the collision detection missing points on the background and overlap occurring.

[Move with WADS, Click to add tile, Space+Click to remove tile]


      If you have any questions about how anything works, feel free to ask.  I know there are a million pre-made platformer engines out there with oh-so-many built in features; for me, the joy of coding is in doing it myself, from the ground up, using whatever strategies I can think of.
    

P.S.
Hold shift for a nifty surprise!

No comments:

Post a Comment