Simple code sample. [EDIT]: I really liked how Astorek86 is doing their slope / ramps code. So I'm changing these over to use that method.
https://www.lexaloffle.com/bbs/?tid=35211
Here is a version with some simply physics:
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.
[Please log in to post a comment]