Friday, July 29, 2011

The "Whose Turn" Bug

The AI players are still refusing to acknowledge their turns.  I haven't yet had a contiguous block of time to do an in-depth debugging session on it, but I have verified a few minor elements of the process.  This is just a note to keep track of what has been attempted and what is to come next.


Hypothesis #1:  The AI characters weren't moving because they had no action points assigned.
Procedure:   Manual trace of source code to identify logic that may be prohibiting the movement functionality.
Test Results:  Action points are not yet being validated by the server, so this is irrelevant.


Hypothesis #2:  The AI characters aren't receiving the notification that it's their turn.
Procedure:  Console output from both client and server whenever the "whose turn" message is sent or received.
Test Results:  All clients, including the AI, are receiving correct values from the server regarding whose turn it is.


Hypothesis #3:  The method for determining whether a player is a human or an AI is faulty.
Procedure:  Trace the isAIPlayer() method to validate its functionality.
Test Results:  I have not had time to do this yet.  It is the very next thing I will attempt.



At the moment, there are no further hypotheses regarding this defect.  I'm always open to suggestions if anyone has any ideas that I haven't thought of yet.

More to come on this issue.

Saturday, July 16, 2011

Progress Report (07/16/2011)

Again, my job has kept me from doing much with the project, but I have been paying some attention to it in the few moments that time has allowed.  Really, there's just one thing that has been drawing my attention:  the refusal of the AI characters to move when it's their turn.

Based on the accomplishments listed in the last report, the priorities of some tasks have been rearranged.


Accomplishments:
  • Nothing quite...but efforts are underway to get the AI players to acknowledge their turns.
Known Issues:
  • 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 lobby in multiplayer mode doesn't turn control over to the player until the host has signaled ready.
  • 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:
  • Make the AI characters move when it's their turn.
  • Formalize the flowchart for the AI logic.
  • Create the token factory and displays.
  • Implement the Draw Token action.
Medium Priority:
  • Sometimes network errors will cause an AI to be disconnected immediately after it connects.  This causes the lobby screen to wait indefinitely for a player who will never arrive.  The server should detect this and try again to create the AI player.
    • Solution: Refactor the engine's networking modules to use the Observer Pattern. This will also correct the "Known Issue" mentioned above with abandoned team data.
  • Investigate ways to dynamically color the team uniforms.  Experiment on the placeholders.
    • If this works, add the ability to dynamically color MHFont objects too.
  • Create the in-game chat component.
    • But first, fix the issue with the lost messages by making the data structure static.
  • Create the HUD's event log display.
  • Finish the level design guide.
  • Finish asset lists for current set of level designs.
Low Priority:
  • Implement the Heal action.
  • Implement the Attack action.
  • Finish the "whose turn" display.
  • Finish voice scripts for narration.
  • Finish the team creation screen.
    • Put in the floor image for the captains to stand on.
    • Replace plain gray buttons with captain character images.
  • Let's see if we can allow the player to change video modes dynamically from the options screen so they don't have to close the program and rerun it to change resolutions.
  • Make the AI players taunt each other in the lobby chat, just for fun.
  • Design the 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.
  • Replace the temporary column header graphic on the character equip screen.

Saturday, July 2, 2011

Progress Report (07/02/2011)

I'm posting a progress report because I've actually made some progress...and also because it's been a while.



Accomplishments:
  • Movement for the host's characters is working beautifully.
  • Movement for the other players works sometimes, but...
    • ...the path following animation doesn't happen on remote machines.
    • ...sometimes the characters are getting duplicated on the guest machines.
    • ...sometimes the team status display throws an exception.  This is a complete mystery at the moment.
    • ...the lobby doesn't let the guest players in until the host signals ready.  This will be a high-priority fix when I turn my attention to multiplayer mode.
  • Created a primitive version of the "whose turn" display.  Good enough for now, but not really what I want for the final version.
  • Drew a couple more level designs better suited to the new "maximum players" requirement.
Known Issues:
  • 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 lobby in multiplayer mode doesn't turn control over to the player until the host has signaled ready.
  • 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:
  • Make the AI characters move when it's their turn.
  • Finish the level design guide.
  • Create the "whose turn" display.
Medium Priority:
  • Sometimes network errors will cause an AI to be disconnected immediately after it connects.  This causes the lobby screen to wait indefinitely for a player who will never arrive.  The server should detect this and try again to create the AI player.
    • Solution: Refactor the engine's networking modules to use the Observer Pattern. This will also correct the "Known Issue" mentioned above with abandoned team data.
  • Investigate ways to dynamically color the team uniforms.  Experiment on the placeholders.
    • If this works, add the ability to dynamically color MHFont objects too.
  • Create the in-game chat component.
    • But first, fix the issue with the lost messages by making the data structure static.
  • Create the HUD's event log display.
  • 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.
  • Implement the Draw Token action.
  • Implement the Heal action.
  • Implement the Attack action.
  • Finish the team creation screen.
    • Put in the floor image for the captains to stand on.
    • Replace plain gray buttons with captain character images.
  • Let's see if we can allow the player to change video modes dynamically from the options screen so they don't have to close the program and rerun it to change resolutions.
  • Make the AI players taunt each other in the lobby chat, just for fun.
  • Design the 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.
  • Replace the temporary column header graphic on the character equip screen.