Passable platforms

Any Ideas how to do this?

I don’t understand what you mean - do want to allow a sprite to move through walls?

No. Yes. Well Partially. Only passable from below, but you can’t go down.

Semi solids?
if so I haven’t used tilemaps for a while but I believe you can ‘ghost’?
if the players y < the tiles

1 Like

Yeah, this seems like the best approach to writing something like this – some combination of ghost through walls, on wall hit, and comparing the wall you hit’s position vs the player’s to see if it’s above or below. Possibly could also try something along the lines of disabling wall temporarily when the player goes through from the bottom (set wall off at location when hit from bottom) and reenabling it when the player gets above it?

1 Like

Perhaps you could use something like this.

This is not using a tilemap, so there is no concept of walls. The code keeps checking that the player overlaps a platform.

Due to events between sprites and tiles/walls are handled in the main thread (of the game engine), require some exts (runLater) or ts code


I have noticed a strange bug. If I have the player jump two, it moves off the screen and does not return. Also if I move under the second platform and jump once it moves up off the screen (maybe because the player is still touching a tile at the top?)

1 Like

Here’s the best I could do in blocks:

The code is a little complicated, but I added some comments. Also, doesn’t work great