Just a simple code sample.
Added acceleration and jumping.
Interesting. It should be possible to dedicate one color of the 16 to represent the edge that the game looks for to ensure the player is above the tiles beneath.
Years back when I made a platformer, I actually created an array map size of every vertical pixel of where the player should be ahead of time so no reading of pixels for the surface was needed afterwards.
This might be the best route to go unless you plan on pixel-removing bits and pieces of the terrain later.
Log in to post a comment