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
Peon
Peon
Posts: 83
Joined: 22 Jan 2009, 17:04

Is it me, or TMW eats lots of CPU?

Post by Alxe » 17 Apr 2009, 21:02

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
MadCamel
TMW Adviser
TMW Adviser
Posts: 605
Joined: 02 Jan 2009, 05:19
Location: Catland

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

Post by MadCamel » 17 Apr 2009, 21:04

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
Peon
Peon
Posts: 83
Joined: 22 Jan 2009, 17:04

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

Post by Alxe » 17 Apr 2009, 21:14

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

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

Post by Jaxad0127 » 17 Apr 2009, 21:35

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

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

Post by Alxe » 17 Apr 2009, 22:08

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, 13:36

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

Post by trapdoor » 23 Apr 2009, 18:19

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
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

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

Post by Jaxad0127 » 23 Apr 2009, 18:21

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, 17:08
Location: Germany

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

Post by Crush » 23 Apr 2009, 19:35

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, 13:36

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

Post by trapdoor » 27 Apr 2009, 11:15

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
t3st3r
Novice
Novice
Posts: 319
Joined: 11 Jun 2009, 13:46

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

Post by t3st3r » 11 Jun 2009, 14:34

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
Peon
Peon
Posts: 68
Joined: 10 May 2009, 14:18

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

Post by aroleon » 11 Jun 2009, 15:07

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
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

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

Post by Jaxad0127 » 11 Jun 2009, 16:42

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, 17:08
Location: Germany

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

Post by Crush » 11 Jun 2009, 17:59

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
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

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

Post by Jaxad0127 » 11 Jun 2009, 18:31

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
t3st3r
Novice
Novice
Posts: 319
Joined: 11 Jun 2009, 13:46

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

Post by t3st3r » 13 Jun 2009, 10:03

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