Wednesday, September 3, 2008

Subscreen on the subscreen


Here and there over the past few days, I've gotten all the subscreen stuff moved to the DS's bottom screen (often confusingly called the "subscreen"). So the map, enemy database, and inventory screens can show down there while you play. You can pause the game and toggle through them like you used to, or just let them sit there and automatically update themselves. I also added the enemy life indicator that my coworker Jong begged for :)

It was all a lot of housekeeping-type work, very little was interesting enough to share the details of technically. The registers that control the bottom screen are almost exactly like the ones on the top screen (at least for this 2d tile-based stuff...I have no idea about the other modes), so I just had to make new functions to operate on the bottom screen, and make some of my old functions be smart enough to know which screen to operate on.

The only tricky parts were that I now needed to update my subscreens during the main loop instead of only when the game is paused and a key is pressed. Knowing how much of the subscreens to update led to some tighter coupling between different major parts of my code (one of these days I want to eventually do a big rant/essay about when is the right time to engineer fancy solutions to reduce coupling, and when instead those fancy solutions have more overhead than they are worth), but nothing too horrible.

The other annoying part is that I'm now saving room at the top of the bottom screen for status messages that used to appear at the bottom of the main screen. Stuff like "Got meat, health restored" and that sort of nonsense. Which means I'm laying out my subscreens slightly differently. Which for most of the cases, is no big deal, since everything is positioned relatively. The annoying part, though, is the text in the enemy database. Because the enemy portraits vary so much in size and shape, I manually positioned the flavor text for each one to make it look decent. But now in many cases, it looks wrong, or bleeds over the portrait (in the picture shown here, you can see a blank space overlapping the portrait). I either need to cheat, and just use another separate layer (which might make the text hard to see if the colors are similar), or do it right, and manually reposition all the text. Which will be annoying. I'll probably end up doing both, but we'll see ;-)

If I get really inspired, I'll use the touch-sensitive feature of the bottom screen to allow you to toggle between subscreens or inventory items by touching it. But I can't imagine people actually using this very often, so that might fall off the feature list near the end when I start getting impatient.

Well, to finish this up, my friend Rob asked the other day how much left there was to do. My remaining todo list, as best I can estimate:

-dark rooms/lantern
-faded sprites (when you or an enemy gets hit)
-fix enemy db entries
-title screen menu needs a little work
-splash screens/etc
-game over stuff
-sound
-borders on caves are messed up
-save menu
-actually saving game
-shop/healer screens

Sound and the game saving are the only intimidating ones, as those differ pretty significantly from the GBA. The rest are basically busy-work.

No comments:

Robo-Ninja Climb

Well, out of the blue, I decided that I was missing out by not entering something into this year's NesDev competition , so a couple week...