Additional frames for walking views

Started by Lorenzo Gasperoni, Mon 02/07/2012 22:34:50

Previous topic - Next topic

Lorenzo Gasperoni

Hi to all,
i am new to this forum and came frome Italy, Rome (sorry for my poor and bad english, please).
I am drawing the walking sprites for my main charcater and have 2 questions that torture me from a few days:
1) can i draw the "turning" animation form my character? So that, i.e., if it is facing on right and i put on its left, it make a turning-on-the-left animation before to start walking on the left? (The Dig style)
2) in the walking view, can i have some extra frames that run only the first time the animation starts? So, if the character is standing and i move it, it will play 2 or 3 frames that start the walking animation and after make the walking loop only with the latest frames?
i.e. frames numbers:   1,2,3,|4,5,6,7,8,|4,5,6,7,8,|4,5,6,7,8,|...

Thank you for all!

Ghost

#1
Hello and welcome!

The features you're trying to implement aren't built into AGS but they can be implemented with some additional scripting.

1) AGS has an option "Characters turn to face direction" in the General Settings page. This makes a character use the first frame each walkcycle direction when turning, so with a character facing left and walking to the right, he's first briefly turn on the spot. This is pretty effective already.

2) There are several ways to make this work. The simplest one would be to set up a view with 1,2,3, and then a long (really long) sequence of 4,5,6,7,8,4,5,6,7,8... Screens tend to be relatively small and one step means more than just one pixel, so a character could walk through a 300 pixel wide location with a walkcycle of ~65 frames before the full view sequence would repeat. Not the most elegant approach but a feasible method.

Lorenzo Gasperoni

Hi Ghost and thank you for the welcome and the answer!
1) I knew the existance of that setting. But... mmm. I will try with some coding!
2) That is a simple but effective solution! Thanks a lot! :D

I am really happy that this form, community and software is so followed still in 2012! Yippiee! 

Khris

2) won't work if walkable areas are winding, for instance if the character walks right, then up, then right.

Obviously, both problems can be solved by simply animating the character before processing the walk command. The catch is that it is impossible to know for certain which way a character is gonna start walking. You can guess by comparing the click to their current position, but it'll look awkward if they must start off in the opposite direction to reach the target.

In short, there's no way I know of to definitely solve this (aside from coding your own pathfinding/walking), but it sounds like a reasonable thing to add to the wish list of the next AGS version.

Ghost

Quote from: Khris on Tue 03/07/2012 00:35:52
2) won't work if walkable areas are winding, for instance if the character walks right, then up, then right.

Damn, I missed that. But it's possible to check a character's direction and the current frame of an animation; there should be some way to sync an animation, maybe in repeatedly_execute_always, so that changing direction (while walking) would directly skip to the matching frame of the new animation.

It'd still be a pretty error-prone solution, though. Having the functionality included in a future version sounds good.

Lorenzo Gasperoni

Ooops, right.
But, actually, the lack about animation is generally a "loop from specific frame" option for every view, so that the former frames are not looped again, after the first time. This can be a nice feature that semplify many character aniamtions. Do you agree?

SMF spam blocked by CleanTalk