Andrew Strauss – CSE 125 Progress Reports

-------------------------------------------------------Week 1-------------------------------------------------------

Tuesday - 3/30/2004

First class meeting – course structe

Formed group

Assigned duties and agreed on game concept - virus fighters

Reviewed C++ Tutorials 1-30

Wednesday - 3/31/2004

Reviewed C++ Tutorials 31-60

Thursday- 4/1/2004

Group meeting to assign immediate responsibilities for weekend

Jeff - finish website

Andy - C++ Tutorials, OpenGL tutorials

Nakul - Tutorials and DirectInput for keyboard, if time for gamepad

Justin - Sound

John - DirectPlay tutorials

Chris - review tutorials

Reviewed C++ Tutorials 61-75

Friday - 4/2/2004

Out of town

Saturday - 4/3/2004

Out of town

Sunday - 4/4/2004

Learned about debug assertions

Learned about writeprivateprofilestring and getprivateprofilestring

Review NeHe OpenGL tutorials 1-10

-------------------------------------------------------Week 2-------------------------------------------------------

Monday - 4/5/2004

Review NeHe OpenGL tutorials 11-17

MAJOR Website redesign with Justin!!!

Content creation for new website

All to meet assignment spec spec posted on CSE 125 website

Tuesday - 4/6/2004

Reviewed NeHe OpenGL tutorials 17-19

Finishing last 30% of website work with Justin

Went over input with Naku

Discussed networking model with John wang

Met with Chris Yap and Justin Klein to discuss physics / collision detection

            Collisions with other enemies

            Collisions with the world

            Trig function tables

            Bezier curves for camera movement

Wednesday – 4/7/2004

            Out of Town

Thursday – 4/8/2004

            Met with Chris and Justin to go over collision detection



            First Group meeting with Voelker (Prof) and Rapp (TA)!!!! – in attendance:






            Met with Justin and Voelker to go over group issues

            Began reworking simple server

                        Remove irrelevant functionality – windows CE, Bluetooth, etc

                        Started to clean up code

                        Use ini files to load in settings

Friday – 4/9/2004

            Major work on server

                        Cleaned up networking code

                        Started to create a separate class for network code

            Several conversations with John about what he had / had not done in his network code

Saturday – 4/10/2004

            Server moved into separate class

                        Problems b/c C++ is a POS!!!!!

                        Callback for direct play could not be a class member

            Clients are now able to connect

            Two public functions are all that is needed

                        void initLJHCServer();

                        void destroyLJHCServer();

            Still need to

                        Clean up class

                        Fix # players bug

                        Add sendGameState function

Sunday – 4/11/2004

            Finished server

                        In separate class

                                    Call InitLJHCServer(CALLBACKFUN); and pass in the message handler for direct play

                        Moved callback function out of server code and now gets passed into init

                        Fixed player numbering bug

                        Tested and works with SimpleClient

                        Wrote sendGameStateToAllPlayers() function that sends a struct to all clients

                        Wrote basic driver that creates a server and allows you to init/destroy/send game state from a basic menu system

            Misc. webpage updates

            Started work on client – have modified simple server to receive game state from server

                        Transfers struct with 3 ints correctly

-------------------------------------------------------Week 3-------------------------------------------------------

Monday - 4/12/2004

            Minor work on client

            Misc. website updates

            Worked on weekly group status report with Justin

Tuesday - 4/13/2004

            Group meeting with Voelker (prof) and Rapp (TA)

                        Andy, Justin, John, and Chris in attendance

            Reviewed server code with John and Chris

            Went over Justin’s client

Wednesday - 4/14/2004

            Out of town – Laker game & Flying around the sky!!!!

Thursday - 4/15/2004

            Major work on client – cleaned up a ton and started to move to a separate class

                        Problems b/c of Micro$oft’s intermixed examples

                        Network code mixed in with windows code used to display dialogs

                        Makes it very tough to separate things logically

Friday - 4/16/2004

            Had issues separating the base networking code from the simpleClient example

            Tried working with the mazeclient and maze console client

            Eventually decided to work with the Tutorial 9 code

            Starting cleaning it up

                        Changed to code so it no longer searches through servers and generates a list

                        Connects to a specific server specified by and IP and port

            Still need to clean it up more and compartmentalize it into a clean class

Saturday - 4/17/2004

            Finished cleaning up the client

            Moved client code into separate class

            Client can now send move forward, backward, left, and right to server

            Server updates a game state based on data from clients

            Server can send game state to all clients

            Created documentation for the client - LJHCClient API

            Created documentation for the server - LJHCServer API

            Cleaned up server and removed 3 unnecessary methods

            Basic testing and everything is operational

