Forums » General

CPU usage

«12
Aug 20, 2003 Nighty link
You could add sleep() instructions when in menus. ;)
Aug 20, 2003 Arolte link
Woohoo, I was right. Although I didn't mean the rendering of 3D polygons in the background while displaying menus, but rather using the same engine to do the menu rendering with hardware acceleration.

/me hugs a1k0n
Aug 20, 2003 a1k0n link
Just.. shut up, you two.

The game will always eat 100% for a very simple reason. It's written as a game:
while(1) { UpdatePhysics(); UpdateMenusAndStuff(); RenderScreen(); }

and not as an application:
while((e=WaitForEvent()) != QUIT) { HandleEvent(e); RenderScreenIfItChanged(); }

i.e. it's polling instead of blocking (waiting) at all times. Even in the menus, although it could block there when the animations are done. It doesn't because we'd have to special-case the central event handling code for menus and we never considered it important. It has nothing to do with rendering 3D in the background; the text and menus are just as much polygonal geometry as everything else in the game.
Aug 22, 2003 The Kid link
oh yeah.. I got vendetta to run on 12% or so CPU yesterday, it was really sluggish. 33% or around there don't seem so sluggish for me (Pentium 4 1.7ghz but with SDRAM :( ).