So far I've got the (placeholder) title screen and all the options and play-game menus working. You can set the resolution to one of three options (if supported) and my Direct3D wrapper takes care of all the scaling, so the program can act as though the resolution is 1024x768 and everything works fine at 640x480 and 800x600.
Playing the game results in the map being loaded and you can scroll round it with the arrow keys. Music and sound effects are also working and you can switch the sound off.
Good to get stuff like this working before you get stuck into the game, I reckon.
Like the later incarnations last time, the main game screen currently consists of a scrolling sky, a distant and faded landscape and the actual foreground map that you interact with. The three layers scroll at different speeds, making a nice parallax effect.
I'm trying to avoid a multi-layer map for the foreground map this time as it made levels a nightmare to design last time. I was thinking it through and the only reason I actually needed a multi-layer map was so I could have map cells that were drawn in front of the free items.
This seems quite wasteful as well as complicating the level design process. There are three more healthy options:
1) Any map cells that should be drawn in front of the player are taken out of the map and placed in the level as free objects. Even this is probably more efficient than looping through a map buffer consisting mainly of zeros just to draw a handful of water tiles.
2) Iterate through the same map twice during the render loop and mark certain tiles to be drawn on the second iteration rather than the first.
3) Try to get z-buffering working and use that. Don't like this option as previous tests seem to show that this drastically slows down the frame rate.
Really, option 2 is the most viable. Option 3 is unpopular for the reasons specified. Option 1 is okay, but means that I can't have a water block over the top of a rock block, which looked quite cool on the last incarnation of the game.
So I guess I've talked myself into option 2 then. Nice things about free items is that I can give them a Z value (automatically specified in the level editor based on the item type) which is used to do an insertion sort into the items list when they are loaded from the file, so I don't have to worry about the order I place free items in the level editor. Worked pretty well last time.
I just need to keep focused on making the levels as easy to design as possible this time since that is where I fell over last time.