Removing a tile from tilemap


(Blake Jones) #1

So i’m making a game with removable tiles. Been using ogmo for the tilemap. What’s the best way to go about this?

Should I use action script to edit the xml and redraw the entire tilemap (4000 x 8000 tiles or more?) i’d like the tilemap to also hold the info for the grid so you can collide with each tile. id assume the grid would need to be redrawn each time a tile is removed too but with so many tiles that doesn’t sound like something flash could handle(or could it?)

Would it be better to convert the tilemap to an array so I can easily remove tiles and redraw it from that point?

If there is some magic way to remove a single tile by simply redrawing ONLY that location in the array/tilemap. that would seem to be the best method so I wouldn’t have to redraw the entire tile map constantly.


(Jacob Albano) #2

Are you perhaps looking for clearTile()?


(Blake Jones) #3

thanks so much! that’s good stuff