Home Tutorials Download Beta Store Forum Documentation KnowledgeBase Wiki Blog

ShiVa3D

Return to Microsoft Windows

Too fast or out of sync?

Windows DX9/OpenGL 2 Standalone Apps

Too fast or out of sync?

Postby rusty » 01 Nov 2011, 12:55

I'm developing an Android app, on that and in the IDE everything works great, but every now and again i'll Author a Windows version for someone who is designing some maps. The problem is it flies through and states get jumped through and cycle back to the beginning when they shouldn't.

The only explanation I can ponder is that the NSIS application is multi-threaded whereas the IDE viewer isn't, but I don't know that.


Has anyone any other suggestions / solutions?



Cheers!
rusty
Expert Boarder
Expert Boarder
 
Posts: 106

Re: Too fast or out of sync?

Postby NiCoX » 01 Nov 2011, 17:22

Hi,

You can force the v-sync by calling:

Code: Select all
application.setOption ( application.kOptionSwapInterval, 1 )
User avatar
NiCoX
Platinum Boarder
Platinum Boarder
 
Posts: 5652
Location: France

Re: Too fast or out of sync?

Postby rusty » 06 Nov 2011, 12:03

No, it's a logic set of states that it gets out of sync with. (When a ball is fired, instead of waiting until finished, it jumps logic and resets)

I decided I will have a go at expanding it out into actual "states" to see if it solves it, but i'd rather keep this simple set of states within a single function.


However when I have time i'll extract a simple example to demonstrate.


*** One thought on the subject this week has been if an onIdle (even though it has a 1 sec threshold) is somehow still present just after the start of the shot (maybe due to multi-threading)
rusty
Expert Boarder
Expert Boarder
 
Posts: 106


Return to Microsoft Windows