Foot Planting

Started by subspark, Sun 02/12/2007 20:44:20

Previous topic - Next topic

subspark

Is there any way to allow non uniform movement for a character in any given direction?

For example:


Note:
  • The blue lines indicate the exact chunk of movement required to get the feet to plant in AGS. It is non uniform.
  • The green border is the actual bounds of the sprite. The square size allows for a wide range of movement in a predetermined space.
  • The feet plant perfectly as desired in the engine.
  • There is a pattern in the blue lines because the same animation is played twice to lengthen the walkcycle.

    Is there any way to do this besides Chris adding a foot plant feature of his own?

    Cheers,
    Paul.

SSH

The animation only moves once per loop, so its up to you to make your animation move forward properly within the loop.

Having said that, I have considered making the code of the walkcycle generator actually do the whole walking to make the footsteps fall perfectly.
12

subspark

QuoteThe animation only moves once per loop, so its up to you to make your animation move forward properly within the loop.
Believe me the animation is as perfect as I'm gona' get it. (Besides actually painting over the placeholder limbs).
It's based off of video reference of myself walking in a controlled straight line. I even had poor man's foot markers just to be safe.

The problem is that no matter how much you shift the character within the square, it's always going to center the sprite internally in AGS.
I don't know if center pivot actually effects anything but the animated preview.
Perhaps it could be worked around by making some of the sprites non square but then again, the feet plant for several frames then break again on the loop over.

As far as my knowledge brings me, this is practically impossible without some sort of scripted intervention.
Is anyone willing to try scripting something?  :)

Cheers,
Paul.

Misj'

Quote from: subspark on Sun 02/12/2007 20:44:20
  • The blue lines indicate the exact chunk of movement required to get the feet to plant in AGS. It is non uniform.

    Is there any way to do this besides Chris adding a foot plant feature of his own?
Based on this thread I would say no, unless a module is crated that includes both the frame-manipulation (frame number, exposure time, and amount of movement) and a pathfinder...or to quote Chris: "This isn't as simple as it sounds, due to the way that the pathfinder calculates the movement path using the character's movement speed -- therefore it's not that easy with the current system to vary the movement based on the animation frames."

Misj'

scotch

If you keep the frame size the same for all frames then the centering will be the same, you're free to move the character wherever you like inside the box, so you don't need to use scripting. Best thing to do would be to change the animation so the feet are constant rate, but if you don't want to do that you'll have to move it about inside the frame. A scripting solution would be possible but quite awkward.

subspark

#5
Again, moving the character about inside the frame is futile. When it comes time for the loop to occur the character is either too far ahead of himself or too far behind.
It might be tricky, but this can't be impossible in code.

If no one has any ideas, I guess I'll move on. There are other things to do besides this right now however it would be a lovely feature.

EDIT: After reading that post, Misj, it's even more of a lovely feature than I initially thought. Chris, you said this wouldn't make 2.8, how about 3.0 v1? It's a pretty well known feature in the original SCUMM system for DOTT, and Sam & Max. There are a lot of people besides myself who would benefit from such a feature.

Cheers,
Paul.

scotch

I do understand, your overall foot movement is not divisible by the number of frames so there have to be some small modifications for it to loop right, as AGS does it now. I'm just saying that movement inside the frame and slight foot adjustments could both smooth out your animation and make it work sooner than waiting for a feature to be implented. If you're ok with waiting, fine.

What sort of feature are you asking for?  A "skip X pixels each walk animation iteration" type feature could sort it out in your case, but it'd still need some moving work. Specifying a movement value for each frame could also work, and wouldn't need frame tweaks but it's more effort to implement and use. It's one of those things that it's hard to design a system for that everyone would like.

Did SCUMM really have this? Does anyone know which approach it took? Most games that have pixel perfect feet do it through animation timing alone, which I understand is harder if you are rotoscoping.

subspark

#7
QuoteMost games that have pixel perfect feet do it through animation timing alone, which I understand is harder if you are rotoscoping.
It's hard in general, yes. If I did tweak my walkcycle to plant his foot evently each frame then the animation would look off and his legs would stretch too far or too little. In reality, nobody walks uniformly anyway. The minute we plant our foot on the ground we cause friction which in turn slows us down. Remember in true locomotion we use our feet to push up as well as forward.

QuoteWhat sort of feature are you asking for?
Basically this:


QuoteIf you're ok with waiting, fine.
While this is a feature I would love sooner rather than later, it's not something I'm going to halt production for.

Edit: By the way Chris, turning small fonts on doesn't seem to solve my wacky layout problem. Just FYI.

Cheers,
Paul.

Pumaman

Is this a feature that anyone else would be interested in?

FSi++

