[SOLVED] Help - My player dies from falling on top of a solid tile

cargo

spam bots yandex
As the title says, my platformula project is doing something weird. I got a player 1 tile wide by 2 tiles high. All the player object's details are set as per the youtube tutorial of this module. I got health, animations, speed values, "player" and "persistent" ticked, bounding box minus 1 pixel off the bottom edge of the sprite area, the whole works just as Joe suggested. If I place the placer exactly two tiles above my solid tile the game operates correctly. However if I place the player any higher it dies as soon as it touches the ground.

I have no idea how to fix this or if I did something wrong. I haven't messed with any underlying code. Only used NESMaker's user interface. I have deleted the screen, rebuilt it, deleted the tiles and re-created them. I tried creating a screen in another map coordinate. Nothing makes a difference. If anybody has any suggestions I would sure appreciate it.

NESMaker-Player-dies-from-falling-on-a-solid-tile-1.gif
 

MistSonata

Moderator
I thought so.

What's happening is that the bottom of your "playable area" is set to the same height as your solid tiles, meaning that when your character is moving downward the physics engine will check to see if you've reached the bottom edge of the "playable area" and if you have it will kill the player.

The reason it doesn't happen when you place the character directly on the ground is probably because it's not moving (either that or something else spooky is going on). I'm willing to bet that if you put in jumping code that your character will die either the moment they launch off the ground or when the character lands again.

I recommend you extend your playable area box to the bottom of the screen. Otherwise the only game you'll be making is "The Floor is Lava". Hope that works!
 

cargo

spam bots yandex
You are correct. That fixed it! Nothing like a pair of fresh eyes to spot the details. I am guessing there is a routine somewhere that is testing for solids a few pixels below the player that may be going off bounds the playable area values. I learned something today. Thanks again MistSonata.
 
Top Bottom