Kris Schnee wrote: > James Paige wrote: >> On Mon, Apr 23, 2007 at 02:18:36PM -0700, Dave LeCompte (really) wrote: >>> By definition, wasting cycles is bad, and if the CPU is running at 25%, >>> that would be 75% waste, right? > And what's the benefit to using active waiting or no waiting in a game's > main loop? With a simple, passive delay you get a regulated framerate > (good for when someone plays your game in five years on a much faster > machine) and are considerate of other programs. The only advantage of > active waiting seems to be a slight improvement in framerate timing, > which no one will notice.
I think Dave LeCompte was trying to argue that if you know how much CPU you have, you can use it to better effect in your game -- for example with more accurate physics or more realistic AI. I don't necessarily agree with this argument, but it's better than just busy-looping. I think having a game (or any program) that arbitrarily behaves different on different machines is generally a bad thing and should be made extremely clear to the user if done at all. In particular I think "gaming" the program by running more programs so you get a dumber AI is something you might want to be aware of. Besides, if everyone gets a different experience with your game, how will they be able to talk about it around the water cooler? ("Oh, that boss? He was easy! The AI is so bad in that game..") Ethan
signature.asc
Description: OpenPGP digital signature