Justin Klein Progress Reports


Here is documentation on all of the APIs Ive written for this class


----------------------------------WEEK 1---------------------------------


3/31/04 - GLWindow

Wrote basic OpenGL window creation & destruction class

Set up main driver application to run GLWindow


4/1/04 - Utilities

Wrote Logger class

Can log to files or separate console window

Console window can be hidden or shown

Can redirect stderr & stdout to text files

Wrote Profiler class

Dumps heap contents to log file at program termination

Can add monitors to trace CPU time spent on various routines (using high-resolution performance counter)

Wrote simple INIReader wrapper class to parse & read initialization files


4/2/04 - Framework Research

Went over a bunch of DirectX examples, took notes, brainstormed on framework/overall program structure, etc (regarding how the gamestate will be maintained, rendering, input, client-server architecture, etc basically how everything will come together)


4/4/04 - Start Framework

Started putting together a basic structure for the framework, combining:

-MainApp class

-Renderer class

-GLWindow class

-Profiler class

-Logger class

-INIReader class

-InputHandler class (stubfor now - Nakul is working on it)


4/5/04 - Website

Put the framework on hold, completely redesigned the website from scratch with Andy, including design docs, menus, schedule, group roles, etc.


----------------------------------WEEK 2---------------------------------


4/6/04 - Finish Website, Meetings, Continue Framework

Finished up the website with Andy

Several group meetings

More work & revisions on the framework, trying to get an overall clean design laid out...not a lot of code generation, just a lot of code organization :)


4/7/04 - 1st Version Framework, Research, FontWriter

Finished first "clean" version of framework, ready to start putting stuff in!

Did some internet research on bitmap fonts in OpenGL & put together a basic FontWriter class; Application now calculates & displays frame rate!

