Is it me, or TMW eats lots of CPU?

Ask for help regarding any technical issue or report any bug or OS independent issues.
Alxe
Novice
Novice
Posts: 83
Joined: 22 Jan 2009, 16:04

Is it me, or TMW eats lots of CPU?

Post by Alxe »

At first it didn't eat that much, but quickly began to spread and usually makes my applet on my gnome-panel indicate that it's like 50%. My computer runs on a 0% even with lots of browsers open and listening to music. But seems TMW makes my xorg, or other app, to get like mad and eat resources.

That's most likely why I don't play usually.
Arch64 - We power it
Nickname: Alxe
User avatar
AnonDuck
TMW Adviser
TMW Adviser
Posts: 645
Joined: 02 Jan 2009, 04:19
Location: Catland

Re: Is it me, or TMW eats lots of CPU?

Post by AnonDuck »

It does eat a lot of CPU. Try setting a framelimit in setup, I use 15fps to keep my laptop nice and cool but most people prefer 30ish
Head of the TMW Illuminati
Alxe
Novice
Novice
Posts: 83
Joined: 22 Jan 2009, 16:04

Re: Is it me, or TMW eats lots of CPU?

Post by Alxe »

I prefer to have a stable CPU usage than a comp-killer app :/
Arch64 - We power it
Nickname: Alxe
User avatar
Jaxad0127
Manasource
Manasource
Posts: 4209
Joined: 01 Nov 2007, 17:35
Location: Internet

Re: Is it me, or TMW eats lots of CPU?

Post by Jaxad0127 »

Alxe wrote:I prefer to have a stable CPU usage than a comp-killer app :/
So tune down the framerate.
Image
Alxe
Novice
Novice
Posts: 83
Joined: 22 Jan 2009, 16:04

Re: Is it me, or TMW eats lots of CPU?

Post by Alxe »

It seemed weird in 15 frames, but I guess I'll have to get used. By the way, is this just about "crap" in the code? Or it's just that TMW has to load lots of resources, and such?
Arch64 - We power it
Nickname: Alxe
User avatar
trapdoor
Novice
Novice
Posts: 216
Joined: 18 Feb 2007, 12:36

Re: Is it me, or TMW eats lots of CPU?

Post by trapdoor »

I think most if not all games try to use 100% cpu, because games tend to be resource hungry and it doesnt make sense not to try and use as much resources as possible to get the best performance for the player.

TMW being 2d, means that we understand a lot of people dont want 100% cpu being used, which is why we have the frame limiter, I seriously doubt you will find one of them on Crysis ;)

If you turn off particles or use OpenGL, it should lessen the load on the CPU, although theres been mixed results with using OpenGL.

--
trapdoor
User avatar
Jaxad0127
Manasource
Manasource
Posts: 4209
Joined: 01 Nov 2007, 17:35
Location: Internet

Re: Is it me, or TMW eats lots of CPU?

Post by Jaxad0127 »

trapdoor wrote:although theres been mixed results with using OpenGL.
That should be fixed now.
Image
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Re: Is it me, or TMW eats lots of CPU?

Post by Crush »

Particle effects are not really that resource-hungry.

I made the experience that reducing the desktops color resolution to 16 bit more than doubles the framerate and has almost no visible effect because of our color-conserving graphic style. But this experience has been made on windows.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
trapdoor
Novice
Novice
Posts: 216
Joined: 18 Feb 2007, 12:36

Re: Is it me, or TMW eats lots of CPU?

Post by trapdoor »

I actually cant run the game with particle effects enabled since it goes too slowly, when I turn them off, I get a steady 12 fps.

--
trapdoor
User avatar
Hello=)
TMW Classic
TMW Classic
Posts: 656
Joined: 11 Jun 2009, 12:46

Re: Is it me, or TMW eats lots of CPU?

Post by Hello=) »

trapdoor wrote:seriously doubt you will find one of them on Crysis ;)
But any decent 3D game provides quality tuning instead. So you can get decent FPS on hardware you have (except completely outdated stuff of course).

