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.

DarkBASIC Professional Discussion / stutter during screen update

Author
Message
Xcom commander
17
Years of Service
User Offline
Joined: 21st Dec 2007
Location:
Posted: 30th Dec 2013 14:39
I have been away a while and recently bought another copy of Pro, I wrote a simple test piece just to get back up to speed, but I have immediately hit a snag, I have a quad core i7 running at 3.4ghz, 8 gig of ram and a GeForce GTX660 graphics card, running Win7.

should be powerful enough imo, but my simple test app is stuttering markedly on the screen updates.

I am including the code (needs no media)




why doesn't it run smoothly? code error? or have I misunderstood Vsync?, I don't recall this happening a few years back when I was playing about with Pro on a much less powerful machine.

what I am seeing is both the ball and the bat halt/glitch as they move on a regular cycle, it's not apparent every frame, about every half second.

any suggestions welcome.
Rudolpho
19
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 30th Dec 2013 20:05
Quote: "what I am seeing is both the ball and the bat halt/glitch as they move on a regular cycle, it's not apparent every frame, about every half second."

That does not happen for me.
I have a 6-core (hyper threaded to act like 12 cores) 3.2GHz i7, 16Gb RAM and a GTX680; your specs shouldn't matter much for that kind of application though.

VSync should be used like that (beware that if you render several cameras separately it will enforce 60 FPS / whatever your monitor runs at for each render though, so if you have 4 render passes you would end up with 20FPS in total; I think fastsync doesn't impose this limitation though).

You could try setting your sync rate to 0; it should be updated to reflect your monitor's refresh rate automatically but if it doesn't and your monitor runs at 50Hz you may get those issues you are describing. You should also try printing your actual FPS to the screen; perchance it is dropping for some reason.


"Why do programmers get Halloween and Christmas mixed up?"
29 games
19
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 30th Dec 2013 21:18
Hi Xcom, to echo what Rudolpho said, I had the exact problem you described on my new computer (similar spec to yours) and it was due to the monitor refreshing at 40 fps with the game's sync rate set to 60. I set my monitor to 60 and the problem went away. I ran the code you posted and it worked fine for me.

Login to post a reply

Server time is: 2025-05-16 00:04:42
Your offset time is: 2025-05-16 00:04:42