[Famicom Party] Chapter 17, "Object Pools"
Hello!
I am pleased to announce the immediate availability of Chapter 17, "Object Pools". I'm about two months late on providing you with this update, which, by the standards of this book as a whole, is pretty good. I thank you again for your patience, and I hope that you find this new chapter useful.
This is a fairly large chapter. I introduce object pools, a way of rationing limited memory in a performance-efficient manner, as an approach to adding enemies to the space shooter game. Along the way, this chapter also covers:
- Moving a lot of code from the NMI handler to the currently useless
main
subroutine, giving you access to another ~27,000 CPU cycles per frame outside of Vblank; - Discussing "array-of-structures" and "structure-of-arrays" approaches to storing data for a set of similar entities, and why the NES strongly prefers structure-of-arrays; and
- A wide range of "homework" exercises to get you thinking about how subtle changes in parameters can have a big impact on how a game feels.
With a bunch of enemies spawning in the game, the ground is set for (sprite) collision detection in the next chapter. I'll be setting up player bullets (with their own pool, of course) and then dealing with two types of collisions: bullet vs. enemy, and enemy vs. player. I am looking forward to using Contra's point versus rectangle approach!
Before getting into collision detection, though, I will be making a set of sweeping changes across the book's existing content. I've had a number of reports that Nintaco no longer works smoothly on newer operating systems, with many people unable to get it to recognize input at all. Additionally, NES Lightbox has started encountering issues of its own, and I don't have time at the moment to track them down. As a result, I will be updating the recommended toolset for the book. The new recommended emulator is Mesen, and the new recommended graphics program is NEXXT. Mesen boasts a ridiculously powerful set of debugging tools and runs well on all platforms, requiring only a .NET SDK install in place of Nintaco's Java install. NEXXT is "NES Screen Tool, but with many more features"; it is sadly Windows-only, but it does run well under WINE on Mac and Linux. (Mac users will most likely need to use the "Crossover" version of WINE to get 32-bit support, which is available in Homebrew.) The updates to existing content don't really require new research or coding, so I hope to have them done relatively quickly (say, late July / early August?).
Thank you again for your interest in the project. Please let me know if you find any errors in the book, or if certain portions of it are particularly confusing to you. I'm always striving to make Famicom Party the best starter guide to NES development, and your feedback helps immensely with that goal.
Until next time,
Kevin