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.

Newcomers DBPro Corner / Why is the sync rate declared?

Author
Message
thinkdigital
20
Years of Service
User Offline
Joined: 18th Oct 2003
Location:
Posted: 30th Oct 2004 10:46
I was looking at one of the DBC examples the other day, and I saw that they had put something like this in their code:



I've always assumed that the sync rate command was if you didn't have manual sync on. So why do they put both in the code?

"Never put off for tomorrow what you can put off for the day AFTER tomorrow..."

eGeneric Works DB site - www.egenericworks.com
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 30th Oct 2004 11:48
Sync rate is the max frame rate.

Quote: "I've seen the word programming and I'm not sure what it means. Anybody please explain?"


Quote: "We shouldn't sacrifice the truth to preserve "balance"."
Chris K
20
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 31st Oct 2004 00:26
It stops your game going insanely fast on amazing computers.

Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 31st Oct 2004 00:55
this way your code can never go over 40 fps no matter how simple it is, otherwise your orbiting cube would run at a reasonable 50 fps on a cheap laptop and an insane 1600fps on a decent desktop machine, needless to say 1600 fps is gonna be unplayably fast
the first command sets the max speed
the second makes sure that you only see changes when sync is called (so you get to see clear text onscreen for example)
try removeing sync and sync on from your code, the difference is noticable in many programs.

Mentor.

PC1: P4 3ghz, 1gig mem, 3x160gig hd`s, Radeon 9800pro w cooler (3rd gfx card), 6 way speakers.
PC2: AMD 2ghz, 512mb ram, FX5200 ultra, 16 bit SB.
Mini ATX cases suck.
thinkdigital
20
Years of Service
User Offline
Joined: 18th Oct 2003
Location:
Posted: 31st Oct 2004 01:46
Oh, that's useful. My computer isn't amazing, so I don't have that problem. Thanks.

(lol, just noticed I posted this in the wrong board)

"Never put off for tomorrow what you can put off for the day AFTER tomorrow..."

eGeneric Works DB site - www.egenericworks.com

Login to post a reply

Server time is: 2024-09-23 04:17:23
Your offset time is: 2024-09-23 04:17:23