1

I have done some simple game programming before on computers so I've always had my game map stored in memory - this means it's easy to alter. On Neo Geo with less than 64k of RAM, i will probably be reading it from ROM (let's say it's a big map for this example). I wanted to ask what is the best way of altering the map permanently. e.g for destructable blocks or even for example: collectables like the rings in Sonic - when he collects them - they don't come back?

I have thought of a few ideas but they all seem like a fair amount of extra work for the processor. How is this normally done on consoles?

2

You can do it multiple way,
The easiest is to copy everything from rom to ram and alter the map accordingly to the game. For small/medium maps it will be ok.
For big map I'll recommend to only store the diff in the ram, so your game engine will first look in the ram what "block" to draw and if the information isn't here fetch it from the rom.
Peace Unity Love et Having Fun!!!

3

Ah ok, thank you Elbarto I thought that might be the best way. My scrolling routine works by drawing a new column or row of tiles at the edge of the screen when it needs to.

Now for each tile that I want to draw I have to check if it's one that should be replaced with another tile or one that should not be drawn at all. This seems like a lot of extra checks when done for every tile. I'm sure the Neo Geo's CPU can handle it though smile

Thank you.

4

Depending on the number of destructible elements you can store the map in ROM in its destroyed state, then overlay dynamic objects displaying non destroyed state.

5

Thank you HPMAN. Yes that's a very good idea.