About Store Forum Documentation Contact



Post Reply 
Char movement speed
Author Message
laugan Offline
Member

Post: #1
Char movement speed
Hi to all!

I have a question.
I have a map loaded and a char who moves by actionMoveTo(...). If i have 40+ FPS it moves OK, but if i have 10-15 FPS it moves MUCH slower (if we make a race, he will totally loosesmile). As i understand, if we have the same char speed (~4.1), no matter what FPS i have, it should move the same speed always.

Am i right? Or i did something wrong?)
07-12-2012 11:45 AM
Find all posts by this user Quote this message in a reply
Zervox Offline
Member

Post: #2
RE: Char movement speed
speed is just its max speed, desiredspeed() is the one used for calculating velocity of the object, and it isn't using Time.d() for fps independency.
07-12-2012 04:48 PM
Find all posts by this user Quote this message in a reply
laugan Offline
Member

Post: #3
RE: Char movement speed
thanks for the answer, i checked it and desired speed is always = 4.1 as simple speed...
07-12-2012 06:18 PM
Find all posts by this user Quote this message in a reply
laugan Offline
Member

Post: #4
RE: Char movement speed
i hope Esenthel comments this post. Should char move the same speed without depending on FPS (low or high)?
07-16-2012 07:13 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
RE: Char movement speed
Hello,
yes, the speed should be independent of FPS.
Unless you have made some modifications to the code, or maybe Physics friction acts differently when lower FPS.
You can try changing timestep<->variable physics updates, and precision at physics creation.
If won't help, please post some code and video of the issue.
07-18-2012 02:52 PM
Find all posts by this user Quote this message in a reply
laugan Offline
Member

Post: #6
RE: Char movement speed
thanks, i'll try it!
If won't help, i'll fraps the movement
07-19-2012 05:27 AM
Find all posts by this user Quote this message in a reply
laugan Offline
Member

Post: #7
RE: Char movement speed
one more thing:
it seems like this behavior is only on computer with integrated video card (intel).
can i prevent the app from being launched on computers with only integrated video?

p.s. i didn't try to change physics settings yet smile
07-19-2012 12:05 PM
Find all posts by this user Quote this message in a reply
laugan Offline
Member

Post: #8
RE: Char movement speed
it seems that i found the reason: i initialized PHYSICS several times (in different states), it seems they interfere each other))

i'll check it again and write here.
07-24-2012 07:24 PM
Find all posts by this user Quote this message in a reply
Post Reply