Home Tutorials Download Beta Store Forum Documentation KnowledgeBase Wiki Blog

ShiVa3D

Return to Wish list

Editor - lock framerate?

You need some features? ask it to us here!

Editor - lock framerate?

Postby 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
cchaos_colin
Senior Boarder
Senior Boarder
 
Posts: 41

Re:Editor - lock framerate?

Postby broozar » 02 Jun 2009, 21:26

that's what the "dt" factor is for, program framerate independently.

-> application.getLastFrameTime
CM ShiVa Technologies SAS
User avatar
broozar
Platinum Boarder
Platinum Boarder
 
Posts: 3482
Location: Berlin - Germany

Re:Editor - lock framerate?

Postby 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:
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
Senior Boarder
 
Posts: 41

Re:Editor - lock framerate?

Postby mal_CanDo » 03 Jun 2009, 10:21

+1 for this feature.
mal_CanDo
Gold Boarder
Gold Boarder
 
Posts: 206

Re:Editor - lock framerate?

Postby NiCoX » 03 Jun 2009, 10:33

Hi all,

Have you tried the function application.setMinFrameTime ?

:)
User avatar
NiCoX
Platinum Boarder
Platinum Boarder
 
Posts: 5644
Location: France

Re:Editor - lock framerate?

Postby 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
Gold Boarder
 
Posts: 206


Return to Wish list