The Driving State Machine.
The Driving state machine controls the main game mechanics. It takes input from the reflectance sensor, steering wheel, and missile button, and translates it to the LED display. The driving state machine also controls the three LEDs indicating missile supply, plays the animations, and signals the audio state machine,
The LED State Machine.
The LED state machine updates the LED display when triggered by the Driving state machine.
|
The Gas Meter State Machine.
The Gas Meter state machine controls the servo motor at the front of the GADGET. The servo moves the gas meter dial continuously, indicating time remaining.
|
The DIstance Indicator State Machine.
The Distance Indicator state machine controls the servo at the back of the GADGET. The servo moves the car at the top of the GADGET forward when signaled by the Driving state machine, indicating distance traveled.
|
The Audio State Machine.
The Audio state machine controls the music and sound effects when signaled by the Driving state machine.
SOUND.
Source: Nes: Super Spy Hunter Soundtrack & Youtube
|
The Button Module.
The Button module checks the state of the missile button and posts to the Driving state machine when the button is pushed.
The Display Module.
The Display module contains the helper functions used to initialize the LED display, put a frame or sprite into the display buffer, and update the LED display.
The Frames Module.
The Frames module holds the game map, animation frames, and sprites, and provides helper functions to allow the Driving state machine to access the animation frames and map lines.
The frames and sprites were drawn in Aseprite, converted to binary using dCode, and then stored as an integer array. |