Light Style© by Fisana

Jump to content


Photo

Performance Problems?


  • Please log in to reply
31 replies to this topic

#1 Annozero

Annozero

    Tiro

  • Community Newbie
  • 9 posts

Posted 17 June 2011 - 11:12 AM

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.
  • 0

#2 Sebovzeoueb

Sebovzeoueb

    Discens

  • Community Members
  • Pip
  • 88 posts

Posted 17 June 2011 - 12:39 PM

Although not quite as impressive as your spec, my MacBook Pro has pretty good specs, and also doesn't run the game particularly well. I think at this stage it is normal.
  • 0
Sebastian Boutin Blomfield.

this is pretty much what I do.

#3 feneur

feneur

    Cartographer of imaginary worlds

  • 0 A.D. Project Leader
  • 7,754 posts

Posted 17 June 2011 - 04:59 PM

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.
  • 0

Erik Johansson [ aka feneur ]

Wildfire Games
Contact me: feneur@wildfiregames.com



Support Wildfire Games!


#4 Rasunadon

Rasunadon

    Discens

  • Community Members
  • Pip
  • 79 posts

Posted 17 June 2011 - 05:18 PM

Try to turn off shadows, water reflections and don't use any bots. Make 100 units. Any difference?
  • 0

#5 Mythos_Ruler

Mythos_Ruler

    Senator

  • WFG Retired
  • 14,961 posts

Posted 17 June 2011 - 08:16 PM

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.
  • 0

#6 Rasunadon

Rasunadon

    Discens

  • Community Members
  • Pip
  • 79 posts

Posted 17 June 2011 - 09:08 PM

If he played in what I call "sandbox" mode, e.g. with no AI players, then I am sure his performance would increase substantially.

Yes. My "no bots" mode = your "sandbox" mode. The shadows and reflections could help only a bit when problem is in pathfinding.
  • 0

#7 Annozero

Annozero

    Tiro

  • Community Newbie
  • 9 posts

Posted 17 June 2011 - 11:03 PM

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.
  • 0

#8 Mythos_Ruler

Mythos_Ruler

    Senator

  • WFG Retired
  • 14,961 posts

Posted 17 June 2011 - 11:28 PM

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.
  • 0

#9 Sayyan

Sayyan

    Discens

  • Community Members
  • Pip
  • 26 posts

Posted 23 July 2011 - 02:50 PM

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.
  • 0
a.k.a Ross Bearman

#10 feneur

feneur

    Cartographer of imaginary worlds

  • 0 A.D. Project Leader
  • 7,754 posts

Posted 23 July 2011 - 03:13 PM

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 :)
  • 0

Erik Johansson [ aka feneur ]

Wildfire Games
Contact me: feneur@wildfiregames.com



Support Wildfire Games!


#11 Sayyan

Sayyan

    Discens

  • Community Members
  • Pip
  • 26 posts

Posted 23 July 2011 - 03:23 PM

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.
  • 0
a.k.a Ross Bearman

#12 feneur

feneur

    Cartographer of imaginary worlds

  • 0 A.D. Project Leader
  • 7,754 posts

Posted 23 July 2011 - 03:26 PM

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.
  • 0

Erik Johansson [ aka feneur ]

Wildfire Games
Contact me: feneur@wildfiregames.com



Support Wildfire Games!


#13 Ykkrosh

Ykkrosh

    Primus Pilus

  • WFG Programming Team
  • 4,921 posts

Posted 23 July 2011 - 05:23 PM

Sounds like the slowdown is mostly AI and/or pathfinding, and the changes in SVN have mostly been optimising graphics, so it's probably unlikely to make much difference.
  • 0
Philip Taylor [aka Ykkrosh]

Wildfire Games Programmer
Contact me: philip@wildfiregames.com

#14 adash

adash

    Tiro

  • Donator
  • 9 posts

Posted 30 July 2011 - 06:04 PM

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.
  • 0

#15 Mythos_Ruler

Mythos_Ruler

    Senator

  • WFG Retired
  • 14,961 posts

Posted 30 July 2011 - 06:06 PM

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?
  • 0

#16 adash

adash

    Tiro

  • Donator
  • 9 posts

Posted 30 July 2011 - 07:32 PM

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?
  • 0

#17 janwas

janwas

    Primus Pilus

  • WFG Retired
  • 2,733 posts

Posted 30 July 2011 - 08:35 PM

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.
  • 0
Jan Wassenberg [aka janwas]

Wildfire Games General Programming lead and code monkey
Contact me: jan@wildfiregames.com

#18 adash

adash

    Tiro

  • Donator
  • 9 posts

Posted 30 July 2011 - 09:14 PM

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.
  • 0

#19 adash

adash

    Tiro

  • Donator
  • 9 posts

Posted 20 September 2011 - 06:31 PM

I do confirm this bug still exists in Alpha 7 Geronium!
Really, guys, why bother add new civilizations, new features, new units, new UI, if the game is not playable with more than 60 units per party?

  • 0

#20 Ykkrosh

Ykkrosh

    Primus Pilus

  • WFG Programming Team
  • 4,921 posts

Posted 20 September 2011 - 07:05 PM

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 :)
  • 0
Philip Taylor [aka Ykkrosh]

Wildfire Games Programmer
Contact me: philip@wildfiregames.com