Example of FSM Building: Combat

A past side project included building Wizardry-style combat. That’s a very specific kind of turn-based combat, best displayed in Wizardry VI and Wizardry VII.

wizardry

I call this phased combat. The player enters orders for each of her party members in turn, shown in the screen shot. Each party member can make choices like Fight, Parry, cast a Spell, Run, and so on. Once she’s entered all the party choices, combat begins!

Notice that there are four sets of enemies–those are enemy groups. Attacks and spells target one of the groups, either going against the whole group (like a fireball) or choosing one of the group automatically. Group order matters, just like party organization (front to back) matters because only ranged weapons can attack from the back slots or enemy groups.

After player party orders are entered, both party and enemy orders execute, fastest first (as determined by a speed stat). This leads to an exciting “what will happen next?” effect you don’t always see in traditional turn-based combat. That’s an overview of what I’m building.

Here’s how my combat FSM started out–you can see the direct translation from system concept to flow of the FSM.

Screen Shot 2015-02-21 at 10.22.19 AM

It’s very basic at this point–it doesn’t handle death, for example, or the concept of enemy groups. It doesn’t have the combat order choices spelled out. The final state machine will be much, much more complex. Seeing it at this early stage, though, helps demonstrate how systems can translate very directly into FSMs. The FSM doesn’t just make it easier or faster to create the combat system: it helps me understand what I’m building.

Now that I have the skeleton, I dive right in at the start. I flesh out building the combat screen, which I won’t discuss in this post because the nuts and bolts of it aren’t important for this post.

Related Posts

Storify on being a game designer

Prompted my a news story back in September that Halfbrick had laid off the last of its designers, I chatted on Twitter about some of the challenges in being a designer. I’ve been updating the

Read More »

Example of FSM Building: Combat

A past side project included building Wizardry-style combat. That’s a very specific kind of turn-based combat, best displayed in Wizardry VI and Wizardry VII. I call this phased combat. The player enters orders for each of

Read More »

Segmenting (and not repeating) FSMs

I’ve been talking a lot on Twitter lately about creating my solo game, and I’m going to start saving them here as well. Today, I talked about why you often want FSMs on stand-alone gameobjects,

Read More »

Don’t get stuck on copy

Staring at an empty dialog window? Trying to mock up UI? It sounds absurd, but I’ve seen many designers get hung up on placeholder text. If you have text space to fill, grab some lorem

Read More »

Overcoming game dev resistance

Over the years, I’ve developed what I call the “We’re Guessing” voice. It’s this little whisper in my head, when I’m hip-deep in theory or debate over a feature, that says, “You’re guessing what will work.

Read More »