SpaceInvaders Video Game Using Mega32


Our final project is the classic Atari version of spaceinvaders 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.
SpaceInvaders Video Game Using Mega32
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

For more detail: SpaceInvaders Video Game

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top