For a game I'm making, I want it to be infinitely generated. For this, I need to know how to efficiently remove all map tiles. Is there any way to quickly do this? The only thing I can think of is setting everything to sprite 000, with mset(). I imagine this would be fairly computer intensive, so how would I do this?
memset() sets a range of bytes in the raw memory to a specified value. The map data starts at address 0x1000. 0 is the value to set each tile to. 0x2000 is the length of the map data in hexidecimal.
If you're only using half the map so you can use the full sprite page, use this instead:
memset(0x2000, 0, 0x1000)
For more info, you can look at the memory section of the manual or go to this page on the wiki.
[Please log in to post a comment]