You Are Here: Home » AVR ATmega Projects » Game - Entertainment Projects » Gray-scale Graphics: Dueling Ships

Gray-scale Graphics: Dueling Ships




A 4-bit gray-scale video system demonstrated by a multiplayer game

Our project displays a 128-by-96-pixel image in 4-bit gray-scale (16 intensities) by using a memory-map compression scheme. The equivalent uncompressed display would require 6-KB of memory (128 � 96 pixels � 4 bits/pixel = 6,144 bytes), but we manage to achieve this in less than 2-KB of memory for a sparse display.

Gray-scale Graphics

The capabilities of the video system are illustrated by a multiplayer video game. The game is a space shooter using basic velocity-based physics, and controlled by Nintendo Entertainment System (NES) controllers. The system is designed to support 4 players, but in its current not-completely-optimized state, it can only handle 3 players.

Originally, we set out to improve upon several past 476 projects: the classic video game, game controller input, and color video. We wanted to take the basic video game project, apply multiple controller input for multiplayer action, and run it through a more sophisticated color display that offered higher pixel and color resolution using the ATmega32.

We were on track to implement color video, but unfortunately, we were unable to obtain the proper part to connect the NTSC converter due to some confusion with Web site specification sheets. Our original plan was to start with 4 bits per pixel (1 bit per color channel, and 1 bit to set a 50/100-percent multiplier), so moving to a 4-bit gray-scale did not significantly change the software side of the project.

at we have is a system that can display 16 intensities and approximate an image created from a regular image file. The system can also handle multiple ships and projectiles, each with their own velocity calculations, and reliably read input from 4 NES controllers.

Project design

Our project was basically inspired by our interest in gaming and various past 476 projects. We started looking at the Snake project‘s color-video display and wanted to improve upon it. We also noticed the various projects that used different game controllers and thought it would be fun to make a multiplayer game.

Dueling Ships

Game controller

First, we tried using Microsoft SideWinder gamepads, but we quickly found the communications protocol was too complicated. After evaluating several different game controllers, we settled upon the NES controller because it was simple, robust, and we could fit all the necessary communication lines for 4 simultaneous controllers on to one 8-pin port connected to the microcontroller.

 

For more detail: Gray-scale Graphics: Dueling Ships

Leave a Comment

You must be logged in to post a comment.

Read previous post:
Desolder professionally with NO-CLEAN flux wicks

Desoldering braid makes an invaluable service at development or rework. Everyone who´s ever tried to suck off a solder from...

Close
Scroll to top