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.

Code Snippets / Sample of a code that makes games run at the same speed in every cpu

Author
Message
3dZmaster
20
Years of Service
User Offline
Joined: 30th Jun 2003
Location: Finland
Posted: 17th Jul 2003 23:19 Edited at: 17th Jul 2003 23:21
Ok, I don't know if everybody already knows this, or doesn't need but I decided to post it anyway. Ok this uses the timer() function as IanM adviced me to do. I couldn't find any example from his web site (Don't know why. Maybe I'm just stupid ) wich propaply contains this same. This should do the thing, thought I'm not 100000000% sure. You can try it by putting thousand lines of "print"s in the sourceĀ“and noticing that it still runs at the same speed. Or then if you have older computer then try with it. Please post if you notice any bugs! And if it works, post that too! THANX!!! Hope this helps you...




Current project: Dodge Viper Car Game (Not named yet) Other car models are going to be included soon
3dZmaster
20
Years of Service
User Offline
Joined: 30th Jun 2003
Location: Finland
Posted: 17th Jul 2003 23:29
Oh, and this goes only for PRO, but someone with classic could fix it. It is because I used the Set camera to follow command.

Current project: Dodge Viper Car Game (Not named yet) Other car models are going to be included soon
3dZmaster
20
Years of Service
User Offline
Joined: 30th Jun 2003
Location: Finland
Posted: 17th Jul 2003 23:36 Edited at: 17th Jul 2003 23:48
Ok. I added "rem"s and fixed the variable more clearer.




Current project: Dodge Viper Car Game (Not named yet) Other car models are going to be included soon
3dZmaster
20
Years of Service
User Offline
Joined: 30th Jun 2003
Location: Finland
Posted: 17th Jul 2003 23:59
Now I made new camera code and added FPS shower.
Use this!!!
This works in classic too(I think so) and is better in DBpro
(cause with the "set camera to follow" I didn't manage to get the smooth value to match the timer).




Current project: Dodge Viper Car Game (Not named yet) Other car models are going to be included soon

Login to post a reply

Server time is: 2024-03-28 17:05:04
Your offset time is: 2024-03-28 17:05:04