Sunday - 4/18/2004

            Started integrating server into framework with Justin

            Cleaned up interface to be consistent with rest of game

                        initLJHCServer -> Init

                        destroyLJHCServer -> Cleanup


                        Seperated initLJHCClient to Init and Connect

                        Modified code so that ini file is passed in

                        Started to move code into .lib files

            Started to make generic server for the game

Monday - 4/19/2004

            Basic generic server is complete…..need to add specifics for our game

            Able to init, broadcast, and destroy

            Server lib is finished

            Finished client lib

            Moved initialization of COM functions into client code

            Finished generic client that will be easy to integrate with framework

            Server cleanups from yesterday are done on client

            New version of documentations for APIs for Client/Server now online

            Started researching timers for server to use

            Implemented timer function on server

                        Server now broadcasts game state every ten seconds to all clients

                        Each client can modify game state

-------------------------------------------------------Week 4-------------------------------------------------------

Tuesday - 4/20/2004

            Added concept art to webpage – basic ship model and cell texture from Jeff Cole

            Group meeting – everyone in attendance

            MAJOR work on Integration with Justin

                        Basic Client can now connect to server and send message

based on user input

            Server work – clients can now connect and game state is broadcast

            Lots of little cleanups to server / client

Wednesday - 4/21/2004

            LOTS more work on integration with Justin

                        When first client now connects to server, a countdown is started

                                    Players can join in during a period defined in an ini file

                                    After that period expires, the server begins broadcasting

the overall game state

                                    If the max number of clients as specified by ini file

is reached, the game begins as well

            More work on server

                        Implemented timer when first client connects – spec above

                        After all clients have disconnected, server goes back to initial state

                                    All timers killed

                                    Starts a new count down when first client connects

                        Added game message for countdown period with number of

clients and time left

                        Moved game message IDs and structs into separate common file

                        Modified game state so that it stores an array of player info items

                                    x, y, z angle, etc - will post more API info soon

                        Added more server messages to logger based on DPNID of players

            Client work

                        Connect doesn’t take port, read in from ini file

                        Send and connect return more detailed results for error handling

                        Separate disconnect and destroy method

                                    Disconnect actually just call Destroy and then Init

            Basic input messages are received on server from clients

Thursday - 4/22/2004

            Started integrating Justin’s interactive console with server

            Issues due to how windows getmessage and peekmessage behave

Friday - 4/23/2004

            More integration

            DirectInput work

                        Focus issues caused by not passing in the HWND for the main game

                        Modified nsinputhandler and client to fix this

            Got CVS working and uploaded the quote unquote crap

Saturday - 4/24/2004

            MASSIVE integration with Justin – up till 3:30 am

            CVS issues (because CVS SUCKS!!!)

            Started restructuring Chris’ movement / rotation code to integrate with server

                        Lots of cleanup – adding accessor methods, making data private, adding DPNID, etc

            Added ability to fast forward through waiting for players countdown to server

            Integrated Nakul’s new input handler that now takes an HWND

            Modified Send now takes a GAME_MSG_GENERIC and the sizeof the message

                        Used to take a DPNMESSAGEBUFFER… internalized

            GAME_MSG_IDs no longer read in via INI file

            Problems with networking slowing down frame rate from 400fps to 20fps

            Changed client and server to send ASYNC and coalesce

            Still wasn’t working right

            Problem b/c sending a pointer (DUH…..pointer to memory on server is useful on client)

            Fixed that but still had problems b/c we were sending dynamically allocated heap data

                        Indicated we had 11000 players and game loop was taking forever

            Modified to send fixed size array and frame rate jumped back up to 200+ fps

            Player initial positions and angles read in from INI files

            Client can now render four textured lighted player ships

                        Positions sent from server, initialized from INI file

Sunday - 4/25/2004

            LOTS and Lots and lots and lots of motts…errr


            More work on getting Player.cpp to behave with the server

            Wrote and included hash map for translating DPNIDs to ids to

                        array of Players / CharacterInfos in game state

                        Hashmap API

            Seperated Update in Player to individual movement functions

                        Up, Down, Left, Right, Coast

                                    All call trimmed down update passing in frame time

            Modified Up, Down, Left, and Right methods in Player.cpp to

                        Return CharacterInfos

                        Can be directly used to update overall game state message

            Integrated FrameRate timer/calculator to normalize movement

            Movement is now supported and tested with 2 remote clients

            Movement isn’t correct, most likely due to normalization issues

                        Needs to be updated by Chris to reflect new design

            Added a coast network message and id to help normalize movement

            Clients send a “coast” message if they don’t move forward / backward

                        Not ideal – generates a TON of traffic

