I am making a Terraria-style sidescrolling game with an open world. I am using a TiledMap to render all of the tiles. If I want to remove a tile, like if it is broken, how would I stop it from being rendered?
first we make an instance of map layer that contain the tile that we want to remove
TiledMap map=new TiledMap();
//lets say we want to remove some tile from layer with index of 0
//so if we need to remove the tile in layer at position 0,1
I'm not to familial with TiledMaps but when I create a proceduraly generated 2d game I use a boolean array and in my render method check if the boolean at the index is true if it is draw the tile if not don't draw the tile. But after reading the javadoc I see that a method removeTileSet(int index) so possibly when you break something get the index and try to removeTileSet(x);