![]() |
Increasing physics framerate - Printable Version +- Forums (https://www.vdrift.net/Forum) +-- Forum: Project (https://www.vdrift.net/Forum/forumdisplay.php?fid=4) +--- Forum: Development (https://www.vdrift.net/Forum/forumdisplay.php?fid=9) +--- Thread: Increasing physics framerate (/showthread.php?tid=903) Pages:
1
2
|
RE: Increasing physics framerate - joevenzon - 02-09-2008 cologne: Change line 9 of game.h to Code: #define FRAME_TIME 0.001 - cologne - 02-09-2008 Fast, faster,.....1000hz .-) I don´t compile. I am using vdrift_20070327 Release, Mac PPC. -( - joevenzon - 02-09-2008 Ah, ok. :-) Well, to anyone else who races the F1-02 and compiles from source, give it a shot. - skankerror - 02-11-2008 Well I can compare svn r1936 with r1942 modified with #define FRAME_TIME 0.001 in line 9 of game.h. The difference is amazing (maybe vamos changes also help), that's not the same game, F1 is much more drivable, it looks much much realistic. I'll try to compile 1942 unmodified to see real FRAME_TIME difference. - thelusiv - 02-13-2008 So the question is, should we lower the frame time for the next release? It has benefits, particularly better physics calculation, but it has some drawbacks too, like slower performance. Another benefit is that it fixes some weird bugs like this one: http://code.google.com/p/vdrift/issues/detail?id=46 - alex25 - 02-14-2008 thelusiv Wrote:So the question is, should we lower the frame time for the next release? the lower frame rate really kills performance on my laptop to the point where i can't play any more. i can always change it back to the old (current) value. the thing is if i increase it to 0.01 then the game behaves very, very strangely so something kind of depends on the current value but i am not sure exactly what. --alex-- - skankerror - 02-14-2008 With framerate at 0001, I must close nearly all my windows to make it work (firefox, nautilus, ...). Another point is that it exits badly when I press "quit" instead of "leave game" then "quit". Processus is still alive with 300 Mo of memory used. Except all these problems, the game becomes much better with this framerate. Maybe we can try framerate at 0002 ? - cologne - 02-14-2008 framerate is a variable at runtime?
- thelusiv - 02-14-2008 I thought about making the physics framerate user-configurable but that introduces usability problems. Users don't know what to set this value at, nor do they know the consequences of it. Also, what value do we let them adjust, do we allow them to specify the number of physics ticks per second? Or should we give them a "physics quality" setting like Low (250/sec == 0.004), Medium (500/sec == 0.002), High (1000/sec == 0.001)? Again I foresee people setting their physics quality to "Low" on slow machines, and then posting bugs that are side effects of this, or just thinking that our physics simulation sucks and dumping the game. Then again, maybe that's better than just having to release it with this setting hard-coded at "Low". - alex25 - 02-14-2008 thelusiv Wrote:I thought about making the physics framerate user-configurable but that introduces usability problems. ideally one would want to tie in the physics framerate to the graphics framerate (within some limits of course). no point in doing 1000 physics frames a second if the graphics get updated only at 1 frame a second (or worse). not sure if this would be doable or not. --alex-- - thelusiv - 02-14-2008 Alex, there is a certain threshold, which, if crossed, will make the physics system really wonky. It is best we don't make it variable or in any way tied to graphics performance, as this could cause unexpected problems. Besides, graphics performance is mostly dependent on the video card, while physics performance is mostly dependent on the CPU. So tying one to the other really doesn't make much sense. - alex25 - 02-14-2008 thelusiv Wrote:Alex, there is a certain threshold, which, if crossed, will make the physics system really wonky. as i've discovered. looks like we are pretty much at the lower limit of the physics simulation. anything higher than 0.004 for FRAME_TIME makes the game behave really strangely. looks like we are at the "low" threshold. the idea of having a configurable FRAME_TIME parameter makes sense though and we should pursue it. --alex-- - thelusiv - 02-14-2008 I decided to split this into a new topic instead of continue in the F1 tuning thread. I guess having a setting that the user can change is probably the best route, it gives the user the ability to control how good the simulation is or how CPU-intensive it will be. - joevenzon - 02-15-2008 I'll try to focus on improving performance. It'd be nice if we could run the physics tick at 1000 Hz but get the same performance as today. BTW, you don't want the physics tick to be matched to the graphics update rate because it really kills any kind of physics stability. - joevenzon - 02-15-2008 Okay, I've sup'd up the collision code. Can you run at higher framerates now on your laptop with R1946+? If so, how high can you go to get equivalent performance to the older revisions? |