Link’s Lost Quest
Programmers:
-
Chris Mabee: Sound, Game Engine, Project Coordination, Administrator of
Punishment
-
Eric Harter: Graphical Interface, Sprite Animation, Humor
-
Jim Moawad: Network, Computer AI, Costume Design
-
Kim Odum: Intro, Statistics Processing, Counterintelligence
Game Overview:
With new 3D games pushing the envelope of your computer’s powers, and
complex algorithms chewing up processing time, too many games try to substitute
flashy graphics for their lack of gameplay. A good plot and solid, user-friendly
gameplay help to capture a user’s interests and create memorable games.
In the games of days past, few rival The Legend of Zelda in plot, gameplay
and overall enjoyment. The graphical capabilities of Zelda are now more
advanced than ever. Just imagine the same, thought-capturing plot combined
with the graphic capabilities of today. In Link’s Lost Quest, we have combined
these elements into one explosive action –adventure RPG.
In Link’s Lost Quest, we will take the game format from Nintendo’s Legend
of Zelda, and expand it using the knowledge we have gained from ECE 291.
The game will incorporate 320*200 graphics using 256 colors, utilizing
parallax scrolling, sprite animation, palette effects, and PCX imaging.
Midi sound and digital effects will add to the experience of gameplay,
while Enemy AI, and Multiplayer options will create an intense action environment.
Screen Shots:
Here are a couple screen shots from our finalized game:
Implementation:
The game will be entered using a batch file that installs Midpak before
entering the game. The user will be greeted by a brief introduction, and
will become acquainted with the story line through a brief cut-scene. From
then the user is taken to the main game menu, where he or she will be able
to choose from a variety of options including single-player, networked
multi-player, settings, and instructions. The menu will also include load
and save features to continue previous games. If the player chooses to
enter a game he/she will be transported into Link’s world to fight the
bad-guys and triumph for good. From here there are three basic ways that
a user can exit the game. The player can win the game, get killed by enemies,
or leave voluntarily. Winning the game or dying pitifully displays the
appropriate sequence. Leaving voluntarily will cause the user to be prompted
by the computer with yet another menu. From this menu the user can select
to save, load, or exit the game. As the game exits the user will be treated
to the credits as our names scroll off of the screen.
Variables, Segments, and the Such…
Segments:
VIDSEG: Video segment, 0A00h used to output video data to screen
MIDISEG: Holds MIDI file data for use by Midpak
SBSEG: Screen buffer holding video data to go to the screen
TEXTSEG: Holds the textures for the current map
SCRSEG: Scratch segment used in several applications
Variables:
PaletteArr: Holds the next palette to be transferred
ScPaleArr: Used for palettes that need to be altered
CmpPalAr: Holds palette array for comparisons
SavArr: Saved video data used in sprite animation
RedVal: Red Value of selected palette entry
BlueVal: Blue Value of selected palette entry
GreenVal: Green Value of selected palette entry
MidiSize: Size of current MIDI file
RandVal: Original seed for random value generator
Exit_Flag: Set if ESC is pressed
UpButton: Set if up arrow is pressed
DownButton: Set if down arrow is pressed
LeftButton: Set if left arrow is pressed
RightButton: Set if right arrow is pressed
AttackButton: Set if CTRL button is pressed
MenuButton: Set if F1 is pressed
Player_X: X coordinate of player
Player_Y: Y coordinate of player
Facing: Direction the character is facing
Health: Amount of player health
Rupees: Money player has in possetion
Item1: Item in inventory 1
Item2: Item in inventory 2
Armor_Power: Current strength of Armor
Weapon_Power: Current Strength of weapon
MapData: Offset of map array data
MapSize: Current Size of Map
Map#Size: Size of map at #
Map#Start: starting coordinates for Link in map #
Next_X: Prospective X and Y positions of player after next move
Next_Y:
Monster_X: X and Y coordinates of selected monster
Monster_Y:
Lookup Tables:
TextNumLook: Lookup table for map texture offset
MenuLookup: Offsets for Menu PCX file
Procedures:
Main Loop: Programmer - Chris Mabee
-
Calls Intro Sequence
-
Calls Menu
-
Sets up game data for first map
-
Executes main game loop logic
-
Calls Exit Sequence
-
Exits to DOS
Video Procedures: Main Programmer: Eric Harter
WaitVrt – Written by Chris Mabee
-
Waits for the vertical refresh to finish
-
No inputs or outputs
-
Calls Nothing
-
Notes: Reduces Screen Flicker and "Snow"
GetPalette – Written by Chris Mabee
-
Moves the Palette into a specified array
-
Inputs:
-
DX = Offset of Array to read palette into
-
PaletteArr = array the palette is loaded into from load PCX
-
Outputs:
-
The selected array with the new palette data written into it
-
Calls Nothing
SetPalette – Written by Chris Mabee
-
Fills the Palette with the palette information in Parray
-
Inputs:
-
PaletteArr = palette to be moved to computer palette
-
Outputs:
-
Palette
-
Calls Nothing
Fade(Black/Red/White)
-
Fades the Palette to red black or white
-
Input:
-
ScPaleArr = palette to be changed while fading
-
Output:
-
Palette
-
Calls: SetPalette
FadeToPCX
-
Fades to the given PCX palette
-
Inputs:
-
Palette
-
CmpPalAr = Palette to fade to
-
Outputs:
-
Palette
-
Calls: SetPalette
LoadPCX
-
loads the PCX data into the a given buffer and the palette information
into PaletteArr
-
Inputs:
-
DX = offset of PCX file in memory
-
AX = Segment to write to
-
Outputs:
-
Buffer with uncompressed data
-
PaletteArr with palette information
-
Calls Nothing
ShowScreenBuffer
-
Outputs the contents of ScreenBuffer to the VIDSEG
-
Inputs
-
ScreenBuffer
-
Outputs
-
Graphics to screen
-
Calls: Nothing
DrawSprite
-
Draws a Sprite to a location on ScreenBuffer
-
Inputs:
-
AX = which sprite to draw
-
DX = location at which to draw the sprite
-
Outputs:
-
ScreenBuffer with sprite added
-
Calls: Nothing
GetUnderSprit
-
Gets the video data under where the sprite is going to be placed, used
in animation
-
Inputs:
-
DX = Location where the sprite is to be drawn
-
Outputs
-
SaveArr = array to keep saved data
-
Calls Nothing
UpdateScreen – Programmer Kim Odum
-
Updates statistics on screen
-
Inputs:
-
Rupees
-
Health
-
Item1
-
Item2
-
Outputs:
-
Changes screen to reflect the interactions of the game
-
Calls: ShowScreenBuffer
IntroSeq – Programmer Kim Odum
-
Plays the Intro sequence
-
Inputs:
-
None
-
Outputs:
-
Sequence
-
Calls: All fade palette routines, LoadPCX, ShowScreenBuffer, GetPalette,
SetPalette
EndingSeg – Programmer Kim Odum
-
Plays a selected ending Sequence
-
Inputs:
-
AX = number of sequence to play
-
Outputs:
-
Selected sequence
-
Calls: All fade palette routines, LoadPCX, ShowScreenBuffer, GetPalette,
SetPalette
Game Engine Functions: Main Programmer – Chris Mabee
AnimLayer
-
Responsible for animation of several layers for parallax scrolling
-
Inputs:
-
Buffers Holding Layers
-
Layer Speed Information
-
Outputs:
-
Layers animated according to speed
-
Calls: ShowScreenBuffer
SetUpGameData: Programmer - Kim Odum
-
Loads Maps, sets variables for Player position, loads needed PCX files
-
Inputs:
-
Map#Size
-
Map#Start
-
Outputs:
-
Player_X, Player_Y
-
MapSize
-
MapData
-
Buffers containing PCX files
-
Calls: LoadPCX
LoadGame
-
Loads a saved game from selected file
-
Inputs:
-
AX = # of Saved game to load
-
Save Game Files
-
Outputs:
-
Updated Game Statistics
-
Calls: SetupGameData
SaveGame
-
Saves a game to file
-
Inputs:
-
AX = # of game to save to
-
Outputs:
-
Game file with save data
-
Calls: nothing
CalculateMovement
-
Updates the character movement, direction, actions
-
Inputs:
-
Keystrokes
-
Player_X
-
Player_Y
-
Facing
-
Outputs:
-
Player_X
-
Player_Y
-
Facing
-
Calls: ProcessMovement
ProcessMovement
-
Checks if a move is valid
-
Inputs:
-
Next_X
-
Next_Y
-
Outputs:
-
AX = 1 if valid, 0 if not
-
Calls: WorldValue
InstKey/NewKey/DeKey
-
Installs and de-installs our new keyboard interrupt, scans for keypresses
-
Inputs:
-
Scan Codes
-
Outputs:
-
Updated movement Variables
WorldValue
-
Gets the value of the MapArray at the X,Y position
-
Inputs:
-
Next_X,Next_Y = position in array to be checked
-
Outputs
-
AX = value at Next_X, Next_Y
Monster Functions: Main Programmer Jim Moawad
Converge
-
Converges the monsters on the player
-
Inputs:
-
Player_X
-
Player_Y
-
Outputs:
-
Monster_X
-
Monster_Y
Idle
-
Causes monsters to walk around aimlessly
-
Inputs: None
-
Outputs:
-
Monster_X
-
Monster_Y
-
Calls: Random
Diverge
-
Causes monsters to diverge from the players position
-
Inputs:
-
Player_X
-
Player_Y
-
Outputs:
-
Monster_X
-
Monster_Y
Attack
-
Forces the monster to employ it’s attack
-
Inputs:
-
Player_X
-
Player_Y
-
Outputs:
-
Attacking monster
ProbabilityFunction
-
Calculates the probability of a monster performing one of the four above
tasks, based on several variables including distance from player, monster
facing, etc.
-
Inputs:
-
Player_X
-
Player_Y
-
Monster_X
-
Monster_Y
-
Outputs:
-
The monsters behavior pattern
-
Calls Attack, Diverge, Idle, Converge
SoundFunctions – Main Programmer Chris Mabee
LoadXMI
-
Loads a XMI file into memory to be read by Midpak
-
Inputs:
-
DX = offset of file name in memory
-
Outputs:
-
MidiSeg = segment with midi data
-
Calls: Nothing
RegisterMidi
-
Registers a MIDI file with Midpak
-
Inputs:
-
MidiSize
-
MidiSeg
-
Outputs:
-
File registered with Midpak
StartMidi
-
Starts the loaded and registered MIDI file playing
-
Inputs
-
Registered MIDI file
-
Outputs
-
Audio
StopMidi
-
Stops the currently playing MIDI file
-
Outputs
-
Dead Silence
PlayDigi
-
Plays a digital source file, used for effects
-
Inputs
-
Digital file
-
Outputs
-
Sound Effect
Network Procedures – Main Programmer – Jim Moawad
GetOtherPlayerData
-
obtains position and vital statistics of other player
-
Inputs:
-
None
-
Outputs
-
Other Player’s Data
SynchonizeGame
-
synchronizes the game
-
Outputs
-
A synchronized game
SetMode
-
Sets cooperative or deathmatch mode settings
-
Inputs:
-
Player choices
-
Outputs:
-
A cooperative or deathmatch game