Showing posts with label bugs. Show all posts
Showing posts with label bugs. Show all posts

Friday, January 6, 2012

Progress Report (01/07/2012)


I haven't done a proper progress report since August, but that doesn't mean there's been no progress.  On the contrary, some great things have happened in that span, which can be seen in other posts that I've made in the meantime.


Accomplishments:
  • Designed a mock-up of the user interface for the token inventory display. (More to come in a follow-up post.)
  • Again investigated the bug with the actions menu, but the problem still remains.  Something is keeping the human players' characters from performing two Move actions back-to-back.  
    • The workaround of just trying again still works. It alternates -- works the first time, fails the second, works the third...and then you're out of action points.
    • The bug does not manifest in the Draw Token action. It's specific to Move only.
  • Fixed the bug where you could move your characters an unlimited number of times as long as you left one character stationary.
  • Completely refactored the engine's network modules to support a non-networked single player mode. (The last eight posts are all about different aspects of this effort.)
  • Created the token sources and token inventory system.
    • Also implemented the Draw Token action. 
    • Combat Tokens, Heal Tokens, and Grenade Tokens have been tested thoroughly and work beautifully.
    • Still need to finish Power Tokens.
Known Issues:
  • Something is keeping the human players' characters from performing two Move actions in a row.  
  • The game gets stuck in the lobby if the host is a spectator rather than a player.
  • Several bugs specific to Join LAN mode:
    • 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 doesn't turn control over to the player until the host has signaled ready. (I believe this is the exact same bug mentioned above that traps players in the lobby.)
    • Chat messages get lost when switching 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:
  • Add Power Tokens to the token factories.
  • Create the token display GUI.
    • AFTER this is done, make Draw Token deduct action points as specified in the game design document.
  • Slow down the AI so humans can see what's happening.
  • Add the Draw Token action to the AI logic.
  • Fix the actions menu bugs mentioned above.
  • Create the HUD's event log display.
Medium Priority:
  • Investigate ways to dynamically color the team uniforms.  Experiment on the placeholders.
    • If this works, add the ability to dynamically color MHFont objects too.
  • Add hazards and bonus spaces to the game board.
  • Create the in-game chat component.
    • But first, fix the issue with the lost messages by making the data structure static.
  • Finish the level design guide.
  • Finish asset lists for current set of level designs.
Low Priority:
  • Model the characters.
  • Animate the characters using Shaun Hager's animations.
  • Add sound effects to the actions menu buttons.
  • Add validation to the actions menu so that unavailable actions have a different appearance.
  • Implement the Heal action.
  • Implement the Attack action.
  • Implement destructible containers.
  • 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 chat, just for fun.
  • Design the web site.
  • Get coin display graphics from the former 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.
  • Test and troubleshoot the multiplayer modes.

Wednesday, December 21, 2011

Testing the New Client/Server Arrangement

After the brief delay caused by my hard drive failure, the code is now in place for the local versions of the client and server.  The first round of testing has produced a pretty intimidating to-do list. Here's what went down:

The Procedure

I established a testing procedure that I believed would involve a sample of the affected functionality and uncover any regression issues. This is not a comprehensive test plan, but it did involve a good representative sample of client/server interaction.
  1. Select Single Player from the main menu.
  2. Log in as myself (Michael).
  3. Select a team color.
  4. Recruit a team captain.
  5. Send a chat message from the Lobby.
  6. Recruit another character.
  7. Upgrade a character.
  8. Signal ready.
  9. Move all characters through two or three rounds in the game.
  10. Cycle through the team and character info displays.

The Results

I went through those same steps four times in a row without modifying the code. The test results follow.

Step Test 1 Test 2 Test 3 Test 4
1 Passed Passed Passed Passed
2 Passed Passed Passed Passed
3 Passed Passed Failed (Server registered me as a spectator.) Passed
4 Passed Passed Unable to proceed. Passed
5 Failed (Engine defect.) Failed (Engine defect.) Failed (Engine defect.)
6 Passed Failed (Character list had disappeared.) Passed
7 Passed Unable to proceed. Passed
8 Passed Passed
9 Passed Failed (My characters worked but one AI got duplicated.)
10 Passed Passed


Conclusion

There is more work to be done!  I'm going to tackle one defect at a time and stick with these same ten steps until they work reliably.  Then I'm going to elaborate with a more detailed test plan.

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?

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, February 26, 2011

Progress Report (02/26/2011)