Might need to move this to the server

            So overall structure of server is:

                        Server has array of Players

                                    With positions, lookats, DPNIDs, etc

                        Server has a game state that it sends to players

                                    Game state contains CharacterInfos

                                                CharacterInfos contain  only position and angle

                        When a client connects, a Player is created for that client

                                    DPNID of client mapped via Hashmap to Player array item

                        When server receives a movement message

                                    Looks up DPNID of sender in Hashmap to get id in player array

                                    Calls Player’s move function (IE Player::Up() )

                                    Move fuction updates the Player and returns a CharacterInfo

                                    CharacterInfo is stored into overall gamestate

                        At specific timer interval game state is sent to all clients

Monday - 4/26/2004

            Created documentation for hash map

            Added virus, red blood cell, and world pictures from Cole to concept art on web page

            Helped Chris get .net to compile the server on his machine

            Update LJHCClient and LJHCServer APIs

            Minor changes to Justin’s screen shots page, member duties, and overall prog report

            Added CVS info and screent shot to admin info page

-------------------------------------------------------Week 5-------------------------------------------------------

Tuesday - 4/27/2004

            Group meeting – all in attendance

            Modified server to send game state to all clients more

                        Instead of once per second to 60 times per second

            Changed to read in number of times per sec to send game state from ini file

            Modified game messages to indicate bool if key is pushed

                        Send a true when the player starts moving, false when he stops

            Movement methods no longer return a CharacterInfo, return void

                        Just set bool variable to indicate if the client is moving

            Update method returns CharacterInfo to update world state

                        Based on Booleans from movement methods (Up(), Left(), etc.)

                        Checks if client is moving and updates position / angle

            Server now calls Update for each player before sending game state

Wednesday – 4/28/2004

            Flying around the sky and Lakers’ playoff game – GOOO Lakers!!!!

Thursday – 4/29/2004

            Bug regarding multiple players connecting fixed

                        m_NumPlayersConnected was not being updated

            Cleanups to server timer handling

            Added message for transmitting index into CharacterInfo array of a client to that client

                        Had to add an overloaded Send method to the LJHCServer class

                                    Takes at third parameter – DPNID of player to send to

            Modified server logger messages to consistently show

DPNID and array index into Player array

            Added #IFNDEF DONTDEBUG to all logger messages that print in game loop

                        This way server won’t slow down in release mode

                        In MainClass.h, just add the follow to suppress debugging message

                                    #define DONTDEBUG 1

            Several talks w/ Justin and Chris about structure of Player class and

                        Client interaction

            Added isConnected Boolean to Player class so that if 3 clients connect and

                        Client 2 disconnects, the transmitted array will not cause problems

4/30/2004 – 5/3/2004

            Out of town – University of Illinois, Champaign Urbana

            Updated group progress report and deadlines…..talks with Chris, Justin, Nakul, and Jeff

                        about where we are and where we are going

-------------------------------------------------------Week 6-------------------------------------------------------

Tuesday – 5/4/2004

            Group meeting – all in attendance

            John Wang dropped the class…..down to 4 programmers and 1 ICAM major

            Studying for 120 Midterm

Wednesday – 5/5/2004

            Studying for 120 Midterm

Thursday – 5/6/2004

            120 Midterm

            Spent a TON of time with Justin integrating and helping debug – till 2am

                        Note – something as simple as == VS = can cost 2 people an evening!!!!!

                                    Visual Studio compiles but didn’t allow us set a breakpoint on 1 line

                                    Will compile fine with random “/”s and “t”s in file

            Separated main game timer event handling from main server application

            Started to add fire event and add Sound sending to Server

                        Appends appropriate info to logger in fire event

                        Creates sound struct for fire and sends to all clients

            Added SendArray message to LJHCServer networking code

                        Takes void pointer and size – sends contents of array

            Added Synchronous sending functions to LJHCServer

                        Don’t anticipate needing these but they were needed for testing

                        Same params as Asynchronous functions but name ends in Sync

                                    IE SendArray and SendArraySync

            Added messages to NetworkMessageTypes.h to indicate next

                        message will be an array – gives the size of array that is coming




      Added corresponding GAMEMSGs for each that contain number of array elements coming

                        GAMEMSG_PLAYERSCOMING  (numPlayers)

            GAMEMSG_ENEMIESCOMING  (numEnemies)

            GAMEMSG_PROJECTILESCOMING  (numProjectiles)

Added structs to NetworkMessageTypes.h similar to CharacterInfo



            Modified server to read in values for max number of players, enemies, and projectiles

                        Dynamically allocates appropriate arrays

            Changed GAMEMSG GAMESTATE to be just struct gamestate that contains

                        numPlayers, numEnemies, numProjectiles

                        Pointers to each dynamically allocated array (players, projectiles, enemies)

            Created EntityLimits.ini file to store maximum number of players, enemies, and projectiles


            Should be easy to complete same for enemies and projectiles

