ECE291 Computer Engineering II Lockwood, Spring 1999

Infantry 401

TEAM MEMBERS: EXPERTISE AND RESPONSIBILITIES:

Jimmy (Zhen Wen) Chen Game Logic (Team Leader)

Peter Lai Graphics

Ray O’Connell Sounds

Siddhartha Bhatt Networking

INTRODUCTION AND GAME PLAY

This is a multi-player combat game where each player have their own top-down view of a common share-world map. Each player start off with a generic gun, which have small range and damage power. As the game progress, different weapons and supplies will be dump onto the screen. Whoever gets the weapon first gets to put it into their weapon collection. Each weapon has their advantages and disadvantages. For example, a homing missile is a smart weapon that follows you for a certain amount of time and range, but only has medium damage power. A Power missile only shoot straight and have less chance of hitting a target, but if hit it will take half your life. All weapons have their unique range, damage, and quantity. There will also be medical supply poping up in the game at random times. Not only will you have other players to worry about, you will also have to watch out for other hazards like fire pits.

The general layout of our program will loop through part of the main. Inside this loop we will redraw our screen according to everybody’s status and send out a packet to the server every so often (30/second). Each player will update their own status via the keyboard handler since that will be the only type of external input that our program will take during game play. We also update our record of other player’s status once we receive a new packet from other players with NetPost. Sounds would be told to play corresponding to proper interrupts like a fire of a weapon with the press of the spacebar.

General Functions

GRAPHICS

For the graphics portion of Infantry401 we will have 2 different soldiers(model 1 and model 2) for players to choose from. We intend the game to be played by up to 6 players and because of that we have 3 differently colored variations for each soldier model. We are going to use 320x200, 256 colors INT13h mode. Each player will have his/her own view of the terrain of a much larger world map. This will be displayed on a 240x176 portion of the screen. The player will be centered on this screen section. To the right of this screen we have an 80x200 textured section that will display a scaled down version of the world map(top 80x60 section) displaying all player positions using differing colored pixels and health bars for all players(bottom 80x140 section). To the bottom of the 240x176 screen we will have a 240x24 bar that will display which weapon the player has selected.

Each player will have the opportunity to collect 2 additional weapons(grenade and homing missile) besides the default gun given at the start of the game. These weapons, along with additional health and ammo will randomly pop up on the world map for the players to collect. Players will be able to inflict damage to opponents while occupying the same 240x176 portion of the screen. Only the homing missile is allowed to deviate off that section of the screen in its pursuit of the opponent it was fired at.

We are storing tiled images in 16x16 pixel PCX files. Background tiles will be loaded into a 2-dim. array. Soldier images and weapon images will be loaded into a differing 2-dim. array but have invisible pixels surrounding those images. We will use a buffer to quickly transfer images to the screen.

Graphic Functions

SOUNDS

Infantry401 will utilize both MIDI files for background music and WAV files for sound effects. The Sound_Library_291 files will most likely be used heavily. There will be two arrays, a WAVArray and a MIDIArray, each containing a struct with the file names of all types of sound files we will use in the game and other file info. The game will implement a number of background music (MIDI) selectable via the keyboard. There will also be specific sound effects triggered by certain events in the game, such as: dying, getting hit, shooting (different weapon types), and possibly environment triggered sounds. The game will support 8-bit WAVs, and MIDI files.

Sound Functions

NETWORKING

Infantry 401 is a multi-player game and networking will be implemented through NetBIOS. A combination of multicasting and unicasting will be used to run the client-server. The stand alone server will keep track of the number of players logged on, their energy levels and their coordinates. Clients unicast update packets to the server and the server multicasts those packets to the clients. A text mode based interface will be written for the server. The stand alone server will have a text mode video interface. The game will not start until the server sends a start game signal.

Since NetBIOS limits an application to the LAN on which it implemented, and since multi-player games are usually played on the Internet, an attempt will be made to implement the networking via TCP/IP.

Networking data structure:

PlayerType struc ; received from every player (including self)

player_num db ? ; player's number (0-5)

pos_x dw ? ; player's x position

pos_y dw ? ; player's y position

angle db ? ; player's angle

weapon_type dw ? ; the type of weapon that was fired

strength db ? ; player's strength

kills db ? ; player's kill count

end_game db ? ; end_game request

PlayerType ends

WEAPON struc

num db ? ; which weapon (1, 2 or 3)

damage db ? ; health range from (1-10)

pos_x dw ? ; weapon’s x position

pos_y dw ? ; weapon’s y positon

range dw ? ; weapon’s range in pixels

show db ? ; 1 show, 0 don’t show

ammo db ? ; ammo left for this weapon

WEAPON ends

Network Functions

Click here to email me ! Comments!