SpaceInvaders Video Game Using Mega32

Our final project is the classic Atari version of space invaders on the MEGA32. The story: A horde of space invaders are attempting to land on the planet’s surface. You play a heroic pixilated thing on the ground trying to stop them one bullet at a time. It wasn’t Half Life, but eh… it was the 80s.

The real challenge is implementing the game without television flicker or artifacts. With the MEGA32, we use “hardware interrupts” so that sound can easily be played without interfering with the TV paint interrupt. A simple points system and basic gaming mode functions- such as player “deaths”, invader landings, and subsequent levels- are of course supported.

High Level Design

General Considerations:

How big of a screen do we have to work with (in pixels)?

o We can easily generate a 128 by 100 pixel screen using the MEGA32

• Can we write all of the invaders to the screen in one frame cycle?

o No. It turned out that we needed 10 frames to write all 30 invaders to the screen. We write 3 invaders per frame, plus update bullets, player movements, and barrier changes. Attempting to write more than 3 invaders to the screen every frame (along with player logic etc…) leads to flicker.

• Resolution of one invader?

o We decided the classic Atari invader pixel dimensions were necessary for nostalgia purposes, so the dimensions of the invaders are 10 pixels by 8 pixels.

• Number of invaders per round?

o We decided that a 6 by 5 array of invaders was sufficient at this resolution