Saturday, December 25, 2010

Progress Report (12/25/2010)

Merry Christmas!


With the big holiday, there wasn't a whole lot of time for Team Laser Combat.  My only goal for the week was to get the characters on screen, and I was only marginally successful.  First, the characters were about ten pixels too tall, which I already fixed.  But the biggest issue is that only some of the characters show up, and only some of the time.


Look!  Characters!  Too bad that was only half of the characters in the game...plus they're a bit large for the scale.
Accomplishments:
  • Placeholder images for the characters are now appearing on screen!  Well...sometimes.  Most of the characters are not showing up, despite the fact that they are being initialized with correct spawn points. Fixing this is obviously critical and currently my primary source of stress.
  • Added keyboard controls so now we can scroll around the map to see the entire game board.
Known Issues:
  • Character graphics do not always appear on the game board.  The server assigns valid spawn points to them, the client receives them, but for some reason they don't always show up on screen.
  • The server sometimes stops working before creating all of the AI players.
  • Network latency causes character upgrades to not show up right away.  The client needs to wait for the updated character to return from the server before returning to the team screen.
  • The color cycle control on the team creation screen throws an exception when there is only one color remaining to choose from.
  • Chat messages get lost when a user in multiplayer mode switches between the lobby and the team/character configuration screens.
  • When a player drops off, their team data is orphaned.  The server needs to recognize this and place the orphaned team under AI control.
Next Steps:
High Priority:
  • Get the characters to show up on the game screen!  All of them, every time!  (Grr...)
  • Investigate ways to dynamically color the team uniforms.  Experiment on the placeholders.
  • Create the "whose turn" display.
  • Create the character data viewer.
  • Fix the team color selection for the eighth human player.
Medium Priority:
  • Create the event log.
  • Create the action button menu.
  • Address the server errors during AI creation.
  • Finish voice scripts for narration.
  • Finish asset lists for current set of level designs.
  • Formalize the flowchart for the AI logic.
Low Priority:
  • Create the token factory and displays.
  • Finish the team creation screen.
    • Put in the floor image for the captains to stand on.
    • Replace plain gray buttons with captain character images.
  • Create command line interface for server so it can be launched and configured remotely.
  • Finish the level design guide.
  • Design the TLC web site.
  • Get coin display graphics from the art team.
    • Add it to the team configuration screen.the character configuration screen and the recruitment screen.

Saturday, December 18, 2010

Progress Report (12/18/2010)

It feels so good to have the actual gameplay elements underway!  The first interactive HUD elements are in place and functional, and the spawn point markers are being successfully processed.

This one screen shot shows evidence of all of this week's progress.  The team status display is shown, it shows an AI team that has successfully recruited an officer, and the spawn point markers have been removed and processed automatically by the game server!

Accomplishments:
  • The AI players now spend their coins.  They go shopping to buy upgrades and recruit characters, and the server logs it all.  You can see some evidence of this in the screen shot above, in the team status viewer.
  • Speaking of the team status display, it's completely functional now.  Look on the screen shot above.  The arrow buttons scroll through the teams in the game, listing their characters and showing their health levels.  Can you guess what the little "X" button in the corner does?
    • The process of implementing this display element exposed some minor bugs, but those issues have all been resolved. 
  • The HUD button menu has been started, but so far it only contains buttons for toggling the team status viewer and the in-game options menu.
  • Speaking of the in-game options screen, it's done and it works.  It contains options for toggling the audio and exiting the program.
  • The spawn point functionality is working.  Notice in the screen shot above that the spawn point markers are no longer visible.  They have been filtered out of the game map and added to a list that the server will use when placing the characters on the board.
Known Issues:
  • The server sometimes stops working before creating all of the AI players.  This seems to happen only when five or more AI players are selected.
  • Network latency causes character upgrades to not show up right away.  The client needs to wait for the updated character to return from the server before returning to the team screen.
  • The color cycle control on the team creation screen throws an exception when there is only one color remaining to choose from.
  • Chat messages get lost when a user in multiplayer mode switches between the lobby and the team/character configuration screens.
  • When a player drops off, their team data is orphaned.  The server needs to recognize this and place the orphaned team under AI control.
