Thursday, June 23, 2011

The Characters Are Moving!

After days of frustration, my characters are finally moving correctly.  Here's what was goin' on:

First, the characters would move to their new positions, but the map would still hold onto their references in their previous positions.  This caused the pathfinder to incorrectly interpret the characters' previous positions as obstacles because it thought there was still a person standing there.

The problem there was that the characters' positions were only being updated on the local machine and were never being broadcast across the network.  This was causing a problem because the corrective code that removed the old references was in the game client where character updates are processed.

Once this was corrected, another problem emerged. The characters were moving, but they were leaving ghosts rendering in their previous positions.  Basically the same problem as before, except now you could actually see the characters' images in their old positions.

The problem with that one was that the characters weren't clearing their old positions before moving into the new positions.  Once that was corrected, there were no more issues.

There are a couple of things I really want to fix before moving on to the next steps.

  1. Get the characters to animate along the paths.  Some code for this is already in place, so I just need to finish it.
  2. Remove faulty or unnecessary code that was written for troubleshooting the issues mentioned above.

Speaking of next steps, I have a few possibilities for what the next steps will be.

  • The combat token system.  This leads to:
    • Token source.
    • Token inventory.
    • Token selection UI.
    • Attack, defend, heal, draw, and teleport actions.
      • Attacking leads to implementation of containers.
  • Broadcasting and handling the "whose turn" message.  This leads to:
    • Implementing action points.
    • Creating the "whose turn" UI.
    • Adding gameplay intelligence to the AI players
  • Random events, including:
    • Random injury.
    • Random bonus item.
  • Finishing the HUD, including:
    • Event log display.
    • In-game chat component.
    • "Whose turn" display.

Thursday, June 16, 2011

The Pathfinder is Functional

After a long "dry spell" of being far too busy to touch the project, I'm back with a vengeance.  Finally today I was able to sit down with the project to do some analysis and write some code.  The result: I solved the problem I was having a couple of months ago when I left off -- the pathfinder appears to be functional.

The circles represent all of the places that Trooper Mandy can go.  The filled circle was the one that the mouse pointer was hovering over at the time the screen shot was taken. Valid destinations are determined by the character's equipment and a die roll.
This piece of the puzzle is not finished, however.  There are still several steps remaining in this subsystem, such as:

  • A lot more detail on the interface, like...
    • Who's selected.
    • How many movement points the selected character has.
  • Path following behavior.
    • And the associated character animations, of course.
  • A way to capture and process the selected destination tile.