.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
The Star and the Crescent- Save $9.00

   







Go Back   .com.unity Forums > The Camo Workshop > WinSPMBT
Notices


Reply
 
Thread Tools Display Modes
  #1  
Old September 7th, 2010, 04:57 PM
Mobhack's Avatar

Mobhack Mobhack is offline
National Security Advisor
 
Join Date: Mar 2005
Location: Dundee
Posts: 6,003
Thanks: 495
Thanked 1,942 Times in 1,261 Posts
Mobhack is on a distinguished road
Default Re: cpu consumption

Quote:
Originally Posted by hawk66 View Post
Hi,

don't know if that was discussed before or if I have over-read this in the doc (wouldn't be the first time ):

Even if Winspmbt(CD-version) is idle, it consumes ~25% of the cpu(quad-core)...any reason for this...perhaps the used libraries to bridge that DOS-coding to Windows?

Might be a slight problem if you try to play that game on a netbook since it consumes more power than necessary...
That is because it is a game and not some office application.

Games are in a tight continuously running game loop, using idle time to do things like the palette cycling that does "moving" smoke, and redrawing the map several times a second to allow for animations. They are usually not very cooperative with other applications (ours allows a short amount of sleep time to allow office apps some CPU).

Office applications are in a wait state for the user to actually do something most of the time (type a key, press the mouse).

Games therefore assume they own the machine - you have started the thing in order to play the game, not do work !. If you actually are not doing something in a WP package, it is effectively doing nothing other than occupying RAM. Most games are always doing something that uses CPU, even if the end user is not focussed on the game window at the time.

Cheers
Andy
Reply With Quote
  #2  
Old September 10th, 2010, 08:53 AM

dmnt dmnt is offline
Sergeant
 
Join Date: Jan 2010
Location: Espoo, Finland
Posts: 359
Thanks: 56
Thanked 136 Times in 104 Posts
dmnt is on a distinguished road
Lightbulb Re: cpu consumption

I work as a programmer in the software industry and often write multi-threaded applications and I have noticed the same that the other gamers above.

I wonder if there is no "sleep" or "wait" periods within the game? I'm running winspmbt on a single core machine and it then naturally takes 100% of the computing time available for it. Not that it's a big problem, but while drawing maps for the game the responsiveness of other windows could be better if it didn't.

Is there any wait loop where the software could sleep() for couple of milliseconds or possibility of yielding by sleeping 0 milliseconds whenever there's "nothing to do". Of course I understand that the base program was written at the ages when CPUs were never idling but working in a busy loop and there was no multitasking. All computers wait at the same speed - maybe there's a place somewhere for this little sleep routine?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 11:47 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.