Friday – 5/7/2004

            Separated wait for players timer event handlings from main server application

            Cleaned up main server Cleanup() – separated from WM_DESTROY message handling

            Cleaned up main server’s Init function

            Major reordering of Init function

            Removed hard coding of initial array sizes and dynamically allocated arrays on server

                        ALL now read in from ini file settings

            Seperated a TON of stuff in the server into logical methods – no longer in Init / Callback

Fixed a bunch of bugs I didn’t know were there but popped up during seperation

            Commented server’s MainClass.cpp a TON

            Updated LHCServer API to reflect 4 new Send methods created yesterday (Arrays and Sync)

            Added code to delete all the new dynamically allocated arrays in Cleanup functions

            Major INTEGRATION work with Justin

            Added dynamically allocated Enemies and Projectiles

            Created basic Enemy class modeled after Player class

            Created basic Projectile class modeled after Player class

            Created Update routines for each that return the appropriate info item (EnemyInfo)

            Modified main timer callback to Update each projectile and enemy

            Timer then sends array coming with the size and then each array

            Init function of MainClass now reads in defaults for projectiles and enemies

                        Added Enemy.ini

                        Added Projectile.ini

            Updated server call back for fire

                        Checks to see if there are too many projectiles already

                        If not, creates a new projectile at the ship’s current position

                        Sends client GAMEMSG_SOUNDEVENT to play the fire sound



            BE PLAYED ANY TIME ANY SHIP FIRED!!!!!!!!!!!!!!!!!!!! J J J J

            Now Chris should be able to add in physics for projectiles

                        Spoke with him about how to do this

            Now Nakul should be able to add in enemy AI

                        Talked with him about this but he cant get the server or client to run

                        They run on Justin’s desktop and laptop, my desktop and laptop, chris’ desktop,

                                    And all the machines in the lab

                        Nakul will go to the lab to integrate over the weekend

Saturday – 5/8/2004

            Flying around the sky and Opera (Verdi’s La Traviata)

            Added a new GUI to the server

Sunday – 5/9/2004

            New GUI is slowing things down a TON – too much trouble

            Removed GUI

            Updated Justin / Chris / Nakul

            Added shields to server network callback

            Added shields to player class

            When player is initialized, set to 0

            When player sends a shield message, the Shield method is called

                        If creating a new shield, initialized to max value read in from ini file

            Chris will make shields get weaker as time goes by

            Added type in EnemyInfo struct

                        Can be set to cold, sars, etc

            Added type in ProjectileInfo struct

                        Can be set to fire, bullet, etc

            Modified sounds to use more descriptive identifiers in NetworkMessageTypes.h

            New NetworkMessageTypes.h integrated into server

            Removed angle from Enemy class and EnemyInfo struct

                        Any enemy rotations will be random in place on the client side

            Removed angle from Projectile class and ProjectileInfo struct

                        Projectiles will not have an orientation

                        Can add a new network type for oriented projectiles later if need be

            Added Health to player

Monday – 5/10/2004

            Updated screenshots page a bit

            Uploaded the latest executable to the webpage

            Updated the downloads section with the new executable

            Added room number to server to indicate which part of the world the players are in

            Added changeToNextRoom function to switch rooms and reinitialize enemies and projectiles

            Restructured server init

                        Starts server in room 0, and when a game begins, calls changeToNextRoom()

            Cleaned up load player initial info function

            Modified server to read in number of viruses for each room from ini files

                        Viruses are now initialized to the correct number and type from World.ini

            Added type to Enemy class that is set in Init function

            Restructured how MOST files deal with ini files

Modified Player, Enemy, Projectile, Math, MainClass, NetworkCB, TimerStuff

These files now use a #define in INIFiles.h that specifies the location

for each TYPE of .ini file

            Fixed shields so that they don’t start at maximum

                        Shields are now turned on by each client’s shield button

            Modified projectiles to read in settings for a TYPE of projectile from the ini file

                        IE – the ini file will have a section for bullet, fire, etc projectiles

            Type passed to Projectile init() specifies settings to use

            Removed general section from Projectile.ini

            Start work on rapid fire – not complete yet

                        Moved single fire handling out of Network Callback and into Player class

            Implemented Enemy health

                        Max and min health read in from ini file

                        Different for each type of enemy

                        When hit by a projectile, the Enemy’s shot method is called passing in the projectile

                                    Based on the projectile, the correct amount of damage is done

                                    If the health is less than or equal to min health, the enemy is marked as dead

                        Enemies can now be shot and die after enough shots

            Player health implemented

                        Initialized to max health read in from ini file

                        When an enemy projectile hits a player, calls Player’s shot method

                                    Decrements player’s health by projectile’s damage

            Client now shows matrix style death Bezier curve when health drops below minimum

