FreeOrion

Forums for the FreeOrion project
It is currently Sat Dec 16, 2017 7:22 am

All times are UTC




Post new topic Reply to topic  [ 83 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
PostPosted: Wed Oct 09, 2013 8:55 pm 
Offline
Space Squid
User avatar

Joined: Fri Jun 28, 2013 6:15 pm
Posts: 55
I'd wish to pose some questions about graphics just to feed my curiosity. This prolly has been discussed a hefty amount of times, yet I'm trying to clarify the reason. Freeorion, even on an "idle" state consumes an insane amount of CPU (almost always at 90-100% on a Intel I5, 55% when limiting FPS to around 24). What's the reason for such high consumption? Is it due to GG or OGRE itself? Does the screen completely redraw itself each time instead of just redrawing what's moving?

Thank you and greetings.


Top
 Profile  
 
PostPosted: Wed Oct 09, 2013 9:01 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12042
Location: Munich
Rydra wrote:
Does the screen completely redraw itself each time instead of just redrawing what's moving?
Yes.


Top
 Profile  
 
PostPosted: Thu Oct 10, 2013 8:18 am 
Offline
Space Squid
User avatar

Joined: Fri Jun 28, 2013 6:15 pm
Posts: 55
But... that's extremely inefficient IMHO. Is it the way GG is implemented or is it inherent to OGRE? Just asking.


Top
 Profile  
 
PostPosted: Thu Oct 10, 2013 12:56 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12042
Location: Munich
I think GG is designed to render the UI every frame. Things animate in FO, so frequent rendering is required. If you want to limit rendering resource usage, use the FPS limit setting.


Top
 Profile  
 
PostPosted: Thu Oct 10, 2013 2:11 pm 
Offline
Space Squid
User avatar

Joined: Fri Jun 28, 2013 6:15 pm
Posts: 55
Geoff the Medio wrote:
I think GG is designed to render the UI every frame. Things animate in FO, so frequent rendering is required. If you want to limit rendering resource usage, use the FPS limit setting.


Other games (Urban Terror or Battle for Wesnoth come to my mind) require frequent rendering as well, without that much hit on CPU usage... but ohh well...


Top
 Profile  
 
PostPosted: Tue Dec 03, 2013 3:40 pm 
Offline
Space Dragon
User avatar

Joined: Tue Sep 20, 2011 10:32 pm
Posts: 411
Location: Halle (Saale)
TORCS is a 3D racing car simulator. With max eye candy settings at 100% CPU/GPU, it renders 300 FPS on my machine. Freeorion renders 15 FPS. Fifteen. There's clearly some problem with rendering here, and I'm fairly certain it's not OGRE's fault. :p

_________________
Yesterday, we were still on the brink. Fortunately, today we have come one step further.


Top
 Profile  
 
PostPosted: Tue Dec 03, 2013 4:24 pm 
Offline
Space Kraken

Joined: Fri Nov 22, 2013 8:47 pm
Posts: 124
I agree that it seems too heavy on rendering for a turn based game.

But developing the game part of the game seems more important than optimizing the engine.

The engine is perfectly workable as is, and not too heavy on my CPU when I crank down the frame rate.

At some point later someone good with graphics can turn the galaxy map into a static texture for each turn, and tune the refresh rates seperately for the seperate items.

_________________
Everything I post is self-created unless noted otherwise. It is simultaneously released under GPL 2.0 or later, CC Attribution-Share Alike 3.0, and GNU Free Documentation 1.2. Make something awesome with it please!


Top
 Profile  
 
PostPosted: Tue Dec 03, 2013 4:32 pm 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3295
shawndream wrote:
But developing the game part of the game seems more important than optimizing the engine.

The engine is perfectly workable as is, and not too heavy on my CPU when I crank down the frame rate.

I play on a laptop, which wasn't top of the range when I bought it three years ago, even with the framerate cranked down I've seen it hit 95% of my CPU and it's simply impossible to play on battery (the life of which is otherwise quite good given the hammering I've given it).

