Prez box art

Prez is the second NES (Nintendo Entertainment System) game that I’ve developed, which was for the MiniLD #71 “Retro Challenge”.  You play as Prez and must collect the flags as they fall from the sky.  My first NES game was a very simple space shooter called Space Dude, which I created back in April 2014.  I tried a few new things for this game, such as using multiple palettes and using “random” values to position the flags.

Runs well with FCEUX 2.2.2. I haven’t tried other emulators.

Prez gameplay

Tools used:
NESASM3 – 6502 assembler
YY-CHR – tile creator
Gimp – converting white house image to four color palette

Things I would like to add:
Title screen
Music and sound effects

Prez collecting flags

Latest updates:
– Added a simple two frame animation walking loop
– Added speed variable (just one or zero) which tracks if the player is standing or walking. If standing, the animation loop isn’t played.
– Fixed the background vertical scroll issue (stored #$00 #$00 in $2005, which turns off scrolling)
– Moved the letters “FLAGS” to the background layer, which eliminated the tearing problem with too many sprites on the same horizontal row. I had to keep the score on the sprite layer, because I don’t know how to write over tiles in the background layer (or if it’s even possible)
– Made a seamless background of hedges that I put on both sides of the White House
– Due to the vertical scroll fix, I pushed the remaining tiles down one row. I was surprised that this made the ground in front of the White House look much better, since it moved the ground to the attribute block with the green grass palette.
– When a flag falls below a certain Y coordinate (defined with a constant), it resets to a “random” position at the top of the screen. Previously, the flag would just loop back to the top of the screen after the Y position value rolled back over from #$FF to #$00.

Download the latest version of the NES ROM at NESDev.

View the Prez development video archive.

Programming the Nintendo Entertainment System

Programming the Nintendo Entertainment System

Programming the Nintendo Entertainment System was a 20 minute Lightning Talk that I gave at CodeStock 2014 at the UT Conference Center in Knoxville, Tennessee.  If you missed the live presentation, you can see the run-through presentation that I recorded and posted to YouTube. I go into the details of 6502 assembly and how to create your own game for the classic 8-bit system. Learn how to create sprites and how to move them around on the screen. I/O is explained to obtain input from the controller.