Next Steps:
High Priority:
  • Create some stand-in placeholder graphics for the game characters until the artists can give me the real ones.
  • Investigate ways to dynamically color the team uniforms.  Experiment on the placeholders.
  • Create the "whose turn" display.
  • Create the character data viewer.
  • Fix the team color selection for the eighth human player.
Medium Priority:
  • Create the event log.
  • Create the action button menu.
  • Address the server errors during AI creation.
  • Finish voice scripts for narration.
  • Finish asset lists for current set of level designs.
  • Formalize the flowchart for the AI logic.
Low Priority:
  • Create the token factory and displays.
  • Finish the team creation screen.
    • Put in the floor image for the captains to stand on.
    • Replace plain gray buttons with captain character images.
  • Create command line interface for server so it can be launched and configured remotely.
  • Finish the level design guide.
  • Design the TLC web site.
  • Get coin display graphics from the art team.
    • Add it to the team configuration screen.the character configuration screen and the recruitment screen.

Saturday, December 11, 2010

Progress Report (12/11/2010)

First off...HAPPY BIRTHDAY, MOM!

Now I can get down to business.  :)  It first appeared as though regression were going to be the theme of the week.  Much of the existing functionality was destroyed and then restored in the name of progress.  Was it worth it?  YES!  Old bugs were fixed, reliability of existing functionality was bolstered, the overall testability of the software was greatly enhanced, and the way is being paved for some fun and somewhat sophisticated artificially intelligent computer opponents.

As of this writing, those computer opponents are giving me a whole heap o' trouble, but I'll conquer 'em.  It's just a matter of time...

Look!  Real AI players are waiting in the lobby!


