Issue 168 in starflighttlc: High CPU usage

11 views
Skip to first unread message

starfl...@googlecode.com

unread,
Jan 10, 2010, 4:00:55 PM1/10/10
to starfl...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 168 by nicolaperotto: High CPU usage
http://code.google.com/p/starflighttlc/issues/detail?id=168

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:
http://code.google.com/hosting/settings

starfl...@googlecode.com

unread,
Jan 27, 2010, 11:27:24 PM1/27/10
to starfl...@googlegroups.com

Comment #1 on issue 168 by swirsz: High CPU usage
http://code.google.com/p/starflighttlc/issues/detail?id=168

Unable to duplicate this problem over here.

Athlon X2 2.80 GHz, 2 GB ram, ATI Radeon x1200. Running the game in
windowed mode
spikes the CPU up to 65% at most. Anyone else experience this problem?
What hardware?

starfl...@googlecode.com

unread,
Jan 28, 2010, 6:14:59 AM1/28/10
to starfl...@googlegroups.com

Comment #2 on issue 168 by nicolaperotto: High CPU usage
http://code.google.com/p/starflighttlc/issues/detail?id=168

oh dear... how big your machine...
For example, I'm at the "Profession Selection" screen and there's no
animation at
all, only background music and the processor (Athlon X2 4200+) is running
at more
than 50%.
Why??? It's only waiting for input...
In my experience this signify that there are something strange around!

starfl...@googlecode.com

unread,
Jan 28, 2010, 1:22:38 PM1/28/10
to starfl...@googlegroups.com

Comment #3 on issue 168 by jsharbour: High CPU usage
http://code.google.com/p/starflighttlc/issues/detail?id=168

There's no processor throttling in the game engine, so a dual-core CPU will
peg at
50% when TLC is running. Throttling the code is doable. In the core loop, a
timing
check against 1-ms should cause a sleep(1) call, otherwise the regular
engine update
should occur. This is a good request, especially for laptop users running
on a battery.

starfl...@googlecode.com

unread,
Mar 14, 2010, 7:55:55 AM3/14/10
to starfl...@googlegroups.com

Comment #4 on issue 168 by bmaparicio: High CPU usage
http://code.google.com/p/starflighttlc/issues/detail?id=168

My CPU is ALWAYS running close to 100% when TLC (BETA 4)is running in
window mode or
full screen.
The only workaround I've found was to set Processor Affinity to 1 core.

My specs:
Core2DUO E6850 @ 3.00 GHz
4 GB RAM DDR3 @ 1333 MHz
GeForce 8800 GTS
Windows Vista Ultimate 64

starfl...@googlecode.com

unread,
Aug 13, 2010, 10:38:48 PM8/13/10
to starfl...@googlegroups.com
Updates:
Status: Accepted
Labels: -Priority-Medium Priority-High

Comment #5 on issue 168 by jsharbour: High CPU usage
http://code.google.com/p/starflighttlc/issues/detail?id=168

I'm working on this now. I never noticed it with a 4-core CPU. ;) Easy to
fix..


starfl...@googlecode.com

unread,
Aug 13, 2010, 10:43:02 PM8/13/10
to starfl...@googlegroups.com
Updates:
Owner: jsharbour

Comment #6 on issue 168 by jsharbour: High CPU usage
http://code.google.com/p/starflighttlc/issues/detail?id=168

(No comment was entered for this change.)

starfl...@googlecode.com

unread,
Sep 16, 2010, 9:29:21 PM9/16/10
to starfl...@googlegroups.com
Updates:
Labels: -Priority-High Priority-Medium

Comment #7 on issue 168 by jsharbour: High CPU usage
http://code.google.com/p/starflighttlc/issues/detail?id=168

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.


starfl...@googlecode.com

unread,
Sep 26, 2010, 12:18:15 AM9/26/10
to starfl...@googlegroups.com

Comment #8 on issue 168 by syntaxerror.unknown: High CPU usage
http://code.google.com/p/starflighttlc/issues/detail?id=168

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.

starfl...@googlecode.com

unread,
Sep 26, 2010, 4:34:19 PM9/26/10
to starfl...@googlegroups.com

Comment #9 on issue 168 by jsharbour: High CPU usage
http://code.google.com/p/starflighttlc/issues/detail?id=168

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
breakfast.

Dave, how about we just restore the 60 fps timed code, put everything
inside it, and close this issue? It's beyond our control.

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages