This week has been all about animation and bombs.
Animation switch and IK
I’m using Mecanim in Unity to drive the animation for the characters and up until now we have been using what is known as generic animations. This means that we need to have a unique set of animations for every character in the game. This week I switched to humanoid animation which gives us the ability to use one set of animations on multiple characters, Unity does some fancy work under the hood to retarget animations to make this happen. It also allows us to use animations designed for other rigs on our characters.
This change has quite a lot of positives for us. We can quickly get new characters in the game without spending time making a new set of animations and also allows us to use the inbuilt IK system. I enabled head tracking so the characters can now look at the ball.
There are a couple of drawbacks however to this kind of animation retargeting, we can’t easily use prop bones to animate other things such as the ball or racket but at this stage of development it’ll definitely help us progress.
This week I wanted to make triggering the special moves seem a bit more…..special, so I added a mini action replay when the player returns the ball with a special activated. Just after triggering the shot the position and velocity of the ball is stored along with the position and animation state of the player. If a good hit is registered the system rewinds time slightly and replays the shot with a new camera view.
It still needs a bit more work, eventually I’ll slow the speed of the ball right down and rotate the camera around the player “Matrix” style.
In last week’s blog I detailed the three types of specials I wanted to include: Offensive, Defensive and Pot luck, so this week I implemented an idea for a pot luck special… bombs!
The idea is pretty simple, when the bomb special is triggered there is a window of time before the bomb will go off when hit by a racket. The aim is not to be caught with it when it goes off.
Currently, there is a range of between 5 and 10 seconds before the explosion is triggered. It definitely makes the point more frantic to play out and there is scope for further work on this move. I’m going to add some signposting to show when the bomb is about to go off so that the player can decide what to do. If the bomb is about to blow then it’ll be better to play a volley, if it looks like there is still some time then it would be better to play a long, slow shot or a lob.
- The big switch – Moving to Unity 5.0
- Attempting to lock down an art style and list of characters
- Refining everything! Working towards a fully playable build with all the intended gameplay in place.