![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | captain_mediocre |
I’m new to Godot, and I’m porting/remaking a top-down bomberman-style game with a tile map, and I’m wondering what is the recommended way to manage map data in Godot?
My question is for things that need to align with the tile grid, such as bombs.
I’m wondering whether it’s better to use an array the size of the tilemap (width * height) and store information in there every time a bomb is placed or exploded, or whether in Godot it is better to just place the nodes and just use those directly?
To give an example, when I go to place a bomb, I want to check whether there is already a bomb at that location. Having an array makes this easy - you just look up the array and check whether that index in the array is null or 0 (whatever I choose). And when placing a bomb I would store a reference to the node in the array at that index.
This is how I did it in my previous version of the game but is that the idiomatic way to do this in Godot?