Monday, July 22, 2013

Development update

Foe attacks have been refactored into natural weapons (melee and ranged), spell-like abilities and plain old spell books. UnifiedActor now has access to all three.

Character races can now be assigned natural weapons, but the player can't yet make use of them. In time, in time. Races and character classes will also receive multiple spell-like abilities, rather than the current single special ability. Those two changes will need a UI update...

On the other end of the change, I've written a simple Goal-Oriented Action Planner in a reasonably general-purpose way. World state is stored in a set of booleans. Given the starting and desired world states and a set of actions that each have a cost and change the world state, the AI can plot (via an A* graph search) the least-cost path to the desired world state. Credit goes to the GPGOAP project for showing me how easy such a thing could be to implement.

So the end game in sight is that every UnifiedActor can express a list of possible combat actions every round. Players select them via the UI. Foes will run their list of actions through the GOAP AI and use what pops out. We're still some way off from that, and the magic will be in expressing cost and world state changes of every single foe combat option. Garbage in will mean garbage out, as always.

No comments:

Post a Comment