-------------------------------------------------------Week 7-------------------------------------------------------

Tuesday – 5/11/2004

            Group meeting – all in attendance

            Talks w/ Justin, Nakul, and Chris about what each of us will do over this week

            Off to L.A. for E3 and the Lakers Spurs Playoff game J

Wednesday – 5/12/2004 to Friday – 5/14/2004


Saturday – 5/15/2004

            For some reason, the Update methods in Player, Enemy, and Projectile were working

                        They were returning a local struct that was deleted

                        Modified methods to return void and take an extra parameter

                                    In Player, a CharacterInfo pointer

                                    In Enemy, an EnemyInfo pointer

                                    In Projectile, a ProjectileInfo pointer

            Didn’t fix grey-out bug

                        Started debugging code by removing sending of expect enemy, enemy,

                                    expect projectile, and projectile messages

                        Didn’t fix problem

                        Also removed updated of enemies and projectiles…

                        Spent most of the afternoon narrowing it down

                        Problem is in enemy-enemy collision detection in Enemy class Update

                        Nakul will investigate more

Sunday – 5/16/2004

            Getting sick

Monday – 5/17/2004

            Still sick

            Compiled group progress report and updated deadlines

            Expanded network types

                        Sounds for collisions

                                    Player VS Player

                                    Player VS each of the 5 types of enemies

                        Death events

                                    Include type (player, cold, sars, etc)

                                    Position in case we need to emit particles

                                    DPNID if it is a player so that client can decrement it’s life

                        Room changes

                                    New room number

-------------------------------------------------------Week 8-------------------------------------------------------

Tuesday – 5/18/2004

            Group Meeting – all in attendance

            Sick & CSE 120

Wednesday – 5/19/2004

            CSE 120

Thursday – 5/20/2004

            MAJOR MAJOR work again w/ Justin

            Spent like 5 hours finding a weird bug – couldn’t fix it

                        When server is run from within visual studio

                                    Player-enemy collision detection doesn’t work

                        When run from outside visual studio – collision detection works fine

                        Tried on my laptop and Justin’s desktop and same thing

            Added game_message_ready to NetworkMessageTypes.h

                        Sent after the clients connect and once they are done loading

                        After server receives this message, assigns health, shield, starting position

            Added ready variable to Player class and CharacterInfo

                        Each player is tagged as ready by the update methods and this is sent w/ the world

                        Only ready, players have a presence in the world

                                    Modified collision detection and server methods to only affect ready clients

                        Player set to not ready on connect

            Added tilt to Character info

                        Modified update method to send tilt at each world send

                        Players now tilt when they turn

            Modified room changes to send ChangeToNextRoom message to clients

                        Players set to not ready on room change so they can load

            AI modified to check if player is ready as well as connected

            Server now sends death events when players die

                        Contain DPNID of dead player and position

                        Can be used to show explosions and particles drifting off

            Server now sends death events when enemies die

                        Contains enemy type and position

                        Can play a different animation depending on which type of enemy died

                                    Explosion for one type, blood splatter for another, etc

            Restructured Player class and Enemy class init methods to take pointer to LJHCServer

                        Used to send messages from inside classes

                        Needed to fix rapid fire and a LOT cleaner

            Rapid fire works now

                        Players update method fires a bullet at a time specified by ini file

            Lives fully implemented

                        Players lose a life when their health is <= 0

                        Maked as not ready so they can play an animation

                        When a ready message is sent

                                    Given full health and shields

                                    Position reset to initial position

                                    Tilt, velocity, and angle reset

Friday – 5/21/2004

            Posted new screen shots

            Posted new binary

            Redid downloads page

Saturday – 5/22/2004

            Mooney flyin and opera

Sunday – 5/23/2004

            Updated deadlines

            Added number of shields to CharacterInfo

            Added number of shields to Player class

            Modified update methods to factor in number of shields

                        Can only turn on shields if you have some left

            Number of initial shields read in from ini file

            Rapid fire modification to try and get number of bullets fired consistent

            Added weapon to CharacterInfo

            Added weapon to Player class

            Player weapon set to default weapon on init

            Player’s weapon added to CharacterInfo on update

            Added ammo array to Player.cpp

            Added decrement ammo function to Player.cpp that decrements

                        Ammo if non rapid fire weapon selected

            Added weapon.ini which contains ammo settings for each weapon

                        Ammo to give player initially

                        Ammo to give player after getting a power up

            Added current weapon ammo to CharacterInfo

            Added current weapon ammo updating in Player.cpp Update method

            Deducts ammo in Player’s Fire() method

