“Waka waka waka” plays on loop as Pac-Man gobbles up the yellow dots lining the paths on the screen. Watch out though, because Blinky is right on your tail! Pac-Man is the classic arcade game, and after playing it over and over it’s my turn to make it.
For my Video Game Production class, we are working on a project of “Recreating the Classics”. In an earlier post, I talked about making the Legend of Zelda for this project; however, recently I switched over to Pac-Man for constraints on time and tools. For a game that seems so simple, the workings going on in the background are incredibly complex. For instance, Pac-Man must change his sprite, or image, every time he moves in a new direction. in addition to this, he must make sure that the familiar “waka waka” sound is playing while he moves and not while he doesn’t. He can turn, but only when he is in certain locations. Also, his image is larger than that of the pathway so his image will overlap the walls, however he can’t go through the walls. All of these checks and actions and even more have to take place every time that Pac-Man takes a step. It’s a lot to wrap your head around!
In class, we’ve been learning about not only developing games, but also some of the theory that has to go into the game itself. These issues that face Pac-Man manifest in every video game out there, where every sound, action, and image has a trigger. While it seems complicated on the outside, as I’ve worked more and more with Pac-Man, I’ve started to see patterns develop among all the pieces. For example, Pac-Man essentially moves in a grid, having a square for every area of the path. When thinking about moving this way, checking for boundaries and image size issues become simple and all that remains is having the image move smoothly while the location stays locked into the grid. Patterns are one of the foundations of this type of coding. Even though their are four different ghosts, each with their own unique behaviors, they all follow the same pattern: scatter, chase, and run away. Now, my Pac-Man is almost complete, with the foundations for everything already in place. All that is left is putting in the other 3 ghosts and the title screen!