This is a blog about strategies and tactics I have learned, mostly from my experience of playing 3D fighting games and reading classic strategy books. Oh... and Java.

Saturday, March 21, 2009

The difficulty of designing a Final Fantasy-like battle system

I haven't mentioned this before, but in my free time, I've been developing a game. It's a turn based game like Final Fantasy / Dragon Warrior, but you play online with other people. You control a party of people and fight against another party of people. When one character is choosing his ability, game time freezes. Once he chooses his ability, he chooses a target to use it on. Then, time progresses a "tick": he performs his ability and the next character in the queue repeats the process. This is all pretty standard stuff and not too difficult to design. But...

The part that was / is hard for me to design is the concept of an Ability. Let me show you some examples of abilities that will exist in my game. I've highlighted and numbered some key points on each ability that I will discuss in detail:
  • Attack: One of the simplest abilities. When you use this on a target, it causes (1) immediate damage to him. This (2) costs no MP (magic points).
  • Poison: When you use this on a target, he will be (1) damaged over time, when it's his turn to pick an ability. It (2) costs some MP. It's affect (3) lasts a certain amount of the target's turns.
  • Blink: The target of this ability (generally a teammate), cannot be hit by physical attacks. (3) After the 3rd physical attack that misses, the effect disappears.
  • Cover: When you use this on a target (generally a teammate), the (4) user will take damage instead of the target if another character attacks the target (5) with a physical attack. It's effect only (3) lasts until the user's next turn.
  • Reflect: When you use this on a target and another character (5) uses a spell on him, the spell will reflect off of the target and (4) affect the caster instead. Since this can reflect helpful and harmful spells, it can be (6) used offensively or defensively.
  • Defense: This ability (7) halves physical damage, but this can (6) only be used on yourself.
  • Economizer (This is usually an item, but in my game it'll be an ability): The target's (2) MP cost is reduced to 1, regardless of the ability.
  • Bad Breath: This casts (8) mulitiple, and often random, ailments on the target (eg: poison, silence, blindness).
Ugh, that's a lot of bold. So, what did we learn? Well...
  1. Some abilities have an immediate effect, others last for a duration.
  2. Some abilities abilities cost MP, but others don't. And, there are some abilities that alter the MP costs of other abilities.
  3. Some ability's duration is based on the user's turn, some is based on the target's turn. Sometimes it's based on how many times you get attacked. Sometimes it's a combination of these (eg: an ability could last for 3 attacks or 6 turns, whatever occurs first). The possibilities on this are endless.
  4. Sometimes the target of an ability is not the character that gets affected by it. For example; if you cast Fire on someone with reflect, Fire isn't cast on him, it's cast on you!
  5. The trigger of an effect can vary from ability to ability. For example, reflect is only triggered by spells. If you Attack someone who is effected by Reflect, Reflect isn't triggered. But, if that character was effected by Cover, Cover would have been triggered.
  6. Some abilities can only be used on yourself, some can only be used on your enemies and some can only be used on your friends.
  7. An ability's damage is not a constant but can change depending on the other abilities that have been used on the target. Note the similarity between this and #2
  8. An ability can have multiple effects. In other words, sometimes using one ability is like using a combination of abilities simultaneously.
Basically, the Ability is a God class. It could (and should) be able to do almost anything you can think of (and anything you haven't thought of, yet). As you can imagine, it's very hard to design a class with requirements that are basically, "It should be able to do anything".

In my next article, I will talk about the solution I came up with.

No comments: