ECE 291 Semester Project:
291Kart

Brian Chang
Jaime Chu
Yo-Chan Chung
Judy Lee
C.K. Liang

Game menu procedures
- Jaime Chu, C.K. Liang

Game engine procedures
- Brian Chang, Yo-Chan Chung

Networking procedures
- Judy Lee

Sound engine procedures
- Jaime Chu , C.K. Liang

Best Time procedures
- C.K. Liang

Miscellaneous
- Brian Chang

Storyline

Note: The following is purely fictional and intended only for purposes of entertainment and creating the setting for 291 Kart.

    Prof. Lockwood took in a deep breath of the fresh Spring Urbana air as he stepped out of Everitt Laboratory on this bright sunny day.

    "Another successful day on the job," he said to no one in particular. One day nearer to his lifetime dream... to raise his ECE 291 students to be the Intel engineers that, through mostly masterful training and a bit of brainpower, would someday overtake Intel Corp and bring him in to take the helm. "Things are going perfectly to my plan."

    Lockwood cheerfully walked over to his motorcycle and prepared to go home. The bike looked fairly junky, but its humble appearance was merely a cover. In reality, it was a custom-made Ducati 916. Then all of a sudden things turned sour.

    "Bill, go home!"

    Bill Gates had somehow sidled up beside him in his hot pink Porsche 959.

    "You have somehow eluded my hitmen, and I thought it would be time to take care of you myself," said Gates. "You're too much of a threat to my new world order, Lockwood. I know what kind of filth you're spreading about my ingenious innovations, and frankly, your influence is only slowing my path to destiny. It's time for me to eliminate you.

    "But being the fair gentleman that I am, I'll give you a chance, (that is, if you call it a chance HA HA HA HA HA HA). Let's see who's faster, you in that dinky two-wheeler or me in my car. If you win, I'll let you live. However, if I win, all your students come with me to Microsoft to be DirectX programmers. What do you say?"

Will Lockwood heroically agree to the race and save all of humanity? To be continued...

Well, okay, we'll let you in on one secret. He does. Otherwise we don't have a semester project.

Project Description

: Our challenge is to build a game that involves much of the skills and knowledge we have have gained throughout the class machine problems this semester. We will also be attempting to implement sound integration and networking, which we have not had much experience with to date.

Our main challenge is to combine many components built by different team members into one piece of software. The player, upon starting up the game, will be presented with the game menu interface, in which he or she will choose single/two players, character/vehicle, and track. Then the game engine will begin.

The game engine is a variation of Everitt 3D (MP4), with some major differences:

  • Everitt 3D runs with a first person perspective. The Ray Caster is called from the position of the character, and the character's point of view is captured to the screen. 291Kart, on the other hand, is second person. That is, the view is that of a camera that is constantly a fixed distance behind the direction of momentum of the vehicle. This calls for a procedure that calculates the position of the camera, given the position of the character and the momentum angle. The Ray Caster is finally called from the position of the camera.
  • In Everitt 3D, the character moves at a constant speed as long as a direction key is pressed, and stops abruptly when the key is released. In 291 Kart, we want to simulate the movement of a motor-driven vehicle, which means we need to use acceleration and deceleration constants to add or subtract to the movement rate. We also want to simulate another property of physics, elastic collision. If the vehicle collides with a wall or another vehicle, it will bounce off.
  • In Everitt 3D, we want to see a sky with pretty clouds in the background. But of course, the clouds need to move and change as we turn. We implement this with two sky segments that each hold two 1920x33 PCX files. The view angle determines the offset of the sky segments that are shown. Since one screen of width 320 holds a view of 60 degrees, we need 320*360/60 = 1920 columns for the sky. The two sky segments only fill the top two thirds of the top half of the screen. In an effort to save a little on memory usage, we only draw blue pixels in the bottom 34 rows of the top half. The bottom half is drawn all green (grass).
  • In order to draw the border of the road, we use a similar procedure to DrawStrip in Everitt 3D. We call it DrawBound. While in MP4 we drew a scaled texture stip in a given column, in DrawBound, we draw a red or white pixel at the location of what would have been the bottom pixel of the texture strip. This is repeated for all 320 columns, and the image of a road is drawn.
  • We are able to color the road gray with the following procedure: a procedure begins in the bottom half of the screen and analyzes column by column right to left. If while it is going down the column, it meets a red or white pixel drawn by DrawBound, we then draw all gray pixels below it.

Implementation

The main function of the program will be written in C, with the vast majority of subroutines written in assembly. We will build off of MP4 as a start, as the game engine is similar in many ways. The finished result, however, will be almost all original code, with either new procedures built from scratch, or modified procedures from MP4.