I thought Flash based games ate battery life and similar, that's nothing compared to FO, if it gets any worse I'll have to find a different game (and it has been slowly getting worse over time, but the most recent test release appears to be a big improvement, but still on game #1 with that).

If the test versions of the game become unplayable in such a way that testers and similar are forced to drop out because their system can't handle it, then that's a problem in itself—I would love to be able to justify a new machine. I'd love to have the option of considering it, frankly, but I don't. I have huge amounts of free time to contribute to something, and I'd like FO to get the lions share of that, but the performance issues are getting close to preventing it.

Short version: if the engine isn't optimised as the game progresses, then a) some testers will have to stop playing and b) it might become an even bigger job fixing it later on.

_________________
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Tue Dec 03, 2013 4:45 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12042
Location: Munich
MatGB wrote:
...even with the framerate cranked down I've seen it hit 95% of my CPU and it's simply impossible to play on battery (the life of which is otherwise quite good given the hammering I've given it).
Have you disabled galaxy gas and starfields rendering? Turning on / off optimized system rendering and detection range circles might also help. Playing with fewer systems, AIs, and monsters might also help.


Top
 Profile  
 
PostPosted: Tue Dec 03, 2013 5:35 pm 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3295
Geoff the Medio wrote:
Have you disabled galaxy gas and starfields rendering?

That makes little to no difference, have tried it several times.
Quote:
Turning on / off optimized system rendering and detection range circles might also help.
Circles makes no difference, but I'd never registered the optimised rendering option before, have now turned it off but as I'm playing with the most recent test which has a lot of cleanup in other code it'll be harder to see any difference. I was mostly replying to Shawn's "it doesn't really matter" point as to me, for obvious reasons, it does, but I'm convinced the problems I experienced are unrelated to graphics, the biggest issues are planet selection, production queue changes and focus changing (and yes, when I start to encounter it again I'll be sending up a logfile).
Quote:
Playing with fewer systems, AIs, and monsters might also help.

All of these do make a difference, yes, I had been limiting my games to no more than ~180 systems and limited AI numbers, plus reducing monsters helps the AI a bit as well, but at Dilvish's suggestion I've been cranking up my game sizes recently to see how well things are doing with the more recent changes.

Depending on AI settings I can now comfortably play up to ~250 systems without serious issue except once I get to 150+ colonies production queue problems and focus change delays start to kick in, I've not had to adandon a game completely recently, which I had done in the past (and uploaded at least one savegame), but it came close with the game I finished yesterday, in that case everything was fine until the turn I let 300+ ships finish production in one go (turn 198, I had stargates at every system near the Experimentors and all AIs were dead), at that point the game slowed to a crawl, it really didn't like having that many ships and that was the only real change to the previous turn.

The game I started late last night after DLing the newly compiled test release has 250 systems, I have 101 planets but am about to defeat the last AI, so nott as good a test as I'd wanted, need to get a game to 150+ planets to see if things have improved on that score, and might launch a massive fleet at some point before finishing to see if that still creates the lag.

The biggest CPU drain I ever saw was when I saved a game wher eI'd conquered half a fairly large galaxy, then loaded it in multiplayer assignign an AI to my empire, that AI on its own took 50%+ of my CPU processing its turns, not a fair test I know but indicative, a succesful AI drains the system to a fairly large degree.

_________________
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Tue Dec 03, 2013 9:30 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4390
MatGB wrote:
...I'm convinced the problems I experienced are unrelated to graphics, the biggest issues are planet selection, production queue changes and focus changing (and yes, when I start to encounter it again I'll be sending up a logfile).
I'm hopeful that may be a while -- in my tests it looked like those procedures benefited from the recent changes even to a greater degree than the turn initialization processes.

Quote:
The biggest CPU drain I ever saw was when I saved a game wher eI'd conquered half a fairly large galaxy, then loaded it in multiplayer assignign an AI to my empire, that AI on its own took 50%+ of my CPU processing its turns, not a fair test I know but indicative, a succesful AI drains the system to a fairly large degree.
The AI was also being slowed down by the demands of Condition evaluation; the recent changes to the Condition code has substantially sped up the AI as well. The biggest current AI cpu sinks appear to be the colonization evaluation of planets and the closely related invasion evaluations; they are each taking around 10 ms per planet on my system. I'll be looking into trying to improve that.

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Fri Nov 21, 2014 6:28 am 
Offline
Space Krill

Joined: Fri Nov 21, 2014 6:09 am
Posts: 3
Hallo, i´new here... i find this topic "performance" and dont want to open a new topic. I only want post Screenshots.
Uuh, im from germany and my english was bad...

Look in the picture at the FPS....

http://fs1.directupload.net/images/141121/hdalbbew.png
---
http://fs1.directupload.net/images/141121/duaggn6u.png
---
http://s14.directupload.net/images/141121/hzyy9xm8.png
---
http://s14.directupload.net/images/141121/x2yp7ntd.png
---
http://fs1.directupload.net/images/141121/vhbu7be6.png

300 Starsystems, 5 KI Players


Top
 Profile  
 
PostPosted: Fri Nov 21, 2014 7:46 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12042
Location: Munich
OttOXBerlin wrote:
I only want post Screenshots.
What point are you trying to illustrate with these screenshots?


Top
 Profile  
 
PostPosted: Fri Nov 21, 2014 2:19 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4303
Location: Sol III
Geoff the Medio wrote:
What point are you trying to illustrate with these screenshots?
Judging by the screenshots, I think he's trying to point out a problem with FPS dropping to 10 and lower.

OttOXBerlin wrote:
Uuh, im from germany and my english was bad...
Nun, wenn's auf Englisch gar nicht geht, dann versuch halt, das Problem auf Deutsch zu erklären. Der eine oder andere hier hat Deutsch als Muttersprache (ich zB), als Notlösung geht das also... ;)


Top
 Profile  
 
PostPosted: Mon Nov 24, 2014 6:07 pm 
Offline
Programmer

Joined: Sun Apr 06, 2014 4:15 pm
Posts: 255
Perhaps you should try the latest testing release. Certain rendering performance improvements have landed after 0.4.4 was released. It would be of interest to hear how they affect you.

_________________
Any code by me in this post is released under GPL 2.0 or later.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 83 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group