Delayed interaction in STK 0.8

Delayed interaction in STK 0.8

Postby heyda » 02 Jan 2013, 14:02

Hi, I play STK for quiet a while now, starting with 0.7 I noticed on the Ubuntu 0.8 on AMD64 and on Win7 on AMD64 that the keyboard actions seem to be a bit delayed (~300ms) till the car model acts on the input.
Is this due the new drifting-mode or is it a real bug? Can anybody confirm this or has anybody an idea, how you can tewak this behaviour?
heyda
 
Posts: 46
Joined: 02 Jan 2013, 11:18

Re: Delayed interaction in STK 0.8

Postby hiker » 02 Jan 2013, 23:51

heyda {l Wrote}:Hi, I play STK for quiet a while now, starting with 0.7 I noticed on the Ubuntu 0.8 on AMD64 and on Win7 on AMD64 that the keyboard actions seem to be a bit delayed (~300ms) till the car model acts on the input.
Is this due the new drifting-mode or is it a real bug? Can anybody confirm this or has anybody an idea, how you can tewak this behaviour?

There is always a certain delay when using keyboard before _full_ steering is reached, but the karts should start turning immediately. The delay is useful for digital controller to give the player the ability to 'steer a little bit'. You should be able to see this if you steer with kart animations enabled: kart should start turning immediately, but it will take around 0.2 seconds before it reaches full steering. Just try this when standing still.

If there is a delay, I doubt that this is caused by STK.

To verify what exactly you are seeing you can try reducing this steering delay in data/stk_config.xml:
{l Code}: {l Select All Code}
time-full-steer: This is the amount of change in steering depending
           on current steering. So if the steering is between 0 and 0.5,
           the time-for-steering-change is 0.15. If the current steering is
           between 0.5 and 1.0, the time-for-steering-change is 0.25.
           The speed is used as dt/time-for-steering-change.
           In short: steering at less than halfway is somewhat faster,
           which should avoid oversteering (by pressing the key for too long),
           but slower when you want to steer more. Overwall with the current
           settings the expected time-to-full-steer is:
           0.5 * 0.25 + 0.5 * 0.15 = 0.2 ... which is overall the same
           time we had previously.
    <turn turn-radius="0:2.0 10:7.5 25:15 45:30"
          time-full-steer ="0:0.15 0.5:0.15 0.5:0.25 1.0:0.25"
          time-reset-steer="0.1" />


If you set time-full-steer to smaller values (but >0 - e.g. simply try: time-full-steer ="0:0.001 1.0:0.001" ), you should get a much faster reaction - just to verify where your problem is coming from. Just remember to reset to the original values afterwards ;)

Cheers,
Joerg

PS: In 0.8 the documentation for this value in stk_config.xml was slightly wrong, the values were changed without updating the documentation ... just in case that you are reading the docs in the file :)
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Delayed interaction in STK 0.8

Postby heyda » 03 Jan 2013, 02:01

Hi, thanks for your quick answer Jörg :)

I tried the modification and yes reaction becomes much faster. But indeed this doesn't seem to solve my car control problem as you loose sensitivity. I tried to decrease the values as well, but this makes it hard to change the driving direction quickly enough.
So I noticed, that's not the right option to solve my problem.

It's still persists: When I press the cursor button down, to init a turn, it takes to long till the first reaction occurs (but not the intensitiy of the turn is wrong). No idea how I can lower the first delay, without making control becoming to sensitive, because as you wrote, the doc is out of date :(
heyda
 
Posts: 46
Joined: 02 Jan 2013, 11:18

Re: Delayed interaction in STK 0.8

Postby hiker » 03 Jan 2013, 13:26

heyda {l Wrote}:It's still persists: When I press the cursor button down, to init a turn, it takes to long till the first reaction occurs (but not the intensitiy of the turn is wrong). No idea how I can lower the first delay,

I don't think that this is a STK problem. It could be your system, or perhaps irrlicht. Ideally you would try some irrlicht samples (iirc the official irrlicht package comes with all examples pre-compiled in .../bin/Win32-VisualStudio). If this should not have that problem, it would make it more likely that this is a STK problem. To solve it (since we can't reproduce it) you would need to compile your own STK version, so that we can add some debug output for that.
without making control becoming to sensitive, because as you wrote, the doc is out of date :(

The doc quoted here above is up-to-date (or the one in our SVN at http://supertuxkart.svn.sourceforge.net ... sortby=rev).

I also googled for keyboard lag or delays or so - do you use a wireless keyboard? If so, can you try a wired one? Perhaps some of the google results might help narrow this down as well.

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: Delayed interaction in STK 0.8

Postby heyda » 04 Jan 2013, 22:54

Hi, yes I tested it with another laptop and there STK runs fine on same Ubuntu 12.04.

Yes I use a wireless keyboard. Will check hardware :/
heyda
 
Posts: 46
Joined: 02 Jan 2013, 11:18

Who is online

Users browsing this forum: No registered users and 1 guest