Monday – 5/24/2004

            Spent a WHILE trying to fix a bug because the CVS version wasn’t working

                        Chris checked in some changes that caused the server not to work

                        Spent an hour and a half trying to track down the bug but there were

                                    No CVS change logs to help

                        Made local changes

                        Finally got in touch w/ Chris and decided to remove everything from CVS

                        Then re add all the files from a cvs dump I made last night

                        Then had to re-add all my changes in one by one

            Number of shields now works

                        On initial spawn / death / level change, shield comes on but # of shields

                                    Doesn’t change

                        Client can’t activate shield when they run out

            Modified rapid fire to be part of the MainClass instead of the Player class

                        Rapid fire shots were fired every time the player was update

                        The player wasn’t update enough to shot the amount of bullets we needed

                        Wanted to add a timer to the player class but could add a timer in the class

                        Created a new timer that runs while the main game timer runs

Player names

            Server now receives a player name message

            Sets the name for a player

            Updates the CharacterInfo with the name

weapon changes

            Server receives a weapon change event

            Changes the Player’s weapon to the next one

            Can only change to a weapon with ammo

constructors / destructors for ALL server files

            Initalize all primitive data types

            Had some memory issues – Couldn’t add member variables to Projectile

            This fixed projectile and we wanted to prevent future problems

            Took a TON of time

fixed Justin’s shit tire that got punctured w/ Nakul and Justin

Game over messages sent to clients

Added detection for when a room change should occur

When number of enemies that are not red or white blood cells is <= 0

Sends a room change

Still need to move player and enemy positions into new room

Changed EVERYTHING to use generic events instead of specific ones

            Have one event with a type

                        May be death, collision, room change, etc

                        It has parameters to specify properties

                        Has a position that may specify where the event occurred

Counters for each player’s:

Number of kills

Number of deaths

Damage given

Damage taken

Fixed MAJOR bug due to ini file due to sections being renamed

            We changed the section name in one ini file from General to Limits

            Modified the code in one spot to reflect this but not others

            Was reading in number of enemies correctly in one spot

            In another, used a default value because couldn’t find the section

            Was trying to access memory that didn’t exist

-------------------------------------------------------Week 9-------------------------------------------------------

Tuesday – 5/25/2004

            Group meeting – all in attendance

            Tried to debug network lag

                        Couldn’t find problem

Justin met with the TA and found it

            Went to the Laker’s play-off game

Wednesday – 5/26/2004

            Fixed bug where clients continued turning after they died

                        Marked all movement flags off in setReady method

            You lose messages sent to clients when they lose their last life

            Collision events sent with a type

                        Player VS Player

                        Player VS Enemy

            Added EVENT_DEATH_YOU message that gets sent to the player who died

                        Sent before EVENT_DEATH

                        Client then ignores events and doesn’t spit out particles for the

                                    General death event

            Minor restructuring of ready operations on server

            Talked with Nakul about room changes

            Added Power Up arrays to main class

            Power ups updated in main timer

            Server sends power ups coming and power up messages to clients

            Created several different color ships by changing the texture

            Fixed bug in shield power ups

                        Were incrementing the time of the current shield and not

                                    The number of shields

            Modified Powerup’s Update() method to modify the overall game states

                        PowerupInfo items

            Chris modified Projectile to take a DPNID for the owner (person who shot it)

                        If the owner of the projectile was an enemy, he set it to a negative number

                        Since DPNIDs can be negative, this was causing strange errors

                        Modified it to take an integer as the owner

                                    For a player, set to their index in the Player array

                                    For an enemy, set to -1 (array index is always >= 0)

                        This made it easier to determine damage

            Modified artificial intelligence handler and Player class to reflect above change

            Added damage given by projectiles on collision to the Player that shot it

            If a player is shot and dies, or an enemy dies

                        If the shooter was a player

Modified the server to update their number of kills

            Update CharacterInfo by adding

                        Damage Given

                        Damage Taken

                        Number of deaths

                        Number of kills

            Modified Player’s update method to set the above

            Talked with Jeff Cole about HUD, PowerUps, and art

            Powerups work on Client

            Generated powerup management class

                        Spawns in powerups at time specified by ini file

            Collision events for when a bullet hits something

            Power up gathering messages sent to clients

            Integrated Nakul’s changes

                        Room changes w/ enemy positions done

                        Room changes w/ player positions done

            Rapid fire based on weapon initialized via ini file

            When weapon runs out of ammo, switch weapons

            Started positioning text and progress bars on HUD

            Projectile types for player fired projectiles added to ProjectileInfo

Thursday – 5/27/2004 to Saturday – 5/29/2004

            Las Vegas losing the shirt off my back L

