ECE291 Computer Engineering II Lockwood, Spring 1998

Final Project:
High 65

Assigned March 14, 1998 
Due Date Friday, May 1, 1998, 5pm
Points 160

Members:
Tommy Falk
Joseph Burnett
Naveen Neelakantam
Joe Opiala

Introduction

Today, you decide to take a vacation. So you hop in your car and go for a little ride down South. However, you notice the roads seem a little different today. At one point you find a car standing in the middle of the road. At another point, a cow comes out of nowhere. Be careful not to run him over. But don't get hit by the huge truck coming at you from your side because now you're at an intersection. What is going on here? No, it's not a dream. Welcome to the world of High 65 where all sorts of hazardous obstacles must be avoided by you, the driver. Your goal is to safely navigate down the stretch known as I-65. Panama City awaits. But, getting there is the real challenge.

Problem Description

This game will require an engine of its own. This involves continously keeping track of constantly changing variables in order to render a real-life simulation of a driving experience. Scaling in two dimensions will be the thrust of this game. However, the scaling algorithm must be fast and easily accessible. Finding the pictures to scale may require a little artistic integrity and manipulation on behalf of our PCX experts. And finally, writing the script to the game will require extracting several streams of data.

Implementation

The introduction begins with PCX image and fades out into the game. The title "High 65" is displayed..

The game will be rendered in 320x200 resolution. What appears on the screen represents the driver's perspective. This is handled by two distinct scaling techniques. The first uses a continous feed of strips from PCX files. The far left and far right of the screen will be scaled 100%. Each succesive strip towards the center will be linearly scaled down. As the driver accelerates using the space bar, the rate at which these strips are outputed increases starting the from the center of the screen out. The second scaling technique involves scaling an image from a certain depth. The range of the depth is the length of a two dimensional array called the RoadArray which holds all elements currently on the road. The driver can strafe either right or left via the arrow key. This is easily implemented by scrolling the screen in the opposite direction the car goes. Thus, bounds checking and image clipping become essential for displaying the status of RoadArray. Each element of Road Array will represent a particular obstacle and size depending on its value. At each step the driver advances down the road, the array shifts down by a row, and the bottom row of the array is checked for collisions between the driver and an obstacle. At fixed intervals, the game engine will generate obstacles to insert into the top row of RoadArray. Otherwise, a blank strip of road is inserted into RoadArray. These obstacles will be included in an array called Game# where each element contains the type of obstacle and its X-position.

Music will be generated through .midi files. Sound effects will be generated through .wav files.

Data Structures

RoadArray - a 80*45 array of bytes. This represents what is currently visible on the road. The vast majority of the array will contain empty spaces designated by the space character. Any obstacles present will also be contained in the array represented by certain characters. The very top row represents minimal scaling, and the bottom, maximum scaling.

LeftPCX/RightPCX - an array of bytes holding the offsets to PCX files.

TriangleLoc - the offset of the starting location for scaling the left-side background. The rest of the screen can be referenced to this point.

Car - the horizontal location of the car on the screen

Frequency - the rate at which characters are generated for the road array

Game - the distance the car has travelled

Subroutines


All images were scanned from the world wide web.

MidPak.com, Midpak.av, Midpak.adv were borrowed