NES Battle City destroyable walls
Hello unity community so I can't wrap my head around how to do this https://gyazo.com/ed6020bfd1211c471e31e8c4048105b5 An explenation on how this works or how to code something like this would be deeply appreciated.
These are just small tiles, like 8x8 or 4x4 pixels, that are "destroyed". In Unity, you would actually recreate the mesh of the wall tiles so the destroyed parts are no longer part of it.
Alright, so one block is made out of 4x4 pixels, how do I make that if the tank shoots from the middle of the block , then a whole row of pixels is destroyed or if it shoots from the side the only half of the row is destroyed how do I achieve that?
For example, by grouping the small tiles into 2x2 tile "macro tiles" and then checking where the proejctile hit in relation to the macro tile's position.