Sunday – 5/30/2004

            Removed laser powerup from world b/c was incrementing

                        Ammo of unlimited ammo weapon and causing bugs

            If a laser power up is picked up, nothing happens now

                        No longer adds ammo

            Debugged scoreboard values coming up as 0 on the client

                        They were being received by the client, but showed up as 0

                        Client was rendering the floats using %d so they showed up wrong

            Talked with Nakul about the server changes while I was out of town

            Spent a TON of time on the phone with Justin going over changes

                        For both the client and server

            Completely redid the power up handler

            The power up handler was being called every time the game state

                        Was being updated and used systime to control spawning

                        Added a windows timer event that would control the spawning

                        Removed the systime polling and averaging from the power up handler

                        There was a bug because the update method was being called

                                    Whenever the gamestate was being updated due to a call

                                                In another file (took FOREVER to find)

            Redid power up class to work with the new power up handler

            Modified health powerup so that you can’t go over the max health

            Modifed the disconnect method in the network callback

                        Was only killing one of the 4 timers

                        The server was thus updating after clients disconnected

            Added a bunch more debug messages to the server

                        Ready changes

                        Room changes


            Fixed position bug that occurred when multiple clients beat a room

                        They were all spawning in the next room right on top of each other                                         

                        All were continuously colliding

            Fixed position bug that occurred when clients joined an existing

                        Game that was in another room

                        The client would spawn inside the first room

            Fixed death event positions being in the wrong room

                        Used to smoothly transition the camera back overhead to

                        The position you will be at after you die

                        Was adding position offset for current room player location

                                    In current room, not start position in that room

            Restructured network message types with critical events

                        These are events that the client should handle even when

                                    Out of focus

                        DEATH_YOU, ROOM_CHANE, WINNER, and LOSE messages

            Multiple laser levels – each level up adds to the number of lasers

                        When you get 1 power up, shoot 3 lasers

                        When you get a 2nd power up, shoot 5 lasers, etc

            Fixed bug with clients spawning in w/ bad info like health and name

                        Caused because the update method didn’t modify the data

                                    If the client wasn’t connected or ready

                                    But ready clients were rendered as black so they needed data

            Fixed bug with maximum number of Projectiles being incorrect

                        This was causing bullets not to appear when you pushed fire sometimes

                        Too many bullets were in the world

                        Changing the maximum in the ini file didn’t help fix the problem

                        The code was using the max number of players instead

            Rapid fire now supports unlimited laser levels and a spread

                        Specified by ini file

            When a player dies, they lose all non laser ammo and all laser levels

            Totally restructured projectile settings

                        Projectile settings no longer scattered in Player.ini, Weapon.ini, etc

                        Now reads in rapid fire, rapid fire spread, and spread angle

                                    For each weapon from Projectile.ini

            Added don’t destroy on impact to projectile

                        Can be used for flame (or lightening), rail gun, etc

                        Will continue going even after it hits a player or enemy

            Removed weird network message types that were hanging around from

                        Direct Play tutorials

            Added flame weapon and tweaked setting for it

                        Uses don’t_destroy_on_impact

                        Spawns a bunch of projectiles at random angles

                                    In front of the ship

            Modified shields so that you can’t turn them on if they are already on

                        Was losing a shield when you hit shields when they were on

Monday – 5/31/2004

            Re-indexed screenshots webpage with new photos from yesterday

            Uploaded new binary to downloads section

            Briefed Nakul on some bug fixes

Modified ini files to have EnemyEbola

Modified ini files to have EnemyBoss

Added initiliatizion for each new Enemy in Code

Added settings to network message types for each new enemy

Changed dart to ABomb

Changed flame to lightning

Changed network message type to have PROJECTILE_mmmmm

            Where mmmmm is the projectile type

            Had to modify code EVERYWHERE to change

projectile types from WEAPON_mmmmm etc

Added PROJECTILE_[enemy type] etc to network message types


            Enemies can now have their own bullet types

            Modified Artificial Intelligence to use these new projectile types

When a player dies, weapon changes back to laser

Fire events with projectile types for players modified to use

            PROJECTILE_mmmm instead of WEAPON_mmmm

Added fire events for enemies

Sent laser level and not ammo

            (Level is 0 for 1 bullet, 1 for 3 bullets, 2 for 5 bullets, etc)

When u win, doesn’t fire any more if you won while shooting

                        Sets all moving and shooting flags to false

Fixed bug when there are no enemies causing server to crash

            Due to rapid level switching

Fixed bug where the server crashed when u beat the game

Added mutexes to send methods on server so that you can’t

            Send a message between expect array and the array

            Fixed weird weapon bug

Integrated nakul’s new AI

Fixed rapid fire weapons not stopping shooting when you

            Released fire

