Managing animation state transitions

General discussion about LÖVE, Lua, game development, puns, and unicorns.
spinach
Prole
Posts: 2
Joined: Fri May 14, 2010 12:26 am

Re: Managing animation state transitions

Post by spinach »

ah. if there is an anvil on his head and he jumps, you can probably just skip a bunch of middle frames and cut the time between leap and land, so that he is jumping as though there is an anvil on his head. whatever it is you're going for, try out methods with the least work first, and see if they work. after that, i'd say keep drawing till you're out of storage -- it's kind of the opposite thing, but it's the sort of touch people appreciate years later.
User avatar
hryx
Party member
Posts: 110
Joined: Mon Mar 29, 2010 2:28 am
Location: SF<CA<USA

Re: Managing animation state transitions

Post by hryx »

I understand your general concern, but in the demo you made, jumping looks good to me in almost all possible situations. I actually had to try to aim for a frame where the transition looked awkward at all, and even then it wasn't bad.

"Tweening" seems like a horrible idea for any raster image based animation system. Here's the best solution I can think of, for when the transitions do look really crappy:
When the character is running and it comes time to jump, get the current frame of the run animation. If it's within that specific range of frames that would look bad to jump from (something you manually define, for example frames 8-10), play an in-between animation to transition. It should only need to be one or two frames. Any more would probably cause headaches and be unnecessary. And you really don't need to make a different transition for every possible frame combination.
*Note: Upon reading kikito's suggestion more closely, he explained it much better than I could.

Other than that, keep the beginning part of a jump animation to a minimum -- that part where the character coils up in preparation to leap. Or you could skip that pre-leap part if the character is doing a running jump.

Like it was said before, the player's eyes can usually adjust and belief is suspended when the animation is even half-decent. Your demo looks really nice, I think.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests