Jump to content

Performance Problems?


Annozero
 Share

Recommended Posts

Hi, first post here, I just discovered 0ad and think it is fantastic.However, I have some performance problems: as I create more units and buildings the game becomes increasingly slower, until (when I have about 100 units) it pauses for about half a second every two-three seconds, so that it is really difficult to play.I have a Quad core cpu at 3.5 Ghz, 8Gb of RAM and an Nvidia 285 GTX 2Gb. I'm on Linux amd64 using the proprietary driver.Is it a known problem? Thanks.

Link to comment
Share on other sites

With those specs you shouldn't get that problem. There might be issues with the driver or something, but a computer with those specs should be able to run the game well even at this moment. I'm afraid I don't have any idea how to debug it though, but hopefully one of the programmers will.

Link to comment
Share on other sites

That would not make any difference. Likely it is the AI and pathfinding that is slowing him down. If he played in what I call "sandbox" mode, e.g. with no AI players, then I am sure his performance would increase substantially. If he's playing against AI players, then there aren't just his 100 units on the map, but each AI player will probably have near that many as well. The big problem with performance is pathfinding at this juncture. So, try playing it without an AI opponent and see how many units you can make without experiencing slowdowns.

Link to comment
Share on other sites

Thanks for your replies. The problem seems indeed AI related: with only me, I could get up to 280 units without any noticeable slowdown. Just to be sure, I tried again with a single opponent and by the time we both had about 130 units the game was really unusuable. Map size or graphical effects don't seem to matter.

Link to comment
Share on other sites

That's been what I see as well. I have a quad core, 4 GB DDR3 RAM, Radeon HD 4650, etc. The "graphical effects" in our game are minimal, really. Any graphics card and processor less than 4 years old should run the game rather well on the graphics side. We just have a lot of optimizing to do with the AI and Pathfinding.

Link to comment
Share on other sites

  • 1 month later...

Just to add some more detail to this report. Myself and a friend have been playing multiplayer (internet, not LAN) games against two AI opponents. The slow downs seem to be fairly synchronised between us, lasting the same length of time as the game progresses until the game is fairly unplayable. We're able to finish the game, but it's freezing up every second for half a second by the end.

Our machines are both reasonably powerful, an AMD Phenom 9950 and an overclocked Intel i7 each with 4GB of RAM, I can provide a more complete hardware/firmware/driver breakdown if useful.

Link to comment
Share on other sites

Just want to mention that there's already been some changes to the code in SVN that makes the game quite a bit faster, and there's potentially a bit more on the way, so hopefully Alpha 7 will perform better on your computers :)

If I update SVN and build the game in Release mode in VS 2008 will this provide an accurate test? If so I'll do this now and let you know of the improvement.

Link to comment
Share on other sites

If I update SVN and build the game in Release mode in VS 2008 will this provide an accurate test? If so I'll do this now and let you know of the improvement.

No need to build it yourself, there is a Windows binary included in SVN :) Though sometimes it might be a short while between new code changes and the autobuilt binary is updated so at times it might be useful to be able to :) Generally the autobuilt one should work fine though.

Link to comment
Share on other sites

Hi, guys, first post, I am glad I found the great 0 A.D. and that I could join the community!

The performance issue seems to arise when a great number of units is moving around.

I just did a quick test on Peloponnese:

- Full scenario (six or whatever AI players) is totally unplayable. Disabling shadows and reflections gives no benefit;

- Same map, no AI (players set to "Unassigned") - great FPS even with 128 static and ~72 units gathering resources;

- Same map, no AI - horrible performance with 128 units being moved in a formation ("Loose" being only available for female citizens) and ~72 units gathering resources.

PC is AMD Athlon II X4 640@3000MHz, 4 GBytes memory, kernel 32-bit 2.6.32-33.

Link to comment
Share on other sites

The biggest issues with performance right now are AI and Pathfinding. Your experience with the game pretty much confirms this. :) These are known issues and we're working on them. (y) What version of the game are you running, btw?

It's the latest Alpha release, Fortuna, I think, built on 10.Jul.2011.

BTW, I think I saw 0ad utilizing only one of the cores in my SMT system.

Shouldn't it take advantage of SMT, also having in mind that almost all new PC systems sold worldwide are such?

Link to comment
Share on other sites

Our design predates the widespread availability of multiple cores and logical processors.

While we do have a few threads, it is very difficult to retrofit scalable parallelism into game engines.

The most processor-intensive ones should be rewritten to take advantage of SMT (Don't shoot me, that's just my opinion).

As you say, with the core created so long ago and with many basic features still missing from the game, reassigning developers back to it might be....difficult?

The other route seems to be to optimize everything so that it will run any map with any number of AI objects on any processor made today.

Link to comment
Share on other sites

  • 1 month later...

I think Alpha 7 has some renderer optimisations, but no gameplay optimisations, so it shouldn't be any better. There's various performance problems in code I wrote that I'm interesting in fixing and have various ideas for (particularly redesigning the pathfinder to work much better in the worst case), but I've not had any time recently to work on them, but it's a high priority and should be much improved for the next alpha release :)

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

Hi, first post here.

I would like to add my 2 cents about performance.

My specs:

  • Intel 3.0 GHz Pentium D (Dual Core, but not Core2Duo)
  • Nvidia GeForce 7600GT, 256MB
  • Debian Squeeze
  • "nvidia-glx" driver package

My experience with the game:
  • Alpha 7 - "10288 release"
  • 1024x768 Windowed
  • Any game, with or without AI is very slow and laggy from the start.
  • CPU usage is always 100% when unpaused.
  • CPU usage is between 40% and 90% when paused.

This is probably (obviously?) not a problem with the path-finding algorithm consuming too many CPU cycles. Is there anything else I should/could investigate to find the source of this particular performance problem?

Link to comment
Share on other sites

This is probably (obviously?) not a problem with the path-finding algorithm consuming too many CPU cycles. Is there anything else I should/could investigate to find the source of this particular performance problem?

Hi, welcome to the forums.

You can use Shift-F to display the framerate, which give more quantified information about the lag. More interesting to you is if you press F11 you will load the profiler view, then you will get a breakdown of how much time each component is taking. 0AD doesn't limit the framerate so it is normal for the game to use as much cpu as it has available and I find it uses a significant amount of cpu for me while paused as well.

Link to comment
Share on other sites

  • 3 weeks later...

Mine is Alpha 7 - "10288 release" too, on Ubuntu 10.04 LTS, Quad core 3GHz Athlon CPU and after a while the game becomes too slow with many units.

My Profiler shows initially some 10-20msec for both renderer and Interpolate, but after a while and after all bots gather armies, the Simulation update takes precedence with more than 100, and even more than 1000 at times. The map is Acropolis, default everything, 3xJubot and me, 150+ units each.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...