[SUGGESTION] Transition Views

Started by subspark, Mon 03/12/2007 23:04:55

Previous topic - Next topic

Ali

Perhaps I've misunderstood, but I don't understand why this needs to be so complicated. I've cobbled together a stopping animation which I think almost works:

http://www.2dadventure.com/ags/Stopping.zip
(Walk left!)

For the left view there are two stopping animations: one with the left foot starting in front and one with the right foot starting in front. It is possible to move from any walking frame relatively seamlessly to one of the first few frames of each view.

Because it isn't possible, as far as I'm aware, to animate a segment of a view I have to set the frames manually so it's a blocking script.

The big problem with it is that AGS still displays the standing frame for a fraction of a second once the character stops. I tried altering the standing frame, but it still displays the old sprite for a fraction of a second.

If AGS allowed us to animate a segment of a view and to switch off standing frames, I think this would work quite effectively. Please let me know if I've overlooked something.

Shane 'ProgZmax' Stevens

You could quite easily make your own walking function that includes walk speed and such and then add in this functionality to it, Ali.  Then you wouldn't 'need' a standing frame at all, just a check to see if the character has stopped moving and then you would handle it accordingly (do the transitions). 

subspark

#22
That's incredible Ali!
I can't beleive what i'm seeing. How is that possible!? :o

Edit: A plugin for custom character movement might ultimately be a good idea. Maybe instead of reinventing the wheel, we can handle walking movement using a completely different approach. The current AGS walking/movement system has been around for ages. Perhaps we can experiment a little.

Paul.

Ali

Quote from: ProgZmax on Fri 07/12/2007 23:36:38
You could quite easily make your own walking function that includes walk speed and such and then add in this functionality to it, Ali.  Then you wouldn't 'need' a standing frame at all, just a check to see if the character has stopped moving and then you would handle it accordingly (do the transitions). 

You're stretching the word 'easily' a little there! If I created my own walking function wouldn't I be constrained to using 320x200 co-ordinates, making hi-res games look poor?

While I would love to have control over transition animations and turning animations in AGS I'd rather not depend on a plugin, because it would render the game windows-only if it was used for something as central as walking.

Shane 'ProgZmax' Stevens

No, you wouldn't be limited to any set screen size as long as you kept an eye on viewportx and viewporty :).

Pumaman

Hmm, I guess the question is, does it matter if the character stops moving while the stopping animation is played? If it doesn't then that would be easy enough to add.

subspark

Quotedoes it matter if the character stops moving

What do you mean Chris? I though the character is supposed to stop moving while the stopping animation is played. You wouldn't necessarily need an 'ease down' to a halt. You could just stop movement suddenly and rely on the animation to do the easing as Ali has demonstrated.

Cheers,
Paul.

Ali

Quote from: Pumaman on Sat 08/12/2007 22:13:44
Hmm, I guess the question is, does it matter if the character stops moving while the stopping animation is played? If it doesn't then that would be easy enough to add.

I think Paul's right. I doubt this would matter because the animator's hand should be quicker than the eye. It won't always be perfect but it'll rarely look bad. And if the character is animated carefully it will always look a lot better than snapping to a stopped position.

The important thing on the authors side is to produce two different stopping animations, one with each leg in front. The character should come to a stop in a manner that resembles the walking animation as closely as possible fior the first 3/4 frames.

The important thing on the editor/scripting side is choosing the right view and beginning the animation on a different one of those 4 frames depending upon the 'out' frame of the walking animation.

I might be able to modify my script using timers to prevent the stopping animation from being blocking, but I'm still uncertain of whether I could get rid of the standing frame flicker. through scripting. If this was a simple thing to implement in the editor I would find it a real boon.

As I said above, animated turning is another thing that I would find extremely useful, and have failed successfully to script. Would that be a difficult thing to have built-in to AGS? I'm sorry to be piling demand on demand, but aesthetic features like these are the ones I'm most interested in.

Quote from: ProgZmax on Sat 08/12/2007 20:17:11
No, you wouldn't be limited to any set screen size as long as you kept an eye on viewportx and viewporty :).

I'm sorry, I wasn't meaning 320x200 room size. I meant that I think a character in a 640x480 game would move in double-pixel jumps if its X/Y values were altered by a module script. Or am I confused?

Shane 'ProgZmax' Stevens

If I'm understanding you right, a custom walk function could move at any rate (within reason) you wanted, and not just 2 pixel jumps for higher resolutions.  There's more to the movement than just adjusting x and y values, of course; you'll need to factor in animation delay and movement speed if you want some characters to move faster than others, but it's entirely possible to have a character moving at one pixel per loop :).  If I have some time today I'll get a working function together and post it here for you, ok?

Ali

If you have the time that would be very useful. I'm afraid it sounds beyond my scripting capability!

Pumaman

Sounds interesting. It's something I'll certainly consider for a future version.

Khris

Here's a short demogame: http://www.2dadventure.com/ags/CustomWalk.zip

The first custom mode adjusts the frame offsets so the character wont jump to the standing position from the middle of the cycle.
The second one additionally updates the character's position every frame.
(Obviously, both versions ignore (non-)walkable areas.)

SMF spam blocked by CleanTalk