Computer Science Canada dynamic frames per second adjustment |
Author: | frank26080115 [ Wed Dec 27, 2006 8:07 pm ] | ||
Post subject: | dynamic frames per second adjustment | ||
this demo uses "Time.Elapsed" to calculate the real fps and compares it with the desired fps and adjusts the delay before a clearing of the screen accordingly. the number of dots drawn will be raised and lowered to generate different amount of lag. if the delay between frames is 0 or lower, it means the computer and the adjustment can no longer keep up, so i made sure that "framesdelay" can't go below -10 (or else, it actually makes it go too fast after a recovery) i think this will be useful for people making games like shoobyman's lord of the ring game and such if you get rid of the useless stuff (for demo only stuff) you can add this into your program
|
Author: | zylum [ Thu Dec 28, 2006 1:25 am ] |
Post subject: | |
you can do this simply by using Time.DelaySinceLast |
Author: | frank26080115 [ Thu Dec 28, 2006 2:49 am ] |
Post subject: | |
i believe you are living under the impression that my school has money, sure it can afford useless $3000 pan and tilt cameras to see who started a fire, but... this is what i had to work with lol (actually we have the new one but its not available for download) ![]() (i still press f10 a lot) damn it i can't even use math.distance so most of the codes you guys post won't work on my computer so use Time.DelaySinceLast if you can |
Author: | BenLi [ Thu Dec 28, 2006 11:21 am ] | ||
Post subject: | |||
... Merry Christmas |
Author: | shoobyman [ Fri Dec 29, 2006 2:42 pm ] |
Post subject: | |
that is a cool idea. but... our school version does have Time.DelaySinceLast. if your home one doesn't have it, i think the school version updated theirs so you can get it again. All i know is my home version has it and so does the schools. cool program though. |
Author: | ericfourfour [ Fri Dec 29, 2006 4:20 pm ] |
Post subject: | |
How about frame rate independent gameplay. The code is in c++ but the tutorial is pretty much universal to all languages. |