Tuesday, November 19, 2013

Player Character Movement Queues Interleaved


Not much to point to in the screenshot, but the party is all lined up, prepared to assault the ratmen lying in wait for them.

The game (work in progress at http://bigdicegames.com/RatTower/tower.html ) now keeps track of what character's turn it is, and on their turn, the character can issue one of many orders:

  • rest - does nothing right now, just passes the turn. Later on, PCs might recover HP when resting.
  • move (adjacent) - move into an adjacent hex. Updates visibility.
  • move (distant) - really, the same thing as above, but it uses A* to find a path to the target hex and queues the path as a series of move orders. The interesting(?) bit is that you can have all of your characters with movement queues, and they each do one move at a time. Taking turns, like mom used to tell you.
There are additional orders that I intend to hook up, someday:
  • attack(melee) - characters that have melee attacks (all characters?) will be able to engage an adjacent enemy.
  • attack(ranged) - characters with ranged attacks (the archer PC, the archer ratmen, maybe the pike ratmen) can attack from a distance
  • retreat off the board - there are special "Retreat" hexes on the board. A character that reaches these may leave the combat. Shame!
  • cast magic spell - the guy on the right in the screenshot above is supposed to be a spellcaster. He was supposed to be a spellcaster a year and a half ago, but I never got that into The Cave of the Rat King. What sorts of spells? I don't know - healing, magic missile. There are options.
  • manipulate level object - open a door, pull a lever
  • use inventory item - I don't have any of these now, but one might imagine having potions or scrolls

My TODO list keeps getting longer - I'm using it largely as a brainstorming dumping ground, without any attempts to deduplicate tasks. Some of the next few things:
  • enemy movement - could be just random movement, to begin with. Pick an empty space, move in to it.
  • enemy attacking (melee) - if an NPC has an adjacent PC, attack - roll to hit, if hit, roll damage.
  • combat log - I kind of want to split the window up into at least two panes, one for combat results and other ongoing text information, one for the main map view. Maybe also buttons for the different orders.
  • character death - this goes along with combat - after a few successful hits on a character, that character is removed from the board. 
  • better prompting of player orders - put a cursor underneath the current character, hold on the current character to see the actions.
  • last man standing - if all of the PCs are dead or removed, the player loses. If all of the NPCs are gone, the player wins.
And then there's longer term ideas, including having 10 different levels, different weapons and armor - all of the stuff an RPG really needs.

No comments:

Post a Comment