Welcome to our ECE291 Final Project
Bar Crawl `99: The Journey Home

|
Assigned:
|
Thursday, April 8, 1999 |
|
Due Date:
|
Thursday, April 29, 1999 |
|
Purpose:
|
Create a challenging Frogger based game for our ECE291 Final Project |
|
Protocols:
|
|
|
Group Members:
|
Matt Van Iten, Matt Allison, Jay Emery, Jon Yuskus |
Screen Shots


Team Members & Assignments:
Matt Van Iten - Team Leader, graphics, sound routines, collaborated
on Main
Matt Allison - Game Engine, I/O, wrote Main
Jon Yuskus - Graphics, Gameplay, collaborated on Main
Jay Emery - Graphics, Gameplay, Web Page Design
Introduction:
Bar Crawl '99 is a Frogger inspired game in that the objective
of the game is to get the player safely from one lower portion
of the screen to the upper portion of the screen without
getting run over by one of many vehicles in the roadway.
Unlike Frogger, our game will feature a choice of one
of four characters, each his/her own special charactericstic (speed,
damage capacity). Our game will also feature multiple
screen levels, meaning that the player will have to navigate more than
one set of roadways in each level. Our goal is to provide
better graphics and sound than the original Frogger, including digitized
images, .wav sound effects and midi background music
on 320X200 VGA screen.
Problem Description:
The most difficult portions of this program will be the routines
concering the animation of the player on the background without
altering the background designs. The next concern will
be the inclusion of the .wav and midi sound files. The inclusion of
multiple level screens and multiple character files will
also be a primary concern of our group. Timing issues as related to
program speed and playability will also be addressed.
Our game will differ from similar projects in that each character will
have individual
characteristics, such as health and endurance.
Implementation:
The screen will be divided into a series of rows consisting
of the roadway and the safe areas on either end of the level.
Each character will be defined in a generic player struct
that will define the characters attributes (speed, damage capacity,
location,...). Jump tables will be utilized to help represent
the proper delay time to be included in each level based on level
speed and difficulty. Several arrays will be allocated
to serve as storage for the number of level images that are to be drawn
to the screen for each level.
Variables, Segments, etc....
Segments:
VidGrSEG: Video segement, 0A00h used to output
data to screen
stkseg: Stack segement for pushing and poping
ScratchSeg: Temp storage when opening files..namely
images
cseg: Stores our variables...etc.
Variables:
ScreenNum: Screen number for KbhHandler
GameLevel: Current Game Level
ScreenLevel: Current Screen Level, used for scrolling
PlayerDead: Status of player, 1=dead 0=alive
oldKbdV: Far pointer to default keyboard interrupt
function
CodeVar: Variable to tell if code was entered
PlayerNum: Player picked on player screen
EnterFlag: Variable for code screen
Delay: Variable for speed
FirstScreen: Variable for first screen displayed
in screen scroll
SecondScreen: Variable for second screen in screen
scroll
IgnoreColor: Holds value of transparent color
for cars, and characters
Procedures: (from Main, other routines to be added as needed)
Matt Allison:
InstallKbd:
purpose - to set up the program to handle keystrokes.
input - none
output - oldKdbPtr
assumption - must save old vector
UnInstallKbd:
purpose - to reset to the default keyboard handler.
input - none
output - none
DrawScreen:
purpose - to draw the game screen based on a series
of parameters related to obstacle and player position as well as the level.
input - player postion, obstacles, level.
output - a 320X200X256 (maybe 640X480X256) game
screen.
description - this routine will be repeatedly
called during the course of the game in order to update the screen as the
game is played.
IntroScreen
input-none
output-screen
description-This procedure draws a 320x200 file
named IntroScn, and delays it for viewing
FinalScreen
input-none
output-screen
description-This procedure draws a 320x200 file
named FinalScn, and delays it for viewing
CreditScreen
input-none
output-screen
description-This procedure draws a 320x200 file
named CredScn, and delays it for viewing
CharScreen
input-none
outputscreen
description-This procedure draws a 320x200 file
named CodeScn, and waits until KbdHanler sets EnterFlag to 1. During this
time a code may be entered.
CodeScreen
input-none
outputscreen
description-This procedure draws a 320x200 filoe
named CodeScn, and waits until KbdHandler sets EnterFlag to 1. During this
time a code may be entered.
BackScreen
input-ScreenLevel, FirstScreen, SecondScreen
output-screen
description-This procedure draws a 320x200 file,
which depends on ScreenLevel
Load0b
input-DX
output-ScratchPad
description-This procedure loads the file name
with offset DX into ScratchPad
Store0b
input-DI.ScratchPad
output-[DI]
description-This procedure uncompresses the file
in ScratchPad into the area with starting offset DI. It also sets the palette
accordingly
KbdHandler
input-scan code, ScreenNum
output-GameLevel, EnterFlag, PlayerNum, Player.Direction,
Player.Moving
description-This procedure handles interupts from
the keyboard. Depending on ScreenNum it sets flags or some other relevant
variable at that point.
DrawObstacle
input-DI, SI
output-screen
descriptionThis procedure writes to the screen
with offset DI from some variable with offset SI. It draws 76x25 picture.
DrawPlayerSize
input-DI, SI
output-screen
description-This procedure writes to the screnn
with offset DI from some variable with offset si. It draws a 20x25 picture.
RecordPlayerSize
input: screen, SI
output: [DI]
description: This procedure reads from the video seg with offset
SI and writes to a variable with offset DI. It reads a 20x25
section.
DrawMovePlayer
input: Player.Direction, Player.Position
output: screen, Player.Position
LoadPlayer
input: DX
output: ScratchPad
description: This procedure takes a player size picture file
and stores it in ScratchPad.
StorePlayer
input: DI, ScratchPad
output: [DI]
description: This procedure takes the image file in ScratchPad and decompresses
it into bytes at offset DI. It moves the palette into ports
also.
MainLoadPlayer
input: PlayerNum
output: player
description: This procedure loads the player struc variable with
the appropriate files according to the playernum. Calls the
other helper
procedures.
Jon Yuskus:
InitLevel:
purpose - initializes variables that the DrawScreen
routine needs to access in order properly draw the screen at the beginning
of the
input - GameLevel
output - player and obstacle postions, loads new
images and midi song for level into registers.
description - this routine is needed to set up
the game prior to each new level.
Collision:
purpose - to determine if the player has been
run over by and obstacle.
input - player and obstacle positions
output - sets the PlayerDead flag to 1 if a collision
has occured that has killed the player since each player will be able to
absorb a certain amout of damage prior to death.
description - the obstacle postion will be updated
first and redrawn to the screen, then the player position will be updated
and
redrawn, Collision will use these two values to determine
if a collision has occured.
Jay Emery:
ScrollScreen:
purpose - to scroll the screen vertically upwards
to reveal the next screen of the level.
input - image file
output - the next page of the level, and ScreenLevel
is incremented.
description - This routine is used to revel the
next portion of the level to the player. Once the player has reached the
top of the current page and pressed the up arrow, the
screen will scroll to reveal the next portion of road and obstacles.
Matt Van Iten:
Loadmidi:
purpose -to obtain the file handle for the midi
sound and load into soundpad buffer
input - pointer to sound pad
output - file handle
description - routine is accomplished using int
21h
Registermidi:
purpose-to prepare the midi file for processing
input -none
output -formated midi file in sound pad buffer
description -uses interupt 66h calls to midpak
Midi Stop/Start:
purpose -to stop call at end of midi file / to
start playing file
input -sound buffer with formated midi file
output -none / audio
description -uses interrupt 66h calls to midpak
PlayMain:
purpose: Organizes the call to other routines to play a wav file
inputs: BX contains the offset of the soundfile to be played.
Reads file into Wavpad buffer
outputs: none
Play:
purpose: to play the file loaded into the Wavpad buffer
inputs: Wavpad buffer
outputs: Writes wav data to out ports
Volume
purpose: sets the wav volume so the sound is audible above the midi
sound
inputs: none
outputs: writes to audio ports
Initdsp
Purpose: Initializes the DSP to play a wav file
Input: none
Output: out ports are set for wav file
Dspwrite
purpose: writes information to the DSP
inputs: none
outputs: wav data to ports
External Routines:
As of right now, the only external routine that is in our
implementation is GetTime which is used to get the system time from the
machine.
We also used a version of load pcx from the lab manual
with personal modifications.