Click to Play!

Friday, February 28, 2014

Pony Walk Cycles


     I found some really good pony pacing sprites at pauliewx.deviantart.com. I used them as a reference when aligning pixels for my own, much smaller pony sprites. So far I have the trot down perfectly. I'll have cycles for trotting, walking, and running in 3 directions. Just up, down and side because I can flip leg sprites to have movement in the opposite direction.


     I put the animation in Unity to test it out and tweaked it to perfection. I even added a subtle bouncing for the trotting sprite. That combined with the smooth moving camera and flowing directional controls gives the game a really fluid feel, which is exactly what I want. I need players immersed in the game, not worrying about how awkward it feels playing a big game on a tiny phone.

You can take a look at the source code behind the pony bounce past the break.






     This is how Clover's behaviors are set up. She bounces when she trots and I'm able to play with the variables and use them differently based on whatever animation I have playing. That means different bounces for walking, prancing, and galloping.


     This is the simple controller for Clover's movements. When the player touches a directional button, she moves a little in that direction based on her speed. The center of her bouncing changes with the updated y-axis position so she bounces even while moving. I also opened up the action variable to allow for multiple kinds of animations to be called at any time.

     I'll be cleaning up the code a lot later so it's easier to keep track of things. For now I'm trying to get down all the code I could possibly need for animating her.


No comments:

Post a Comment