Implemented ABomb

Fixed bug where u could shoot when not ready

Implemented Boss Method

            Sets Boss position in room 4

                        Sets Player position in room 4

            Added Boss critical message in network message types

            Position of boss read in from ini file

            Next position of player sent with boss message

-------------------------------------------------------Week 10-------------------------------------------------------

Tuesday – 6/1/2004

            Group meeting – All in attendance

            While playing the game in the lab, we noticed that when we fired projectile

                        The game’s network frame rate slowed down a TON. We concluded that

                        The issue was that for each projectile, we were send a fire event to all

                        Clients.  We decided to only send a start fire and stop fire event

                        For rapid fire weapons.

            Added m_inMiddleOfFire to player to see if we need to send

                        fire events

            Updated network types so that events have a bool used to start / stop fire

            Modified Player’s fire to use the bool

                        If in the middle of shooting, doesn’t send rapid fire messages

            Sends stops fire message when you stop firing

            Updated Player’s setReady() so it doesn’t change position if in boss mode

            Modified client to receive bool for event fire

                        Plays sound loop mode for rapid fire weapons

                        Turns the sound off when receives a stop fire

            Got Server Control panel dialog working by adding another callback in main class

            Added setting for running w/ server control dialog or not

                        Used to allow single player to continue to work

                        If single player set, runs server with old HWND

                        Setting read in from ini file

            Server Control panel complete with the following controls

                        Start server

                        Show console

                        Hide console

                        Next level

                        For each Player


                                    Add 30 health

                                    Add shield

                                    Add life

                                    Laser level increase

                                    Machine gun ammo increase

                                    Lightning gun ammo increase

                                    ABomb gun ammo increase

                                    Rail gun ammo increase

            Control panel 100% integrated and working:

            Restructured network message types with new ordering in structs

                        And smaller data types (short, byte, etc)

                        Should decrease network traffic

            Added num players and room number to server control panel

            Made start rapid fire a critical event

            MAJOR restructuring of Player’s fire to send stop rapid fire critical events

            Had to keep track of how many Players were rapid firing a weapon

                        To send a stop ONLY when the last fire stopped rapid fireing

                        A weapon but to also send a stop fire to a client when he dies

                        So he doesn’t play a sound as he dies

Wednesday – 6/2/2004

            Added static class for handling sounds

            Lots of ini file tweaking in the lab

            Lots of game play testing in the lab

            Removed the multiple projectiles of the lightning gun

                        Was shooting 5 projectiles at once out at slightly different angles

                        Caused many collision events at the same time

                        Looked as good with one projectile and GREATLY improved networking

            Read in server control panel power up values from ini file instead of having

                        Them hardcoded

                        Now add the same amount as a normal powerup

            New network message types with different values for stop fireing

            Critical events for stop rapid fire player and boss

            Critical events for boss death

            Completely removed static sound class

                        Will all be handled on the client in order for positional sounds to work

            Removed all updating / modifying / checking of sound manager class

            Added an add enemy to the main class

            Added a remove enemy function to the main class

            Added server control buttons to spawn and kill enemies

            We were having issues with the number of enemies in the game.  If there

                        Were few enemies in each room, the game would play to slow but

                        If you added more enemies, the game play was right but the rooms

                        Were so overcrowded that it was impossible to play.  To fix this, I added

                        A maxEnemiesOnScreen for each room that adds an enemy when one

Dies up to the max for the room you are in.

            Modified the add enemy method to only add the types of enemies that you

                        Should have in the room you are in

                        When you exceed that limit and want to add more to say extend a demo,

                                    It will add a random non boss enemy type

            Removed negative numbers for player positions after the boss dance

                        GetPrivateProfileInt was returning messed up values with negative numbers

                        Just multiplied the result by negative -1 and solved the problem

            The amount of powerups spawning in was perfect with 1 or 2 players but was

                        Far too little with 4 players.  Tripled the number and the game played MUCH

                        Better.  The game is most fun when played death match style while trying

                        To build up your powerups

            On room change and death the player is now given shields

                        If they have less than 5 shields, they are brought up o 5 shields

            Lasers do less damage

The laser damage was perfect with 1 or 3 lasers, but with

                        More it was IMPOSSIBLE not to get killed by them

                        Also lowered the maximum laser level a player can have

                                    This reduced the max laser damage

                                    Also this helped the network frame rate as with a TON of lasers

                                                The network was slowing down a bunch

            When someone dies, their life is set to 0 so the client renders it correctly

                        Before it could have been very negative and the life bar was messed up

            Boss given more life

Thursday – 6/3/2004

Friday – 6/4/2004

            BIG DEMO!!!!-----> Peterson 108 at 4PM, come watch or play