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.

No comments:

Post a Comment