Saturday, August 20, 2011

Progress Report (08/20/2011)


The slim chance of finishing my degree earlier than anticipated has raised the priority of reaching the alpha stage on this project, so I've been forcing it into any free moment I can find lately!


Accomplishments:
  • The players take turns correctly now.  That bug is dead and gone.
  • Investigated the bug with the actions menu, but the problem still remains.  Something is keeping the human players' characters from performing two actions back-to-back unless the actions menu is artificially refreshed.  
    • I put over three hours into troubleshooting this problem and still haven't found a solution.  Fortunately, as I mentioned in my previous post, there is an easy workaround by either trying again or refreshing the menu.
  • Discovered a bug that's only possible when you have multiple characters on your team.  As long as you leave one of your characters stationary, then your other characters can move an unlimited number of times until you move your stationary character and use up his action points.  Should be an easy fix, but I haven't tackled that one yet.
  • Gave the design doc an overhaul to update it with the recent requirement changes and fill in some of the "to do" items.  The new game design document is version 2.3.
Known Issues:
  • Something is keeping the human players' characters from performing two actions back-to-back unless the actions menu is artificially refreshed.  
  • The game gets stuck in the lobby if the host is a spectator rather than a player.
  • As long as you leave one of your characters stationary, then your other characters can move an unlimited number of times until you move your stationary character and use up his action points.
  • Sometimes network errors will cause an AI to be disconnected immediately after it connects.
  • 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:
  • Fix the action menu bugs mentioned above.
  • Create the token factory.
  • Create the token inventory system.
  • Create the token display GUI.
  • 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.

Thursday, August 18, 2011

Taking turns -- it works!

Yes!  My AI players are now taking turns correctly.  They're finally playing nice with one another like good little boys and girls.  My proposed hypothesis was correct -- the necessary code wasn't being invoked by the proper message handlers.

On that note, I'm goin' to bed.  I'll tackle the Move command bug tomorrow.

Thank you and goodnight!

Tuesday, August 16, 2011

About those two bugs I mentioned...


In my previous post, I mentioned that there were two known issues remaining in the turn-based functionality.  In the interest of honesty, disclosure, and bug tracking, I thought it might be a good idea if I actually record what those issues are.  So here ya go.

First and most importantly, the server fails to advance to the next player once a player has finished his/her turn.  There is no workaround, but I do have an idea about what's causing it: the location of the functionality.  I think I put it in the message handler for the CHARACTER_MOVE message, but I don't think that message is actually being used.

Second, the Actions menu has a bug where you can only move a character one time.  If you try to move again, the character ignores your command.  There is an easy workaround for the time being:  If you click the Test button on the HUD, it resets the menu and your character can move again.  The solution to this problem is most likely in the initialization of the menu, which would explain why resetting the menu fixes the problem.

Monday, August 15, 2011

Looking to the Horizon

I'm getting pretty close to fixing all the bugs with character movement and taking turns (there are just two known issues remaining), so it seems like a good time to lift my head, look around, get the lay of the land, and see where I'm headed next.  Here's the plan for the near future as I see it right now.



Sunday, August 7, 2011

The "Whose Turn" Bug -- Solved!

The problem apparently had something to do with static vs. non-static variables.  When I made the "whose turn" value static, the problem went away, implying that perhaps the current player's data was not being updated when it should have been.


This has led me to the next bug:  Action points are not being deducted when characters move.  Ah, a fresh new challenge!  Yay!


Thursday, August 4, 2011

The "Whose Turn" Bug -- Update 2

The proposition I made in my last post was indeed correct -- the AI players are not receiving the notification that the program has transitioned from the lobby state to the game state.  The question of "why" still remains.

Just wait.  I'll figure this out.  Eventually.

Monday, August 1, 2011

The "Whose Turn" Bug -- Update

My last test showed that the method in question isn't even getting called.  This means that I must turn my attention to a higher level and find out what could be prohibiting this condition from being evaluated.  The most likely candidate is that the AI players are not being notified that the server has transitioned into game state and the game has begun.

More to come after I get another chance to look at the code.  Who knows when that will be?