With this being final exam week at work, in addition to the perpetually problematic class I'm taking in grad school, there was very little time to work on the project this week.  What's more, the few tangible things that I did accomplish revealed a perplexing and disturbing bug in my LIME tool:  the floor detail layer, which has barely been tested until now, has some sort of random malfunction that cascades to the other layers.

On the brighter side, I finally finished my A* pathfinding implementation that I started all the way back in 2004, when I first designed and implemented the first version of the map data structure.  Well, it's not completely finished -- I still need to parameterize it with a way to specify the searchable directions.

Tomorrow I'm heading to GDC 2011, so I'm in for a busy week.  Still, I hope to spend a little time with this beloved project at some point.


Accomplishments:
  • Finally, after seven years, I have finished implementing the A* pathfinding algorithm for the tile maps in MHFramework.
  • Established a simple geometric pattern for giving an illusion of thickness to floors and platforms.  Tested it successfully, but then discovered the problem mentioned above with the floor details in LIME.
  • Wrote some more thorough algorithms for fixing a few of the ongoing annoyances, such as:
    • Optimizing the character data broadcasts.
    • Fixing the problem with chat messages getting lost between screen transitions.
    • Correcting the issue with the server randomly rejecting a connection after it has been accepted.
    • Correcting a tiling issue on the right-facing wall tiles generated by the MHFramework Wall Tile Transformer. (They're one pixel off from mirroring the left-facing walls and now I know why.)
  • Jotted down some notes and plans for moving forward as well.  For example:
    • The client and server responsibilities and requirements for handling the Move command have been established and pseudocoded.
    • Expanding the Wall Tile Transformer to output a greater variety of wall tile shapes, such as thin walls and walls that are perpendicular to the camera.
    • Expanding the Floor Tile Transformer to automatically generate "side" tiles compliant with the geometric patterns that I established this week.
    • Changing the background color on the LIME viewport to adapt to different tile sets.
Known Issues:
  • The floor detail layer is highly unstable and must be fixed very soon.
  • 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.  This is only an issue when setting up a game with eight human players.
  • 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 problems with the floor detail layer.
  • Investigate ways to dynamically color the team uniforms.  Experiment on the placeholders.
    • If this works, add the ability to dynamically color MHFont objects too.
  • Broadcast and handle the "whose turn" message..
    • Create the "whose turn" display to show it.
  • Implement the Move action.  This will involve:
    1. Decoupling the characters from the map structure.
    2. Implementing network messages for the Move command.
    3. Implementing the UI for selecting a destination.
    4. Implementing a pathfinding algorithm.
    5. Implementing path following behavior.
Medium Priority:
  • Create the in-game chat component.
    • But first, fix the issue with the lost messages by making the data structure static.
  • Fix the team color selection for the eighth human player.
  • 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.
  • Finish the level design guide.
  • 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, January 22, 2011

Progress Report (01/22/2011)

Because of various things that I had to do in support of my lovely wife, I was stuck in a few situations this week where I was unable to work on my job or my homework.  That means I actually had a little bit of time here and there to work on this project instead!  My accomplishments for the week, in the order listed below, consist of one big accomplishment, one medium, and two small ones.  So it hasn't been a week of hyper-productivity like I had last month, but it's far better than last week when I accomplished nothing whatsoever.  We must be thankful for what we get...and only grumble softly under our breath.

Thank goodness it's all back!  Don't worry, there won't be nearly so much garbage text on screen in the finished product.  That's mostly for debugging purposes.
Accomplishments:
  • Fixed the largest of the various server issues!  Crashes are now far rarer than they were before.  The main issue ended up being a huge mistake I made when trying to improve feedback during AI creation.  I had simply placed some things out of order.
  • Further optimized the AI creation procedure.  It still takes too long, but it has definitely taken a step in the right direction.
  • Devised a plan for handling the lack of feedback during AI creation:  Just put a message on the lobby screen telling the user what's going on!  It's in there; just gotta tweak it a bit.
  • Experimented with layouts for the octagonal spaceship landing platforms.  I think the design will work very, very well...for aesthetics as well as game play.
Known Issues:
  • The game setup process takes much too long to create and initialize the AI players.  Gotta optimize that and try to speed it up.
  • 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.  This is only an issue when setting up a game with eight human players.
  • 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:
  • Beef up the server...again.
  • Create the action button menu.
  • Investigate ways to dynamically color the team uniforms.  Experiment on the placeholders.
  • Create the "whose turn" display.
  • Create the character data viewer.
Medium Priority:
  • Fix the team color selection for the eighth human player.
  • 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.
  • 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.