ShiVa3D
Editor - lock framerate?
You need some features? ask it to us here!Editor - lock framerate?
by cchaos_colin » 02 Jun 2009, 20:12
I was wondering - could we get a new editor feature for locking the framerate? We've been noticing some differences between our iPhone and PC performance of a character, and it seems to be framerate related (since the PC is running about 3-4x what the iPhone is). Our movement/acceleration is time-based, but even so, the differences are there.
Thanks,
Colin
Thanks,
Colin
- cchaos_colin
- Senior Boarder

- Posts: 41
Re:Editor - lock framerate?
by broozar » 02 Jun 2009, 21:26
that's what the "dt" factor is for, program framerate independently.
-> application.getLastFrameTime
-> application.getLastFrameTime
the wiki guy - we always look for great shiva tutorials! http://www.stonetrip.com/developer/wiki
Re:Editor - lock framerate?
by cchaos_colin » 02 Jun 2009, 21:45
Indeed, and we are using that :)
Unfortunately, you can still see different results with vastly different framerates (ie, 60 FPS PC to 18 FPS iPhone). That's why I'd like to lock the update rate on the PC to a given value, so I can get a better representation in the editor without exporting every change to the iPhone.
Of course, I could do something like:
..and get the environment variable everywhere instead of using application.getLastFrameTime ( ). That would almost simulate my needs, though animations and such would still be off - and I'd prefer a function to a function that presumably does a table lookup, since we get the last frame time in several places. If it was an editor change, then everything (particles, animations, and so on) will respect it.
Unfortunately, you can still see different results with vastly different framerates (ie, 60 FPS PC to 18 FPS iPhone). That's why I'd like to lock the update rate on the PC to a given value, so I can get a better representation in the editor without exporting every change to the iPhone.
Of course, I could do something like:
- Code: Select all
if ( system.getOSType ( ) == system.kOSTypeIPhone )
then
application.setCurrentUserEnvironmentVariable ( "globalDT", application.getLastFrameTime ( ) )
else
application.setCurrentUserEnvironmentVariable ( "globalDT", 1/20 )
end
..and get the environment variable everywhere instead of using application.getLastFrameTime ( ). That would almost simulate my needs, though animations and such would still be off - and I'd prefer a function to a function that presumably does a table lookup, since we get the last frame time in several places. If it was an editor change, then everything (particles, animations, and so on) will respect it.
- cchaos_colin
- Senior Boarder

- Posts: 41
Re:Editor - lock framerate?
by NiCoX » 03 Jun 2009, 10:33
Hi all,
Have you tried the function application.setMinFrameTime ?
:)
Have you tried the function application.setMinFrameTime ?
:)
-

NiCoX - Platinum Boarder

- Posts: 5626
- Location: France
Re:Editor - lock framerate?
by mal_CanDo » 03 Jun 2009, 12:07
Cool :) +1 karma to NiCoX for knowing this question would be asked, and pre-developing the functionality :)
- mal_CanDo
- Gold Boarder

- Posts: 206
6 posts
• Page 1 of 1