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 / stop decrease / increase number

Author
Message
AriEf
14
Years of Service
User Offline
Joined: 30th Nov 2009
Location: Indonesia
Posted: 19th Dec 2011 15:58

in the code, the variable value of the numbers would be 2,4,6,8,10, ...
so my question is how to stop a variable accretion rate?
just like the 0 + 2 = 2 but still in a While

P.S : I Am Using Google Translate Lol

Rank : Beginner Coder
Im Indonesian, and I cant speak english, i hope you understand
mr_d
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Mar 2007
Location: Somewhere In Australia
Posted: 19th Dec 2011 16:19
Hi, if I'm understanding what you are asking properly, the way I'd do this is the same way I have done so to mainain steady framerate in my game, and that is to basically use a timer to make sure the interval between increments is relatively the same. i.e in pseudo-code:

this will mean that number is incremented only after the INTERVAL has elapsed. i.e. it is providing a minimum delay only, and does not guarantee that the accretion rate is always the same.
hope this helps.

Login to post a reply

Server time is: 2024-11-19 05:14:32
Your offset time is: 2024-11-19 05:14:32