New issue 168 by nicolaperotto: High CPU usage
My CPU was always near 100% too when in the config page!
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
Unable to duplicate this problem over here.
Athlon X2 2.80 GHz, 2 GB ram, ATI Radeon x1200. Running the game in
spikes the CPU up to 65% at most. Anyone else experience this problem?
oh dear... how big your machine...
For example, I'm at the "Profession Selection" screen and there's no
all, only background music and the processor (Athlon X2 4200+) is running
Why??? It's only waiting for input...
In my experience this signify that there are something strange around!
There's no processor throttling in the game engine, so a dual-core CPU will
50% when TLC is running. Throttling the code is doable. In the core loop, a
check against 1-ms should cause a sleep(1) call, otherwise the regular
should occur. This is a good request, especially for laptop users running
on a battery.
My CPU is ALWAYS running close to 100% when TLC (BETA 4)is running in
window mode or
The only workaround I've found was to set Processor Affinity to 1 core.
Core2DUO E6850 @ 3.00 GHz
4 GB RAM DDR3 @ 1333 MHz
GeForce 8800 GTS
Windows Vista Ultimate 64
Comment #5 on issue 168 by jsharbour: High CPU usage
I'm working on this now. I never noticed it with a 4-core CPU. ;) Easy to
Comment #6 on issue 168 by jsharbour: High CPU usage
(No comment was entered for this change.)
Comment #7 on issue 168 by jsharbour: High CPU usage
Good grief what a pain this issue has been.. I have only partial success to
report now. The cpu doesn't peg at 100%, but it also doesn't get freed up
very often, as the % seems to vary wildly, but the game is running smoothly
and at 300 fps on my system. I am not sure what's causing this erratic cpu
usage. I went line by line through the core game loop, selectively
commenting out portions of the game, and nothing had an effect.
I gave it this little bit of stability by adding a timer to limit the
OpenGL rendering a bit, which is what dropped the cpu usage slightly, but
certainly not to an idle level. Something funky is going on with Allegro or
OpenGL that seems to be beyond our control at this point. Will keep working
on it.. At least this partial update will help a bit.
Note: on a multi-core system, this shouldn't be noticeable.
I am using a 4 year old, dual core system and this game runs without a
hitch. I have noticed that the CPU usage is normally around 50% regardless
of what I am doing in the game. But it is like this with every allegro
based game that I have made/played. I think it has something to do with the
main loop in WinMain(), which is implemented in the allegro library. The
newest version of the allegro library (4.4 I believe) allows you to define
a new WinMain() and WinProc() callback functions and use those instead.
However I think the allegro defaults are fine, performance wise.
Thank you, syntax, that's incredibly helpful to know! We were just going
back and forth on the issue yesterday, not sure what to do about it, and I
was beginning to suspect it was happening in another allegro thread that
was beyond our control. Your comment reinforces that idea. This isnt a bug
so much as a request because Allegro tends to eat laptop batteries for
Dave, how about we just restore the 60 fps timed code, put everything
inside it, and close this issue? It's beyond our control.