New Bug in Platform Code.

BlitzMax Forums/BlitzMax Beginners Area/New Bug in Platform Code.

Why not try setting the new coords for the player when they move in a direction (keeping the old ones stored), then do a test for a tile on on both corners (and maybe the middle of the edge) in the direction they are moving. If a tile is detected, reset the coords. This will work for up/down/left/right etc. Also when falling, if you detect you have fallen "into" a tile, you can't just reset the y coord or you'll never land, you need to set the y coord so the player is perfectly on the tile and then change the player graphic to walking and play a landing sound.


Can you show me some sample code?

Or can you have a look at the code above a provide some code?

Please. :)