Accomplishments:
  • Started the week with a massive refactoring effort to prepare for the AI.  
    • Changes to the central data facade exposed a critical error -- the game options were never being saved to the server!  The reason why it worked before is because the host and the server were sharing the same data components.  However, the AI players are going to need their own sets of data, which means that I needed to separate the server's data from the players' data.  Once I did that, the server no longer recognized the game options selected by the host because the game options were never being sent across the network.  Fortunately, that was an easy fix.
    • As a result of all that refactoring, the TLCDataFacade class is no longer a classic Singleton.  (For all I know, it may represent a whole new design pattern that hasn't been defined yet.)  Its instantiation now requires a unique "data ID" that is used for indexing an internal collection of data instances, so that when a client object makes calls, the facade delegates those calls to the appropriate instance.  This way, multiple clients (such as AI players) can live in the same address space without stomping all over each other's data.
      • Why not just aggregate the data facade into the AI player class, you ask?  Because some subsystems require that same global point of access that the Singleton provided.  Either that, or I undergo another, even more massive refactoring.  No, thanks!
  • The captains now show up reliably on the team rosters.  It's about time!  That bug has been in the Known Issues list for ages.
  • Some AI players are now being created successfully, but not all of them.  For some reason, the server seems to completely freeze after creating the first couple of AI players.
    • Notable exception:  After a fresh reboot of my laptop, I was able to set up three different games in a row where I had one or two human players and one to three AI players, and it worked.  According to the server logs, the AI was even able to create teams, recruit captains, and signal to the game server when they were ready to begin playing.  (Note to self:  Investigate using ReentrantLock objects on commonly used server methods.)
  • Did the very first connectivity test using all eight human clients.  Everything worked great until the last one -- it connected just fine but the client program crashed due to an error in the color selector.  Weird. 
Known Issues:
  • The server sometimes stops working after creating a couple of AI players.
  • Network latency causes character upgrades to not show up right away.  The client needs to wait for the updated character to return from the server before returning to the team screen.
  • The color cycle control on the team creation screen throws an exception when there is only one color remaining to choose from.
  • Chat messages get lost when a user in multiplayer mode switches between the lobby and the team/character configuration screens.
  • When a player drops off, their team data is orphaned.  The server needs to recognize this and place the orphaned team under AI control.
Next Steps:
High Priority:
  • Finish the AI for the lobby state.
    • Still needs to be able to "go shopping" and spend coins on upgrades and recruitment.
    • Server errors during AI creation need to be addressed.
  • Create the team status viewer.
  • Create the event log.
  • Create the "whose turn" display.
  • Create the character data viewer.
  • Create the HUD button menu.
  • Create the action button menu.
  • Create an in-game options screen.
Medium Priority:
  • Finish voice scripts for narration.
  • Investigate ways to dynamically color the team uniforms.
  • Finish asset lists for current set of level designs.
  • Formalize the flowchart for the AI logic.
  • Fix the team color selection for the eighth human player.
Low Priority:
  • Create the token factory and displays.
  • Finish the team creation screen.
    • Put in the floor image for the captains to stand on.
    • Replace plain gray buttons with captain character images.
  • Create command line interface for server so it can be launched and configured remotely.
  • Finish the level design guide.
  • Design the TLC web site.
  • Get coin display graphics from the art team.
    • Add it to the team configuration screen.the character configuration screen and the recruitment screen.

Saturday, December 4, 2010

Progress Report (12/04/2010)

This week's accomplishments were not numerous, but they were of vital importance.  The project is in a new phase now where the focus has shifted to game play initialization, which involves fairly significant effort in the user interface, the network client modules, and most of all, the game server.

This is the very first screen shot of the actual game screen, though it's still missing the UI.  Those red balls won't be visible in the final game -- they're just spawn point markers that the server will process and then filter out.
Accomplishments:
  • Decided that the simplest way to organize the level assets, at least during development, is to superimpose LIME's directory structure onto the game's directory structure.  Overall, it's a messy approach, but it will save a lot of time and be less error prone than constantly copying files around whenever changes are made.  I may return to this issue and reorganize things once most of the levels have been completed.
  • The game screen is here!  It's not very interactive yet, but the loading screen loads it and then the game screen appears with an actual level loaded into the main viewport!  (Screen shot above.)  That's one small step for a programmer, one giant leap for Team Laser Combat.
  • Encountered a problem in regression testing.  A couple of months ago, when I added the new layers, I did not test the map renderer adequately.  As a result the rendering order was causing a problem when an obstacle was placed too close to a wall.  So I fixed the rendering algorithm, and actually optimized it quite a bit in the process!  (Yay!)  Unfortunately, there will now be issues when animating sprites from one map cell to another, and visual glitches when a tall object has a ceiling in front of it, but I already have a fix in mind just in case it ends up being a real problem.
  • Started experimenting with palette manipulation and image processing so that the characters' uniforms can be colored according to their team color.  I hope to have a working prototype soon.
Known Issues:
  • Intermittently, the captain will not show up on the team roster the first time the team screen is opened.  It works almost all the time, but not always.  This issue is caused by network latency, and all attempts to correct it have failed so far.  
    • However, there is an easy workaround -- opening the Help dialog (or any other screen) and closing it again triggers a full refresh of the screen.
  • Chat messages get lost when a user in multiplayer mode switches between the lobby and the team/character configuration screens.
  • When a player drops off, their team data is orphaned.  The server needs to recognize this and place the orphaned team under AI control.
Next Steps:
High Priority:
  • Create the AI for the lobby state.
    • Needs to be able to create a team, spend coins at random, and then signal ready to the game server.
  • Create the team status viewer.  (Dependent upon lobby state AI.)
  • Create the event log.
  • Create the "whose turn" display.
  • Create the character data viewer.
  • Create the HUD button menu.
  • Create the action button menu.
  • Create an in-game options screen.
Medium Priority:
  • Finish voice scripts for narration.
  • Investigate ways to dynamically color the team uniforms.
  • Finish asset lists for current set of level designs.
    • Evaluate Sarah's level designs, too.
  • Formalize the flowchart for the AI logic.  (Due January 3, 2011.)
Low Priority:
  • Create the token factory and displays.
  • Finish the team creation screen.
    • Put in the floor image for the captains to stand on.
    • Replace plain gray buttons with captain character images.
  • Create command line interface for server so it can be launched and configured remotely.
  • Finish the level design guide.
  • Design the TLC web site.
  • Get coin display graphics from the art team.
    • Add it to the team configuration screen.the character configuration screen and the recruitment screen.