Tilemaps or AnimatableBody2D

Godot Version



I currently have a game where you battle other people using different abilities. You know your classic game. But the problem is some abilities might only work if I use AnimatableBody2D. For example one ability moves a platform away. This would be super difficult for me to code with a tilemap but relatively easy with a AnimatableBody2D. I know tilemaps are easier to use while building the map but I think AnimatableBody2D would be better. What should I do?

Do both! You can create a scene that has the same size as the cells in your tilemap, and add it to your tile set!


Not sure what you mean. I have the individual tiles so I can just use AnimatableBody2d and it works the exact same I just want to see if their are any reasons why I shouldn’t use it

Sorry, if I confused you. I was saying that you could use the AnimatableBody2D to create these platforms and use the tilemap to add them. It’s what I would do.

The only downside to using AnimatableBody2D instead of just tiles is that you couldn’t use terrain or similar to automatically create tiles.

The thing about my game is a pre-built map so I don’t have to worry about that

You actually can use terrains and such, and still instantiate scenes, though in a different way, code heavier way. The game I’ve been working on currently reads the tiles I have placed by my tilemap, and will instantiate scenes that match the tiles I set parameters for, then delete the original tile. So you can use terrains and anything you want to build your map, and then it populates when it runs.

Perhaps, we could call set_cell() method in Tilemap to set the target cell empty after casting some magic?