Page 1 of 1

Speed adjustments - Win to Mac

Posted: Thu Feb 17, 2011 6:26 am
by J. Baker
So far I'm noticing that I'm having to add delays for Mac that I didn't have to on XP. For example, if you open Mesh.pb for the XP, it plays fine. Now if I open it on Mac, it spins like crazy. I have to add, Delay(10), just to make it function properly like it does on XP. Is this common for the Mac?

Re: Speed adjustments - Win to Mac

Posted: Sun Feb 20, 2011 8:13 am
by PureLeo
Not only for the Mac. I just changed my entire CPU and my old codes run lightning fast too.
Mac's processor should be a lot faster than your PC's...

If you dont use a Delay() or some kind of FPS calculation, you let the program run as fast as it can.

Re: Speed adjustments - Win to Mac

Posted: Tue Feb 22, 2011 4:05 pm
by Zach
This is why its important to decouple the display loop from the game logic loop, and also using things such as Timer Base Movement.

I'm sure someone around here should know what those are and have some good PB examples... Or at least have some analogues of the concepts.

If you design around your personal PC, with no regard for how you can limit or maintain your performance, you can't expect it to run properly on other peoples machines, or operating systems.


If your game runs "just right" on your mid-range PC, it will run too fast on a more powerful machine, and also run much too slow on a less powerful PC.

Timer Based movement by itself, can help to cope with that... So whether it is 4FPS or 400FPS your objects always move the same distance in the same amount of time, etc..