However, 3D games are usually played in full screen mode on powerful machine so CPU load is not an issue. And they have lots of stuff to compute since they have to display 3D stuff to 2D screen, compute some effects in 3D, etc.

But it can make sense to play 2D RPG in windowed mode. Because RPG is "infinite" type of game which never really ends so user may want to occasionally switch to some other tasks at some moment and then return back to the game. That's where CPU load getting annoying. As for me, it makes little sense to try to refresh screen more frequently than it's hardware framerate (which is 60Hz for my LCD screen and totally fine). So with 60Hz limit I got somewhat reduced CPU load on most of maps (I have 2-core CPU though so "reduced" is quite specific term). But still, CPU usage is a bit excessive from my point of view? What requires such decent CPU load? There is some 60-70% CPU load on some quite static maps. For example, on maps/003-1.tmx, no monsters or players on screen. No animations I can see on this map. Picture looks static. But still 60% CPU used. Quite strange. Never seen 2D game which eats 60% CPU to display completely static scene. In overall my CPU can cope with it but I guess CPU usage could be better.

P.S. Sorry for some annoyance and thanks for good opensource game, regardless of minor issues. I'm really having fun. Never expected I will play RPGs, ever, but... :mrgreen: :wink:
aroleon
Novice
Novice
Posts: 68
Joined: 10 May 2009, 13:18

Re: Is it me, or TMW eats lots of CPU?

Post by aroleon »

On Linux, if I alt-tab to another window, the CPU usage remains constant, but if I minimize to an icon, or change to another workspace, then the CPU usage is minimal, I guess because nothing is being displayed. I have an old old graphics card, so my CPU does most of the graphics handling; those with GPUs or modern graphics cards might have different experiences.

aro
User avatar
Jaxad0127
Manasource
Manasource
Posts: 4209
Joined: 01 Nov 2007, 17:35
Location: Internet

Re: Is it me, or TMW eats lots of CPU?

Post by Jaxad0127 »

aroleon wrote:On Linux, if I alt-tab to another window, the CPU usage remains constant, but if I minimize to an icon, or change to another workspace, then the CPU usage is minimal, I guess because nothing is being displayed. I have an old old graphics card, so my CPU does most of the graphics handling; those with GPUs or modern graphics cards might have different experiences.

aro
Yes. Our profiling shows drawing takes a good amount of the time the game uses.
Image
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Re: Is it me, or TMW eats lots of CPU?

Post by Crush »

The drawing is the bottleneck of almost every game. Only those games with very CPU-intense gameplay and very minimal graphics are exempt. Like dwarf fortress, for example.

I mean what is the TMW client doing besides drawing? All the game mechanics are handled by the server. Everything the client does in moving the sprites like the server tells it to, handling user input, handle the GUI logic and calculating particle positions. We would have really screwed up when this takes more processing power than drawing 480.000 pixels every frame.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
Jaxad0127
Manasource
Manasource
Posts: 4209
Joined: 01 Nov 2007, 17:35
Location: Internet

Re: Is it me, or TMW eats lots of CPU?

Post by Jaxad0127 »

Looking over our profiling again, as well as the code, much of our time is spent handling gui logic, which doesn't happen if the gui isn't visible (minimized, not hidden).
Image
User avatar
Hello=)
TMW Classic
TMW Classic
Posts: 656
Joined: 11 Jun 2009, 12:46

Re: Is it me, or TMW eats lots of CPU?

Post by Hello=) »

aroleon wrote:On Linux, if I alt-tab to another window, the CPU usage remains constant, but if I minimize to an icon, or change to another workspace, then the CPU usage is minimal, I guess because nothing is being displayed. I have an old old graphics card, so my CPU does most of the graphics handling; those with GPUs or modern graphics cards might have different experiences.

aro
Thanks for hint. Really helps to offload CPU for other tasks when doing something else and CPU load is not important when playing :mrgreen:. I was never able to imagine such simple thing can offload CPU so much.
Post Reply