1
Axe / How should I store levels?
« on: February 03, 2011, 12:40:02 am »
Okay. In my game, I currently store levels in 1024 bytes of data, making a 32x32 level. I store it like this:
[0101010101010101010101010101010101010101010101010101010101010101]
[0101010101010101010101010101010101010101010101010101010101010101]
...
[0101010101010101010101010101010101010101010101010101010101010101]->GDB0
The problem with this is that some tiles are destructable and it modifies GDB0's data directly. How can I have GDB0 reload from what I set it to when I launch the game again or when the player dies? Currently, the destroyed tiles stay destroyed, unfortunately.
[0101010101010101010101010101010101010101010101010101010101010101]
[0101010101010101010101010101010101010101010101010101010101010101]
...
[0101010101010101010101010101010101010101010101010101010101010101]->GDB0
The problem with this is that some tiles are destructable and it modifies GDB0's data directly. How can I have GDB0 reload from what I set it to when I launch the game again or when the player dies? Currently, the destroyed tiles stay destroyed, unfortunately.