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