In this post I'm going to dig into a particular topic a little bit: animation. First, a little setup.
When I switched to Unity from Torque, I also decided to change the nature of my battle system. I had been working toward a time-based battle system in Torque, which meant that each character or enemy in the battle had a timer that would reset after each move and then refill over a period of time. When the timer filled, that character/enemy would enter its desired move into a queue that would execute one move at a time.
One big advantage of this system is that it's easier to input moves for multiple characters (since only one character/enemy is doing anything at any given time). Unfortunately, it's also a bit dated (think Final Fantasy VII) and works best with a separate battle screen.
So, in Unity I'm working on a more "real-time" system like World of Warcraft or Final Fantasy XII where enemies are visible all the time, have an aggro range, etc. This type of system is much more realistic and helps maintain the illusion of the game world, which is something I want to do as much as possible.
So what about animations?
Time-based systems make animations a little easier to handle, since each animation occurs in sequence and involves the entire skeleton. A basic move might go something like this.
- "Idle" animation playing before the move.
- Play a "run" animation and move toward the target.
- Once the character reaches the target, transition to an action animation (like swinging a sword).
- Play a "run back" animation and move back to the starting location.
- Transition back to the "idle" animation.
- Full body
- Standing
- Walking
- Running
- Strafing
- Walking/running backwards
- Upper body only
- Swinging weapon
- Spell casting
- Blocking an attack
- Taking damage
Learning to animate
Animation is a very complex subject and an art in itself. I don't claim to be very good at it, but there are a lot of good basic tutorials out there. I'm particularly fond of this one, which explains the process of animating a run cycle.
No comments:
Post a Comment