• 2D
  • Looking for alternative to TileMap in topdown

Working with the TileMap in my topdown game has brought me a lot of limitations. I wanted to be able to go behind walls. Using YSort and collisions, I managed to make it possible to be able to walk in front of the wall and behind it, without problems.

My dream was to make the surrounding walls transparent when the player walked behind them. With RayCast2D I made it possible to detect whenever the player is behind or in front of the wall. But I soon realised that I could only hide the WHOLE tileset, not individual tiles.

Also, a feature of the game will be for the player to have control over tiles by placing and destroying them. I haven't experimented with that, so I don't know if the tilesets are good for that. Also, I plan to have random generation of dungeons.

Therefore, I've been wondering if I should only use TileMap for the ground and use something else for walls. Not sure what node would serve best for the purposes of my game, so I ask for your experience regarding this decision.

Without tilesets I would lose features like AutoTile. Also, It made it really easy to place the walls and handle collisions. I am also worried about the performance cost it would probably have, if I used other nodes. In a large map, if every wall is a node, I don't know how I could handle it in many ways.

Is there any other node, besides tilesets, that could work well with walls in a topdown game and with the features that I want it to have?

I installed godot two days ago, so I don't ahve all the answers.

But I found 2 things - didn't investigate much further.

On reddit there is a similar post I think: https://www.reddit.com/r/godot/comments/asd8af/transparency_on_tilemaps/

KoBeWi answer: You could try using light masks. With proper layer settings it should be possible, in worst case with two separate TileMaps. Check this demo: https://godotengine.org/asset-library/asset/115

I also found someone on reddit yesterday who made a topdown game with the 3D camera/world so he can have better details. (Link to a shadow video they made: https://www.reddit.com/r/godot/comments/hv7w1p/the_course_of_the_shadow_and_the_interaction_of/)