ECE291
Fall 1998
Computer Engineering II
Final Project
Jesse Chen
Scott Mikula
Long Truong
Michael Urman

Robo Rally

Purpose Show off our programming ability by coding a good game.
Points [FINAL POINTS]
Due Date [FINAL DUE DATE]

Introduction

For our final we bring to you a survival course for robots. As the player you receive 9 of the 84 possible instructions. Of these 9 instructions you must choose 5 each round for your robot to execute sequentially. In doing so, you must become the first to reach all checkpoints in order, and finish at the last checkpoint.

The Details

This game is graphically intensive. As we need to fit a lot of easily understood data onto the screen at once, we are using SVGA mode 640x480x256 colors. To finish the ambience, backgroud music will be playing at all times, in the form of MIDIs. So that the player can better tell what is happening as the game continues, sound effects of the RIFF WAV form, also customizable, will be played.

As this is a multiplayer game in that you must be the first of the robots to reach goals, you must have a worthy opponent built into the game. For this, a computer AI will be used, and will offer multiple levels of difficulty in order to not discourage beginners yet still offer a challenge to more experienced players.

And what fun is a multiplayer game unless you can challenge your friends and show them your awe inspiring ability in a networked environment? Using netbios and our own specially designed information exchanging protocol, you can play your best friend (now your worst enemy) head to head on your LAN.

This game will be largely interrupt driven to keep our animations smooth and our music running. Because of the sheer amount of information required to play our music and single-buffer our screen, we will be using both multiple predefined segments as well as dynamically requesting extra segments to store our data. This has the side effect of potentially not having enough memory to play your music, but still allowing the game to play. Sounds like a good tradeoff in a tight memory situation.

Meanwhile the entire game system will be carefully monitored by Game Control, making sure to provide you with the best gaming environment possible. Here is a screenshot:

Global Definitions

To make this game possible, we employ many global definitions. We also use structures to maintain the readibility of many repeated data storage needs:

Procedures

The actual modular implementation is dependant on a properly structured set of functions. Here is the listing of needed public procedures, as well as mentions of the more obvious private ones:

Game Control

Networking

Graphics


Segments

TileSeg SEGMENT 'DATA1'
        Tiles db 65535 dup(?)
TileSeg ENDS

FontSeg SEGMENT 'DATA2'
        Fontmap DB 65535 dup (?)
FontSeg ENDS

ScrSeg SEGMENT 'DATA3'
        ScratchPad db 65535 dup(?)
ScrSeg ENDS
TileSeg holds the decompressed pcx file that contains the images of all tiles and frames of animation used in the game.
FontSeg holds the decompressed pcx file of the font used to display text in the game.
ScrSeg is a scratch segment that holds a compressed pcx file while it is being decompressed.

Variables

TileFile     ; filename of the pcx containing the tiles as a null terminated
 string
FontFile     ; filename of the pcx containing the fonts as a null terminated
 string
PCXback      ; filename of the pcx containing the game background as a null 
terminated string
oldTimerV    ; far pointer to the old timer interrupt vector
AnimateCount ; count of clock ticks since last Animate call
DoneAnimate  ; flag that is 0 if an animation is running, 1 if all animation
s are done
AnimateFlags ; 8 byte table - one byte for each robot containing a flag sign
ifying what type of
             ; animation the robot is doing
FrameCount   ; 8 byte table - one byte for each robot containing the number 
of frames left in
             ; whatever animation it is doing, if any
LasersOn     ; a flag that is 1 if lasers are being waited for
LaserCount   ; the number of frames left to wait for the lasers
TempX        ; a temporary animation variable, containing the x-coord to dra
w a tile at
TempY        ; a temporary animation variable, containing the y-coord to dra
w a tile at
netMenu      ; filename of the pcx containing the netowrk menu as a null ter
minated string
ThisCompMsg  ; string: 'This computer'
NetworkMsg   ; string: 'Network player'
AIMsg        ; string: 'AI player'
PBuf         ; 7 byte buffer for binasc

Procedures