My lizard is the Lizard of Giant Frog
Hello! It's been a little while since my last update. I'm still not finished (sorry). Still working through the bosses, but I've made progress. Not far to go, though!
Here's a boss that I finished a few weeks ago. There are a lot of little frogs in the game, and because you can be mean to them (if you're that kind of person) I thought it might be fun to have a very large one take its revenge!
This is an escape scenario, with the frog climbing up from below. It might be chasing you, or it might be trying to get that fly above you, but either way you'll have to avoid getting eaten by it while you climb to the top.
I thought I'd use this boss as an example to explain one of my favourite NES development tools.
Sharpening my knives...
I've mentioned before that making custom tools is part of the process for any large game. Aside from the custom editor I built for the game, it also helps if you can modify and adapt existing tools for your game as well. That's one of the reasons I appreciate open source software. If you need something, you can always add it!
Most of the time when I'm working on Lizard, I'm simply using the tools. It's relatively infrequent that I need to make changes to them, but now and then I'll spend a day sharpening my knives instead of trying to keep cutting with a dull blade.
One of my most important tools is the emulator FCEUX. It's really fantastic for inspecting and debugging NES games. I use it every day, and because it's open source I can add to it, fix bugs, or make other changes that I think will help. I also try to share some of my changes back to its main development branch, so that everybody can use them, not just me. A new version was released about a month ago, and it made me happy to see one of my favourite programs improving.
Aside from the code debugger, which is mostly about programming and probably a bit more technical than I want to describe here, there are two visual tools that I find extremely important: the Name Table Viewer and the PPU Viewer. These are found in FCEUX's debug menu, and I often have them open while working on my game.
The Name Table Viewer shows the background layer. You can read more about this in my update about tile maps, but what this viewer shows is that the NES has a range of memory dedicated to 4 screens of background, which you can scroll around. If you scroll off one edge, it will just wrap to the other side. These pages of background are known as "nametables" in NES development, though I don't know the origin of this term.
The really funny thing about the NES, though, is that as a cost-saving measure it actually only has RAM for 2 screens, not 4. This means that 2 of the screens are actually duplicates of one of the others. If a game scrolls horizontally, it will usually make the bottom 2 duplicate the top 2. If a game scrolls vertically, it will instead make the right 2 duplicate the left 2. This duplication is also known as "mirroring".
Because the NES wasn't really designed to scroll in multiple directions at once, you will often see strange colours at the edge of the screen in games that don't scroll on just a single axis. (I plan to talk more about NES scrolling in a future update; it's a big topic.)
Lizard only scrolls horizontally, so it doesn't really have to deal with the problem. However, you may have noticed the frog boss appears to scroll vertically! This is actually not done by scrolling the background layer. I'll explain this in a moment with the PPU Viewer, but what you can see here is two versions of the frog's head on different background pages. I flip back and forth between the 2 screens I have to animate the frog's head.
The PPU Viewer shows another part of the NES' video memory. Here you can see the two collections of tiles that are used for backgrounds and sprites, as well as the sets of colours that can be used with them, known as palettes. Everything the NES puts on the screen is made of these 8x8 tiles.
Because Lizard is hard-wired for horizontal scrolling, rather than vertical, I took an alternative approach to scrolling. I have made the "scrolling" parts of the background use only 4 tiles placed in vertical strips. When I change one of these source tiles, the change will appear everywhere on the screen where it was being used, so in this way I can simulate the effect of vertical scrolling without actually moving the background. This let me use the bottom middle of the screen for the large head of the frog, which would have been too big to try and do with sprites. Only the frog's hands are sprites, which is why you didn't see them in the Name Table Viewer.
This was just a little overview of two of the most useful debugging tools in FCEUX. Even if you aren't developing an game of your own, you can use them to see how other games deal with the NES graphics hardware. Super Mario Bros. 3 has a peculiar approach to the problem of scrolling in multiple directions (I'll save the explanation for the future update about scrolling), but using the Name Table Viewer may reveal some interesting things to you. In the picture above, you can see that the famous "hidden" door to the whistle in the World 1 fortress is actually plainly visible in the background layer; the only thing the game does to hide it is restricting the camera so that you can't scroll up there and see it!