Please continue to optimize PA

Discussion in 'Planetary Annihilation General Discussion' started by Zainny, October 18, 2014.

  1. Gorbles

    Gorbles Post Master General

    Messages:
    1,832
    Likes Received:
    1,421
    Yah missed my post.
  2. Zainny

    Zainny Active Member

    Messages:
    123
    Likes Received:
    146
    Probably my fault a bit. Reading back through my posts, I came out a bit too strong. Cola's calm technical discussion helps cool things a lot though :)

    For me, I'd just like to know this issue isn't being neglected. Like you, I found myself really enjoying that vast big game I had a few days ago and my attempts to reproduce it since have been met with disappointment as the sim falls apart.

    If at the end of the day someone from Uber reads this and thinks "you know what, maybe we should investigate this" then mission accomplished I think.
  3. icycalm

    icycalm Post Master General

    Messages:
    951
    Likes Received:
    722
    Well, since we don't have the information of who is specialized on what, you can still make a single-threaded priority list, and it will still be useful. When I say that server improvement is number 2 (number 1 is the competitive update, as I've said) I don't mean you should yank the guy who is making the art for the competitive update and force him to learn Linux or something. He can still work on something lower on the list if that's the only thing he knows how to work on.
    tatsujb and cola_colin like this.
  4. icycalm

    icycalm Post Master General

    Messages:
    951
    Likes Received:
    722
    But Brad should be forced to learn Linux and work on the server. Less weight lifting and more Linux please.
    xankar, tatsujb, proeleert and 2 others like this.
  5. warrenkc

    warrenkc Active Member

    Messages:
    542
    Likes Received:
    191
    I agree with most of the OP points. Only time will tell if Uber is going to make it to the 1 million unit mark ;)
  6. vyolin

    vyolin Well-Known Member

    Messages:
    631
    Likes Received:
    479
    Now that thing was always a very lofty, long term technical (!) goal - and one of the few explicitly stated as such.
    I would hope for at least Forged Alliance - levels of units becoming a non-issue for run-of-the-mill machines and connections anytime soon, though.
  7. igncom1

    igncom1 Post Master General

    Messages:
    7,961
    Likes Received:
    3,132
    I can be a bit hostile, but I mean no offence to any person, even if I disagree, and especially when I am wrong in the end.

    Im sorry if actually managed to upset anyone, not sure how I really could have but never the less.

    My bad, didn't personally experience problems with the software like this, only the hardware.

    Slow downs are expected during large games, can't say I have experienced such during SP on my own PC.
    DalekDan, vyolin and Zainny like this.
  8. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    If you use the same machine PA will always be slower, unless they make it scale better with a lot of cores. If PA and FA both stay like they are right now: A single sim thread, then FA will allow more units for the same computation power. Simply because FA has not to deal with spherical worlds. That does make everything more complex.

    If Uber can make the sim of PA scale with multiple cores, it'll quickly run away from FA-levels though.
    tatsujb likes this.
  9. Zainny

    Zainny Active Member

    Messages:
    123
    Likes Received:
    146
    Hey Cola, do you think there is much room for algorithmic optimization to make a difference though? I know that personally when I've benchmarked code I've written in the past it can often turn out to be the smallest most simple innocent looking thing sitting in a critical looped section of code that can cause massive performance issues. It wouldn't surprise me in the slightest if the team at Uber did some performance benchmarking on their engine and turned up multiple areas that could be optimized and lead to huge gains.

    And threading isn't easy either - you start dealing with synchronization issues, etc. There are some problems in software which are even demonstrably worse off with threading due to all the additional locking/sync issues. Are we sure that Uber can even break up the sim on to multiple threads without major major work (often it's advised to build heavily multithreaded things from the ground up with this in mind, precisely because it is so hard and you can run in to so many obscure bugs with heavily threaded applications).
  10. icycalm

    icycalm Post Master General

    Messages:
    951
    Likes Received:
    722
    1 million units confirmed for the next update don't let us down uber
    Remy561, Zainny and cola_colin like this.
  11. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    We don't know how well optimized the sim code already is. If it is not yet optimized at all, that would be obviously "great". I'd guess it is somewhere in the middle ground already though.
    And even then there is a very hard limit to what a single thread can do. No amount of optimization can compare to the sim being able to scale with i.e. one thread per planet.

    Multithreading sure isn't easy, but it is not impossible. For a start PA has planets. It would already help a lot to have one sim thread per planet. Sending units between them equals destroying the unit on planet a and creating it anew on planet b. That should be "trivial" (yeah big " there) People also don't send thousands of units between planets per second usually, so a little overhead for that won't hurt as much.
    Then there are probably a ton more things that can be done in parallel even on a single planet. Without actually knowing what PA does and exactly where it is currently stalling it is hard to guess.
    But reading this paper from the bullet physics developers gives a good idea just how much actually can be done in parallel, if one is really set out to go as far as possible: http://www.multithreadingandvfx.org/course_notes/GPU_rigidbody_using_OpenCL.pdf
    I fully understand that Uber does not have the resources to go all out like that, but I am sure there are a few things in their engine that can profit like this as well. We don't need to scale with thousands of opencl compute units. A dozen threads would be more than enough. *dreaming* ;)

    Additionally PA has the luxury of being played on a single server. If the multithreading optimization turn out to make the game a little less deterministic I'd guess that would not hurt anybody.
    tatsujb and Zainny like this.
  12. Zainny

    Zainny Active Member

    Messages:
    123
    Likes Received:
    146
    That is actually a really really cool idea. Since units on one planet have practically no way to impact another planet, apart from via very limited mechanisms, your requirements to pass data between the threads is near zero.

    Uber, make it so (please) :)
  13. vyolin

    vyolin Well-Known Member

    Messages:
    631
    Likes Received:
    479
    Going one step further, planets being as disconnected as they are in terms of gameplay, they need not even be handled by the same server. With some predictive analysis/preloading even large orbital transfers should not pose a problem.
  14. judicatorofgenocide

    judicatorofgenocide Active Member

    Messages:
    421
    Likes Received:
    176
    How do we get that number just curious....,wish it was 10x that
  15. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    That was just an engine goal. :p
  16. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Multithreaded sim would make a large step towards it. Like a really big one.
    tatsujb likes this.
  17. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    There are people who didn't buy on steam, but the majority probably did.

    http://steamcharts.com/app/233250

    The most players we've ever had was almost 5000, which was at release. We've had spikes up to 2000 lately, probably steam achievements and offline updates.
  18. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    I've heard OpenGL just isn't very easy to multi-thread... So I can seriously understand why it's taking so long, multi-threading is hard. :/

    Also: Before Supcom is brought up, I want everyone to recall what it was like when it first came out- it hasn't always ran so well. Heck, I still get sim slowdowns in Supcom 1 vs ai.
  19. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    And you know what? The simulation of the game doesn't need OpenGL AT ALL :D
    vyolin and warrenkc like this.
  20. FSN1977

    FSN1977 Active Member

    Messages:
    657
    Likes Received:
    232
    Infact the 5K player count on steam was because of the steam sommersale ;)
    squishypon3 likes this.

Share This Page