Started researching image formats (I want to use jpegs for textures, they're smaller & load much faster than bitmaps)


4/8/04 Group Meeting, Image Loading, Sound System

First official group meeting!

Wrote JpegLoader & TextureLoader wrapper classes to simplify loading images into OpenGL; application now displays a SplashScreen!

Wrote SoundSystem wrapper class around Bass (an API that uses DirectSound); application plays background music!


4/9/04 Input Integration, Menus

Got InputHandler from Nakul & worked it into the framework

Started working on menu system


4/10/04 Menus, Sound System

Some revisions to Nakuls InputHandler (to work w/ menus)

Wrote first working version of MenuHandlerharder than I thought!

Some additions to SoundSystem (fading, volumes, etc)


4/11/04 Revisions, Progress Report

Revisions/cleanups to the framework

Revisions/bug fixes on the menu system

Compiled group progress report


4/12/04 Player Base Code

Wrote a base Player class so Chris can fill in the physics/motion code


------------------------------------WEEK 3-----------------------------------


4/13/04 Group Meeting, Module Isolation

Second official group meeting

Created Debugger class to contain Profiling, Logging, HeapChecking, & FrameRate timing for better compartmentalization

Created ResourceManager class to load/store/unload textures, sounds, and models for better compartmentalization


4/14/04 Module Isolation

Removed all dependencies in GLWindow, compiled into standalone library

Removed all dependencies in FontWriter, compiled into standalone library

Removed all dependencies in MenuHandler, compiled into a standalone library


4/15/04 Documentation, TextInput, Console

Documented the 10 APIs Ive written so far; a link to this documentation is at the top of this page.

Wrote TextInput namespace to gather & render user-inputted strings in OGL (for multiplayer chatting, connection lobby, etc)

Added ability to show/hide a console window with Alt+Space hotkey


4/16/04 - Particles

Started on the ParticleEngine!


4/17/04 Particles

More work on ParticleEngine


4/18/04 Network

Worked w/ Andy to clean up Client & Server network code APIs

Started Server Application


4/19/04 Particles, Docs

Some more work on Particles (basic version up & running)

Compiled progress report & allocated new tasks for next week

Helped a few of the other group members work out some minor bugs


------------------------------------WEEK 4-----------------------------------


4/20/04 Group Meeting, INTEGRATION

Group Meeting

MAJOR work w/ Andy on integrating; we now have client/server connectivity from within the game interface, and verified message passing between the client & server applications, including movePlayerUp, MovePlayerDown, etc.


4/21/04 INTEGRATION, Bezier Curves, Command Interpreter

MAJOR work w/ Andy integrating, resulting in:

-Pre-game waiting for other clients countdown (shows time till game start, number of clients connected so far)

-Multiple clients can connect & disconnect

-Server successfully broadcasts gamestate

-Clients can say move left to the server, server confirms (required a number of changes from the previous version)

Threw together a couple of Bezier Curve functions for Chris to put into the MathFunctions

Added ability to type commands into a Logger console (basic command interpreter for server)


4/22/04 MD2 Models

Added a bunch of new documentation to my APIs page

Massive work on MD2 Model Importer (Starting from a previous version that I had already written)

Wrote a driver for testing (renders single model, can rotate around it, load it, free it, load skins, free skins)

Removed a BUNCH of dependencies on other modules

Fixed several memory leaks

Added code to internally load .PCX images (for skins)


4/23/04 MD2 Models, CVS

Massive work on MD2 Model Importer (continued)

Fixed some bugs in animation processing

Model computes per-face Normals at load-time (not good enough)

Model computes per-vertex Normals at load-time (by averaging the normals of the surrounding faceslooks MUCH better)

Added lighting to the test-driver

Documentation updated & uploaded

Played w/ CVS, got it figured out, uploaded model driver



Integrated new version of Chris player motion code

Integrated new version of Nakuls InputHandler

Integrated my MD2Model importer/renderer to the client framework

-You can now fly around a ship model in single-player mode!

Integrated my ParticleEngine

-Ship thruster now emits a stream of bubbles as it moves!

Got server code up & running on CVS

Fixed bug that occurs when you try to connect after a previously failed connection attempt

Fixed bug with TextInput where it wasnt acquiring focus from the InputHandler


-Reworked interface to the Send() methods to internalize more of the logic (client and server)

-Changed send mechanisms for better bandwidth utilization (client and server)

-Reworked how GAME_MSGIDs are processed/generated

-Moved Chris player-motion logic to the server

-Added ability to skip pre-game countdown (new message type from client to server)

-Solved a few logical problems that were bringing down our framerate by 91% once the network was integrated J


-Two way communication between client & server is complete & tested (we had confirmed message receipt before, but the data was mangled)

-Client can render four ships based on the gamestate that the server maintains!

Phew3:30am is too late


4/25/04 Team Management

No real coding today; just a BUNCH of individual conversations w/ the various team members discussing what needs to be done, how the interfaces should be structured, how they should interact with each other, etc. including A.I. and how it will react with the various elements in the game. Also spent some time briefing everyone on how Andy and I restructured the overall game, as the overall picture of the project seriously changed after last nights work


4/26/04 Particle Engine, Group Documents, Webpage

Cleaned up ParticleEngine code; have a final version up & working

Compiled group progress report

Updated deadlines

Posted documentation & snapshots on MD2 Driver

Posted snapshots of our current client & server versions


----------------------------------WEEK 5---------------------------------


4/27/04 Meeting, Docs, Client Framework, Key Mapping

Official Group Meeting

Commented & documented ParticleEngine (up on the APIs page)

Realized we were stupidly sending messages from client to server; began reworking some of the integration details on the client side

Our website is now accessible from http://cirrhosis.servebeer.com!!

Implemented ability to map keys and switch to gamepad input via the menu system

Slightly restructured gameloop to avoid eating CPU time when the app is inactive

Added a fxn to InputHandler so I could transmit KeyUp messages as well as KeyDown messages

Spent awhile w/ Chris explaining how to properly implement player motion


4/28/04 Framework revisions, Volume Controls, Bezier Curves, View Changes

Separated gameplay code into separate Update() with same Render() and Init() fxns to avoid repetition between Single & Multiplayer

Added Sound.ini which stores music filenames and volumes; can change volumes from within the menu.

Added RenderImmediate to FontWriter (documented under APIs)

Fixed a fairly significant bug in MainApp that caused the program to crash on exit

Compiled Bezier Curves into a library; documented on APIs page

Wrote a framework for the Bezier Curve camera animations/view changes!


4/29/04 Bezier Curves, Music, Cleanup

Fixed bug in Bezier Curves, animated one camera motion as an example for Chris

Added in-game music

Cleaned out single player mode (not needed anymore now that we have connectivity)

Added where I am variable to Camera class so the camera knows which ship to follow

Client now receives a connection message saying WHICH client they are in the world


4/30/04 World Rendering, Input

Changed how characters are rendered from the gameState (taking into consideration that players can disconnect in any order, requiring:

Added isConnected Boolean to each clientInfo in gamestate

Modified nsInputHandler to fix a bug in ReleaseDevice

Added ReInitialize() to nsInputHandler

Remove device type param to nsInputHandler; now read from .INI file (makes it easier to switch via menus)

Expanded TextInput to add getSingleKeyPress and getSingleKeyRelease just like nsInputHander; keyboard events are now always used for the menu regardless of which directInput device is initialized


5/1/04 5/5/04

ECE 108 midterm


----------------------------------WEEK 6---------------------------------


5/6/04 MD2 fixes, World model, Network redesign

Tracked down a bug in MD2 loaderfixed (wasnt checking if the model had too many polys, vertices, etc at load time it just crashed!)

Spent FOREVER getting the world model into the game

Spent longer than forever w/ Andy, on:

-GameState now sent in pieces (first warning message gets sent, then an array of data)

-6 new message types: expectPlayers, players, expectEnemies, enemies, expectProjectiles, projectiles

-Bug fixes that were causing ships to still render after disconnecting

-Bug fixes that were causing ships to flicker

-Client & server now use .INI file to allocate memory for worldState, maxNumObjects, etc

-Begun adding network messages for sounds


5/7/04 Major network integration

Integrated Cold enemy model, changed loading/unloading of gameplay resources

Now unloads everything that was loaded at gamestart

Another session w/ Andy, adding to yesterdays network integration:

Fixed bug causing network messages to accumulate when app was inactive

Finished transmission of sounds over network (all clients now hear a blast when any client fires)

Integrated rendering of enemies from server

Integrated rendering of projectiles from server (projectiles get created when user hits fire)


5/8/04 Bug fixes

Fixed a bug in Logger (now it doesnt crash if the logfile couldnt be created)

Fixed a bug with DirectInput (crash if .INI file specifies gamepad, but no gamepad present).

Added network debug messages (via #defines)

Updated Chris & Nakul on our progress so they can start their integration (AI, rotational acceleration, projectile physics, projectile collision detection)

Fixed bug where the last projectile wasnt disappearing


5/9/04 World state expansion, shields, timeout

Added a check to the client for network timeout

Added resources for the other types of entities

Structured a system for specifying the world (enemies, lives, etc) in INI files, sent to chris for integration w/ server

Fixed blending for the particles they look round now

Setup billboarding for the projectiles so theyre visible in first-person mode

Added ability to join a pre-existing game

Added health, enemy types, projectile types, and shields to the world state

Added rendering for shields



Fixed a bug where the client thought the server dropped the connection if it took too long to load

Did group weekly progress report, updated a bunch of stuff on the website, added new screenshots

Renders all model types

Enabled lighting! Basic materials/properties setup from .INI file

Added other enemy models, enemies now rotate as they move about the world

Added new debug info (lighting on? network time? num players? health?)

Added textured, animated, rotating semitransparent shields


Enemies can be killed


----------------------------------WEEK 7---------------------------------



日本語 Midterm


5/12/04 5/14/04 E3!!

In LA for E3, back sometime Friday


5/15/04 Double Buffering, Renderer Revisions

Set up double-buffering for the world states (two different world states exist: the one thats rendering, and the one that the network is writing to in the background)

Cleaned up rendering code a LOT: reduced from 30-40 to 5 state changes per frame

Re-organized drawing order so everything can be seen through transparent shields

Added new screenshots to webpage

Revised death animation (now doesnt infinite loop)



ECE 108 Lab



ECE 108 Lab



ECE 108 Midterm


----------------------------------WEEK 8---------------------------------


ECE 108 Midterm


5/19/04 Triple Buffering, Network Bug Fixes

Added triple-buffering (3 gamestates: Network, Render, RenderNext)

Involved TONS of changes and bug fixes ultimately fixing the ship flicker problem

Added "I'm Ready" message to enter client in game (so enemies dont kill you while loading!)

Added network framerate to debug info

Heavily revised network timeout detection

Fixed bug where enemies Skip as they rotate; rotations are now smooth.


5/20/04 Radar, Lives, Deaths, Tilt

Fully implemented radar

MAJORLY rewrote & cleaned up networkMessageHandler

Ship respawns after you die, gameplay resumes!

Integrated player lives with Andy

Integrated death messages with Andy

Integrated ship tilt with Andy

Prevented clients from entering the game until loading completes


5/21/04 SUNGOD!


5/22/04 Culling, Spotlight, Layered Backgrounds, Animated Models, Single Player, Fading Shields

MAJORLY rewrote & cleaned up rendering code

Modified MD2Model, WorldModel to return the number of triangles actually rendered

Updated application to display number of triangles rendered

Implemented FRUSTUM CULLING massive performance boost!

Change all quads to triangle strips

Setup materials for everything, including SHINY SHIP

Added SPOTLIGHT to ship

Added a function to convert 3bpp->4bpp by adding an alpha channel to TextureLoaderthis was used to fix the appearance of bullets (you used to be able to see the square around the round bullet)


Moved skins to textures folder (from models folder)

Revisions/fixes to shields (they also fade out now)


Added ability to run as a server! (Client launches server as a child process)

Wrote framework for death explosion animations

Updated website with new executable


5/23/04 Fixes & Documentation

Documented Frustum and Overlay APIs

Fixed up world model loading & single player init

Updated particle engine as necessary to fix death animations

Whoops! Fixed single player mode

Fixed death animations for enemies particles now get spit out

Fixed death animations for clients NO particles get spit out if its you (personalized animations)

Removed splashscreen state (consolidated to menu)

Game installs font resources



Fixed a bug with my cars flat tire

Group Progress Report

Client prompts for username, sends to server

Client debugger prints Username, current weapon, current ammo, remaining shields

Added PowerUps to worldstate

Rewrote a lot of networkMessageTypes to generalize event messages (roomchange, death, fire, collide, win, lose)

Client now differentiates between what kind of entity dies

Up till 3am fixing a MAJOR memory bug with Andy & Nakul that was destroying the entire game world

Found (but didnt fix) 2 more critical bugs that have been worrying us for awhile


----------------------------------WEEK 9---------------------------------


5/25/04 FIXED LAG, lighting revisions, better death animations, overlays

Fixed lag issue! Dumb directPlay flags

Reworked a lot of the lighting code; spotlights now display for all ships

Made app ignore network messages while in the menu, while translating between rooms

Forgot to remove the font resource I was using for the menu when I quitfixed

Put in basic framework for rendering powerups

Added flame explosion animations to deaths (which can be used for collisions later if we want)

Added progressbar to renderer

Implemented player overlays Each ship now shows a small lifebar and username


5/26/04 Scaling, Powerups, HUD, Titlescreen, Targeting Computer, Event Sounds/Animations

Scaled the inner sphere so it doesnt interfere with the outer world model

Scaled down all of the models so theres more room for gameplay now

Moved in the camera so models look the same size w/ larger relative world size

Client can now receive powerups array

Expanded JpegLoader API to load two images, using one as a mask to generate an alpha channel for the other (changes documented in API section)

Implemented new HUD & radar (using jpeg masks)

Fixed bug where players were getting garbage names on connect

Fixed death animation looping

Not-Ready ships now appear black and dont interact with the game

Added sparks when two entities collide

Added sparks when something gets shot

Added SHOWSTATS and WEAPONCHANGE to inputhandler

Added ability to pop up a window to show standings info (right now its empty)

Added rendering for health powerup

Added rendering for machinegun powerup

Plays sound for collecting powerups

Added different sound & texture for Machinegun projectiles

Added titlescreen

Started adding code for the targeting computer (secondary viewport)


5/27/04 Targeting Computer, Fonts, Redid Motion, HUD, SoundSystem

Finished targeting computer (secondary viewport)

Messed around with the FontWriter to get text more centered

Added support for 3D extruded fonts in FontWriter, documented on APIs page

Rewrote chris motion code for him; ship motion is a lot more intuitive now

Realized I was switching to Ortho Mode like a retard; redid ALL of the ortho mode coordinates (so that rescaling the window resolution keeps everything aligned), including:

-HUD contents coordinates

-FontWriter coordinates (also changed API a bit)


Added model for default (laser) weapon

Finished filling in the rest of the HUD: Shield uses, ammo, etc

SoundSystem revisions, including:

Updated to use BASS 2.0 (from 1.8)

Added Error reporting

Added support for 3D Sounds

Added characterFacing and projectileAngle to network messages, removed a lot of excessive math on the client

Restructured network receive function to never ignore critical event messages (death, room change, etc)

Fixed it so after a death the camera zooms back to the ships respawn position

Made it so game summary pops up after gameover (and in theory, gamecomplete)

Setup the code to flicker lights when shots are fired, fade lights to darker level while traveling from room1 to room2

Started adding resources for ship chunk models (for explosion)


5/28/04 3D Sound

More screenshots on website

Fixed bug where Targeting Computer outline was getting clipped

Fixed bug where server wasnt sending position of fire events

Added 3D Sound to the gameplay!

Coded ship exploding after matrix-style zoom!

Added explosion sound for ship exploding

Disabled spotlight while ship exploding

Re-Did how textures are loaded so I can reuse the same texture for ship chunks as main ship

Different colored ships for different players!

Names appear over not ready ghost ships

Fixed targeting computer the image was coming from too far in front of the ship

Sound for colliding ships

Fixed radar in other rooms


5/29/04 Happy birthday to me.

Fixed problem where spotlights werent visible in targeting computer

Inner spheres now render in other rooms

Fixed Chris room locations

Setup camera animations from tube exit to next room

Added support for different inner spheres in different rooms

Fixed particleEngine so it works under lighting


5/30/04 Multi-Room Bug Fixes, Powerups, winning/losing, screenshots

Finished up room-to-room scripting in Camera class

Fixed scoreboard (now actually shows values)

Fixed radar so it doesnt render previous rooms entities during a room change

Fixed menu so everything fits on 800x600

Fixed camera respawn position when you die in another room

Fixed bug where late-joining players would be placed in room1 even if the game had moved to room2 (roomNum added to gamestate)

Changed ROOM and DEATH to critical events so they are never ignored

Auto Re-Open targeting computer if it was closed by a room change

Added weapon name to HUD

Updated FontWriter so PrintImmediate can apply a background; background rendered for loading

YOU render as an arrow on the radar

Render laser powerups, flame powerups

Render laser projectiles, flame projectiles (with orientation/direction)

YOU WON or YOU LOST displayed on end-game summary

Fixed client networking code so it doesnt hang if the server was shut down

Posted a bunch more screenshots


5/31/04 Sounds, Bosses, Ebola, Background Clutter, Powerups

Gathered a bunch of sound files online

Resources for BOSS

Resources for EBOLA

New load screen


Major changes to NetworkMessageTypes (new projectile types for all enemies)

More sounds for events

Different types of projectiles for different enemies

Added background junk floating around

Fixed bug where PREVIOUS inner sphere would be invisible during room change

Culling for junk

Culling for powerups

Culling for ParticleEngines

Different particleEngine for EACH client

Fixed bug where different clients would show different light levels in room2 (dark room)

Flickering powerups on radar

Render A-Bomb explosion!

STARTED SCRIPTING BOSS BATTLE at the end of room 4 (different music, camera shift, boss enters from vein)


----------------------------------WEEK 10---------------------------------

6/1/04 Powerups, Boss Battle, Billboarding, Network Optimization, Looping Sounds, Scores

Render RailGun & A-Bomb powerups

Render lifebar for boss

Cleaned up boss entrance animation

Setup please waittransferring to johnnys liver messages

Fixed camera setup for boss fight

Helped andy setup server control dialog

Setup billboarding for projectiles during camera shifts/in the targeting computer

Setup billboarding for death explosions

Sorted all of the network structs by memory layout and reduced ints to shorts/chars where possible to optimize network traffic

Edited sounds & set up looping for rapid-fire events

Removed railgun from EVERYWHERE on the clientwere cutting our losses on this one

Setup scoreboard to sort by & render score

Work on boss death animation (boss explodes, then shows you won screen)

Restructured rapidfire events to be startRapidFire, endRapidFire


6/2/04 Minor bug fixes, MAJOR testing & tweaks

Put in a check for maxPlayers, maxEnemies, etc in network receive

Fixed a logger bug causing it to crash on quit in the lab

Put in boss & liver model, revised load screen

Increased light levels in room2

Fixed major camera bug that killed someones game if a room change happened while they were dying

MAJORLY worked client-side 3D sound for rapid-fire weapons; sounds perfect & cut down network traffic by 90%

Turned a few more boss-related messages to CRITICAL

Text and voice shown during room changes

Shaded lifebars

Disabled ships no longer rendered

TONS AND TONS AND TONS of play-testing and physics/damage/AI/weapon/projectile/powerup tweaks in the lab


6/3/04 Kill messages, Sounds, SinglePlayer, boss death, bug fixes, TESTING

Reworked how overlay messages work so they arent affected by lighting

Changed network message types for new scoring, and X killed X messages

Added X killed by X overlays

Re-organized scoreboard to show room kills/deaths, total kills/deaths

Resources for texturing for scoreboard background

Resources for you killed someone sound

Fixed singleplayer mode to run the server in hidden

Finished boss death (cirrhosis flies off the boss while blowing up)

Correctly render boss lifebar

Fixed bug where youd still listen to the network after getting a gameover

Extended boss lifebar to emphasize his badass-ness

Opps! Boss lifebar wasnt shaded; fixed

Posted new screenshots

LOTS of testing in the lab!