Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / WTF? too fast

Author
Message
thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 27th Jul 2009 23:39
idk wat happened but when i debug my program, everything is in a VERY VERY fast motion... it wasnt that fast before...i must have pressed a certain key combination while i was debugging.. idk. i restarted my PC and everything. still fast as heck... its not as fast when i enter ironsights mode tho( i remove the player and all that and replace it with iron sights)
Phosphoer
16
Years of Service
User Offline
Joined: 8th Dec 2007
Location: Seattle
Posted: 27th Jul 2009 23:54
Did you change sync rate to 0 or something? Try setting up timer based movement so that everything moves always at the same speed.

thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 28th Jul 2009 00:13 Edited at: 28th Jul 2009 00:19
how would i set a timer based movement? the db sync is still 60..i'm really confused.. there is also a significant drop in frame rate from Outside view to ironsights.. 59 - 19 FPS
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 28th Jul 2009 00:16 Edited at: 28th Jul 2009 00:20
Just curious why do you have dbSyncRate ( 60 ) twice?

Use Google first... it's not rocket surgery!
thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 28th Jul 2009 00:20 Edited at: 28th Jul 2009 00:26
i do? hmm, never realized it.. i erased it but still it didnt do anything, even the sound is sped up.. i really dont know wats happening and i'm freaking out a lil bit(i've been working on this game for a long while.... now i get buffer overun errors after debugging
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 28th Jul 2009 01:59 Edited at: 28th Jul 2009 02:00
Try setting you sync rate and turning vsync on before you initialize your display with dbSetDisplayMode...

It might not make a difference, but I know from using commands like dbOverrideHWND() that where you place calls that initialize the display can affect things.

for example, If you call dbSetDisplayMode BEFORE you override the window handle, your override wont work.

Perhaps its the same, if you set the display mode before you set the syncrate, maybe you can no longer set the sync rate ?(I know that doesnt really make sense, but some things in GDK dont lol)

Also another thing to check is that you have VSync enabled and application controlled from inside your video driver software

If it ain't broke.... DONT FIX IT !!!
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 28th Jul 2009 10:36
Quote: "how would i set a timer based movement?"


Use dbTimer() to query time ticks. Store the return value in a variable. In every loop, compare how much time has elapsed since the last loop (difference between the variable and a new dbTimer() call), then store the timer value again for the next comparison. Then define speeds for all your moving objects, and multiply the speed always by the timer difference.
Jumpster
16
Years of Service
User Offline
Joined: 7th Feb 2008
Location:
Posted: 28th Jul 2009 15:31
It sounds to me like you have a short-circuit in your logic. That is, you have (for example):

if (condition is true) { // A test for somthing that's usually TRUE
Do Some rather time-consuming operation...
endif


In short, something has changed and now the rather time-consuming operation isn't being executed anymore - OR: you've recently optimized the time-consuming operation (ie: BSP vs Brute-Force culling?)

Albiet, I admit, the dbSyncRate(60) seems like it would *handle* the difference for you - but, then again, if you were considerably slower than 60 (due to the time-consuming operation) - speeding back up to 60fps would make things considerably faster...

Just going by what I've personally experienced and putting that experience into what I'm reading from your description of the problem...

Regards,
Jumpster
thm120
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location:
Posted: 1st Aug 2009 00:10
still nothing.. really this thing happened just like that, 1 second i'm debugging and all is fine, the next second, i guess i pressed a sacred button combo and everything goes super fast.. my only option now is to completely rebuild this game
Bubzy
15
Years of Service
User Offline
Joined: 29th Jun 2009
Location: somewhere
Posted: 1st Aug 2009 00:50
it might help if you posted your whole code its very difficult to offer advice on a description of a problem.

void void void void void void void

Login to post a reply

Server time is: 2024-10-01 08:37:33
Your offset time is: 2024-10-01 08:37:33