Thread: Remake
View Single Post
  #6  
Old March 14th, 2008, 12:58 PM
Mobhack's Avatar

Mobhack Mobhack is offline
National Security Advisor
 
Join Date: Mar 2005
Location: Dundee
Posts: 5,988
Thanks: 482
Thanked 1,922 Times in 1,250 Posts
Mobhack is on a distinguished road
Default Re: Remake

Quote:
Horses said:
Probably there is also a possibility to optimize the code.
The Cpu load is in windowed mode very high-even on very fast machines.
Well, of course it is as it is a game.

While (running)
pump graphics to screen
if (check things)react to things
end;

At a minimum, it will be cycling the colour palette even if you are not doing anything (like moving units) - so you can have nice billowing smoke and water effects etc.

The only games that will not do this are those based on the windows message loop principle - do nothing, wait till the end user pokes a key. Only simple little card games and so on can use that strategy (like those provided with windows - minesweeper etc).

If you want an example of the simple windows application at work - run the GameOptions dialogue (not the game) and check CPU usage, as that is a simple windows app, reacting to user mouse pokes.
Reply With Quote