Suggestion: Character speed.

Started by BlackBaron, Wed 16/04/2003 20:01:33

Previous topic - Next topic

BlackBaron

It would really nice to have independent 'x' and 'y' speeds on characters.
It would also be nice to be able to change the speed of acharacter with its scale.
"Do you thirst for knowledge no matter the cost?"
            -Watrik, master glassblower

Jimi

There isn't a "speed" on the scaling, is there? Don't you just have to have more walkable areas that change the % at a steady rate?

Privateer Puddin'

This has been mentioned a lot, well the second one that is :)

Pumaman

Yep this has been requested many times, it's on the tracker here:

http://www.agsforums.com/tracker.php?action=detail&id=14

It has not yet been implemented for technical reasons.

BlackBaron

Quote from: Jimi on Wed 16/04/2003 20:46:20
There isn't a "speed" on the scaling, is there? Don't you just have to have more walkable areas that change the % at a steady rate?

I didn't mean a speed on scaling, I meant that it should be alowed to let the character moving speed depends on it scale, i.e. if you draw it small it walks slower (lust like distant objects in real life, imagine a plane, the farther you see it the slower it seems to be going, doesn't it?).
"Do you thirst for knowledge no matter the cost?"
            -Watrik, master glassblower

BlackBaron

Anyway, thanks a lot (I didn't know about that tracker stuff).

I'll guess I'll just have to be patient.
"Do you thirst for knowledge no matter the cost?"
            -Watrik, master glassblower

Pumaman

Quote from: BlackBaron on Thu 17/04/2003 04:33:56
I didn't mean a speed on scaling, I meant that it should be alowed to let the character moving speed depends on it scale, i.e. if you draw it small it walks slower (lust like distant objects in real life, imagine a plane, the farther you see it the slower it seems to be going, doesn't it?).

For reference, what you describe there is speed on scaling. :)

Hollister Man

It is a bit larger, and more difficult for the coder, but Permanent Daylight used an interesting approach.  They used different walkable areas to simulate scaling.  When the character walked away from the screen, he became smaller.  This way they could make sure he looked nice at any level, nnot just multiples of 25%

You could use this approach, setting a function so that if the character is on the more distant walkable area, his walking speed slows.

Just my five cents, (Inflation is a pain)

Al
That's like looking through a microscope at a bacterial culture and seeing a THOUSAND DANCING HAMSTERS!

Your whole planet is gonna blow up!  Your whole DAMN planet...

scotch

Could you write that function for me?? :)

I didn't get what you meant at all.. you can't change the character's speed while it's moving btw.

TerranRich

#9
At the very least, Chris, could you implement a GetCharacterScale(int charid); function until you find a way to implement full scale/speed synchronization. Is that possible? This way we could do it ourselves until then using script by checking the scale size and setting the speed accordingly.

//EDIT//
Whoops, forgot that speed can't be changed while walking. Is there a way around that? Is that where the problem in the implementation lies? :)
Status: Trying to come up with some ideas...

Pumaman

Yep, that's the whole problem here. When the character wants to walk from A to B, his entire path is pre-calculated, but the technical issues of handling changing speeds in that calculation are the reason I havent' done it yet.

It's possible, it just needs a fair bit of work.

Hollister Man

Would it be possible for someone to rewrite the walking function for themselves, possibly using an unused cursor mode?  I would try something like this, although it might not work.

Animate the character, maybe using While, to animate until he arrives in his final location, lets say BX, BY.  Detect when he changes walking areas, stop him for an istant, just long enough to change speed, and start him toward BX, BY again.  I have not tried it, so I cannot be sure it would look good.  I'm going to try it now.

That's like looking through a microscope at a bacterial culture and seeing a THOUSAND DANCING HAMSTERS!

Your whole planet is gonna blow up!  Your whole DAMN planet...

scotch

Well I can't think of a way of doing the pathfinding in the script, probably just best to wait until this is added to ags, I don't think it's possble in script.

Hollister Man

Well, I was just going to tell it to check if he changes areas, and stop if he did, still using the normal pathfinding.  Unfortunately I suck at coding enough that it froze solid.  I must have got a loop in there somewhere.
That's like looking through a microscope at a bacterial culture and seeing a THOUSAND DANCING HAMSTERS!

Your whole planet is gonna blow up!  Your whole DAMN planet...

Pumaman

What you suggest is possible, but would be rather slow because it would have to keep re-calculating the path every time he changed areas. This is something I'm thinking about how to fix though.

Scorpiorus

QuoteAnimate the character, maybe using While, to animate until he arrives in his final location, lets say BX, BY. Detect when he changes walking areas, stop him for an istant, just long enough to change speed, and start him toward BX, BY again. I have not tried it, so I cannot be sure it would look good. I'm going to try it now.
I had tried that method earlier but it doesn't look good (at least for me). :-\

Another way is to write you own MoveCharacterDirect() function using character[].x character[].y variables. Since it is 'direct' it wouldn't use the pathfinder at all. Well, checking for walkable area under the character may help a bit. Although it would be like AGS MoveCharacterStraight() function. Not sure it is enough unless you use keyboard to control that char.

-Cheers

SMF spam blocked by CleanTalk