Saturday 13 October 2012

MDDN 243, Project 3, Animations

From what Kah and Ben have suggested they think that to show the health of our main character more, that it would be cool to have the power levels shown on the battery. So as his health goes down so does the level of liquid in our battery.
As the Lead Graphics Designer Alex has made several different versions of our character. One at 100%, 75%, 50%, 25% and 0%. Here is a view of the 50% and the 0%












Finding a way to change the 4 movement animations 5 separate times for each movement was quite difficult. At first I decided to try and make it that at every stage of the the batteries power level.

I created a scene behavior and this is the code which I used to make it

It is quite difficult to see but what is ultimately happening is that when Battery Charge = 10, it is killing the current actor and creating the new 75% actor in the same place as the last actor. And that is repeating for the 10 stages of the Batteries life.

This didn't work as well as I thought it would. What ended up Happening was that it was constantly killing the actor which was on the screen and replacing it with the same type of actor. So what the code was saying is that if the battery charge is 10, which is it a lot of the time because that is the starting value, to kill  the actor. And because the battery charge is 10 for quite awhile, the entire time it is 10 it is killing the actor.

So this idea was scrapped because it was lagging the game to much.




What I did next is that i looked at the behavior which created the 8 way movement for the actor. I found that the code which told the game which animation to play was like this.

So what is setting the up animations is the attribute 'up animation'. The same thing is repeated for all of the other movements in the game.

So for our 1 character I have put all the different animations for each of the 4 movements, as well as idle animations and the animations for the power up actors and also the charging animations for our character. At this moment he has over 65 different animations. But what I have made it to do is that if Battery charge = 10, set 'up animation' to 'Front 100' and if it equals either 9, 8 or 7 to set 'up animation' to 'Front 75'. And this is repeated for all the the movements including idle states.

This way works perfectly fine as it is the same Actor the entire time. Testing it out works perfectly and it also can include the animations for the power up actors when the attributes 'Solar', 'Wind' and 'Nuclear' are true.

Here is a small video of our character changing into all the stages in a scene



changing states from Richard Hpa on Vimeo.

No comments:

Post a Comment