If these shifts would help against jerking of speech animations, then count me in :P
(Imagine character like Stan from MI: he waves his left hand, sprite's center shifts and it looks like he moved his whole body, which is at least strange; all my characters are simple and symmetric though, so that might as well be a leftover feeling left from v2.55)

Khris

#10
I took the liberty of evening out the foot movement (using only the first half):



Edit: FSi, not sure if that's what you're talking about, but fixing jerky animations is explained in the BFAQ.

SSH

Am I missing something, or do these problems only occur when people over-trim their sprites?
12

subspark

#12
QuoteIs this a feature that anyone else would be interested in?
This would provide a means to doing things like peg legged pirates or zombie limping. Thinks of LeChuck and his ever cool non uniform limb dragging action.

QuoteI took the liberty of evening out the foot movement (using only the first half):
Wow Khris. You can see now why I'm using video reference. My animation sucks kachugas. Looks smoother, more accurate and I'm about to test whether the feet line up in the engine.

QuoteAm I missing something, or do these problems only occur when people over-trim their sprites?
Trimming sprites has nothing to do with my problem, SSH. In fact you can see in my original post that my walkcycle sprites were square.

Cheers,
Paul.

Khris

Here's a short demo showing non-uniform movement using only built-in frame/view settings: http://www.2dadventure.com/ags/Froggies.zip

Space to switch frogs, move the mouse to the top to take a look at the frames.

The green frog's sitting frame has a long delay to prevent it from sliding while it's moving diagonally.

(Before I cropped the blue frog's frames to an odd width, the movement was jerky even when it moved horizontally only. I assume the method AGS uses to calculate the pivot of a frame with an even width yields random results.)

subspark

#14
Hmmm.
I readjusted all my frames to try and keep even foot placement. Alas I still had to adjust a couple of frames. Frames 1 and 6. When I adjusted them, other frames went out of line.
I can quickly see how this is going to be a nightmare without some kind of official support for non uniform movement.

I'll have to move onto something else for now.
Thanks anyway Khris. Cool demo by the way!

Cheers,
Paul.

EDIT: I just had a thought. You could also use non uniform movement to have the character step down into an indent in the floor without the need for additional or specialized views.
And then of course theres 'stairs' which could easily be done!  8)

Khris

The adjusted version I've posted consists of the same 6 frames I used in AGS to test the walk-cycle. As long as the movement speed is set to 3 and the character walks straight to the left/right, the feet don't shift at all; they stay right where he put them down.

If a game uses lowres and the character is able to walk freely in every direction, it isn't possible to avoid an occasional visible jerk, even when using 8 loops.

I assume that the char coords are handled as floats internally because the character keeps his speed perfectly when walking diagonally. That makes the offset of the next frame pretty much unpredictable.

Also I still fail to see why implementing this feature is even necessary. Everything it'd do can be achieved already by moving the pixels inside the frame.

subspark

#16
QuoteAlso I still fail to see why implementing this feature is even necessary. Everything it'd do can be achieved already by moving the pixels inside the frame.
I am suggesting it because in all cases it is by far more efficient, easier, quicker and neater if you can simply click a spinner than having to manually sift through your sprites in Photoshop and adjust them frame by frame. I can't understand your neglect of such an obvious plus for AGS.
Even as an artist, I still vote the easier method. :)

I've had no luck with what you suggested at all by the way. Got Fraps? Would you be so kind as to record your test and send it to me? My email is public.
I can only be sure I'm doing something wrong if yours works differently to mine. I adjusted the rest of my frames based on your generous example, set the speed to 3 (I predicted that one) and recorded it using Fraps.

Frame by frame I noticed shifting by one pixel here and there and on a low res game that can become quite a noticeable hindrance in full screen.
I would appreciate a recording if you have the time. You've been a great help so far Khris.

Thanks a lot,
Paul.

Misj'

Quote from: KhrisMUC on Tue 04/12/2007 01:48:43
Also I still fail to see why implementing this feature is even necessary. Everything it'd do can be achieved already by moving the pixels inside the frame.
It's more logical (especially from a graphical/animation point of view), and it's much more easy to make small adjustments within the AGS-software.

Besides, from a sarcastic point of view one might use the same argument ('why have a simple method, if it can be achieved already (albeit in a more clumsy way)') to question the whole existence of AGS, since everything can already be done using C. (sorry, I couldn't resist the remark ;) ) - No, the reason why I think this is a useful addition to AGS is, because it strengthens AGS as a stand-alone tool for adventure games; and especially for more complex and/or professional animations, where a better control is required over the sprites.

And if one were to be able to adjust these parameters in-game (which fits within the stand-alone argument), one could for example make a jump slightly shorter or smalled depending on the distance required (where only the specific 'in-flight-frames' are affected by this)...the same goes for the walk cycle.

I can think of more arguments why this feature makes a lot of sense. However, the biggest (though not the only) argument against (having to rewrite the pathfinder) could be considered (to me) to outweigh each of these arguments...which is why I didn't beg any further in the thread I mentioned earlier.  :D

Misj'

Khris

#18
Lowres sprites need some careful planning, that's all. Stick to a few rules when drawing them, and they will look just fine in-game, with perfect foot planting.

Here's the vid.

QuoteI can't understand your neglect of such an obvious plus for AGS.
An obvious plus for AGS would be if people stopped to request "make my game" type stuff every other day. It's a powerful, free engine that's developed in CJ's free time.
Stop wasting that time just because you're too lazy to move some pixels.
Really, do I have to spell it out?

Edit: MrColossal: And I'm perfectly capable of deciding when and how to voice my opinion without you patronizing me, thanks.

MrColossal

I think CJ is perfectly capable of deciding what is a waste of time and isn't for him to do without need for insulting other members, KhrisMUC.
"This must be a good time to live in, since Eric bothers to stay here at all"-CJ also: ACHTUNG FRANZ!

SMF spam blocked by CleanTalk