How much can the game be Optimized?

Discussion in 'Planetary Annihilation General Discussion' started by ghoner666, August 21, 2014.

  1. ghoner666

    ghoner666 Member

    Messages:
    38
    Likes Received:
    21
    Optimization has been talked about left and right, and progress has been awesome, so I'm curious:

    Now that Uber has a very advanced Beta in their hand, how hard can the Orange be squeezed?

    I'm not a programmer, and even if I was I haven't seen the game's code, but I know there's a limit to optimization, and I think Planetary Annihilation will always be more processor/memory hungry than the average. I think right now the game can remain playable with between 5000 and 10 000 units, depending on how many of them are mobiles...Can we really reach a mighty 1 million? I'd be just happy with 50 000 really. Supreme Commander was chocking with 2000-3000 (against AI), and is not optimized for today's 8 cores, 64bit systems, which is sad.

    And that's my other question, how well do you think the game will scale with future computers? Regardless of the level of optimization, the crazy matches that could be played in 5-10 years if PA can fully use these computers, ohmygod.

    Your thoughts ?
    Twinstar, Remy561 and donut64 like this.
  2. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    Hopefully source engine level optimizations. ;)
  3. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    The client seems mostly limited by memory and graphics, which at least are the areas where some good progress is still being made on hardware. Games like TA that were also limited by memory were able to be played more smoothly as time went on because people upgraded their computers.
  4. cdrkf

    cdrkf Post Master General

    Messages:
    5,721
    Likes Received:
    4,793
    In terms of units, the 1,000,000 units is a technical goal in terms of the engine rather than a practical one for game-play (at least in the standard game). Jon Mavor likes to be forward looking with his engine designs as is evident by the (then) ludicrous engine limit of 50,000 units in Total Annihilation (rather a lofty goal for a game produced in the 90s, we're not even there yet now!).


    Based on my experience with TA, I'd say that the chances are the game will scale well. The server / sim side has been particularly cleverly designed from the snippets I've read as it assigns *1 thread per player* provided the cores are available. So a server with more cores = more players [​IMG] The client side is more restricted due to Uber using Open GL and maintaining cross compatibility between Windows, Linux and Mac OS- they can't really go beyond using OGL 3. Perhaps they will be able to address this in the future, although on the other hand the server is probably a bigger limitation for very large games.


    TL; DR, I think the game has been designed in a very forward thinking way so expect it to grow as the available technology advances just like TA did!
    Remy561 likes this.
  5. ghoner666

    ghoner666 Member

    Messages:
    38
    Likes Received:
    21
    TA had a 50 000 limit? I didn't know that, never reached it either. I though it was kind of infinite, like, until the game crash or something. I mean could the bigger TA maps, like painted desert, even hold that many lol?

    Yeah I doubt 1 million would be even playable, unless we're like 20 teams of 10 players each, sharing armies and managing the whole mess. And the other thing that I've been wondering is not the number of units but the number and size of planets. On my PC at least, it's seem easier to load a 4x 400 radius planet than a single 1300 radius planet...and that's without a single unit on it...why is that?
  6. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    TA had an initially very low limit of 200, but the engine itself could track more units than that so the game was quickly modded.
  7. BradNicholson

    BradNicholson Uber Employee Uber Alumni

    Messages:
    1,073
    Likes Received:
    4,589
    i'll try to get forest to answer this. but i think the general theme of the answer will be "we can do a lot to help perf, into infinity really."

    edit: forest sucks. calling you out, bro!
    Remy561, SXX, websterx01 and 2 others like this.
  8. ghoner666

    ghoner666 Member

    Messages:
    38
    Likes Received:
    21
    Lol yeah I know that, changing the .ini file was the first thing people did on a fresh install. But yeah past a certain number you needed a real mod to keep the game running higher counts, if I recall.
  9. cdrkf

    cdrkf Post Master General

    Messages:
    5,721
    Likes Received:
    4,793
    Yeah the limit in TA was low on release, however in future patches the restriction was lifted to the maximum of 5000 units per player (up to 10 players = 50,000). I think you could get a good few thousand on PD easily, not sure about 50k... 50k air units would be ok though as they stack XD

    With respect to map size, the problem is simply the mathmatics of surface area vs radius, as it's a squared relationship. Memory is used based on surface area, so an 800 radius planet uses 4x the memory of a 400 radius planet, not 2x!
  10. ghoner666

    ghoner666 Member

    Messages:
    38
    Likes Received:
    21
    Aaaah ok. I guess I should've paid attention in math class. Maybe if they had done their book problem with robots armies instead of leaking faucets and incoming trains I would've learned something.
  11. doud

    doud Well-Known Member

    Messages:
    922
    Likes Received:
    568
    Are you sure simulation is assigning 1 thread per player ? from the very beginning i have understood it was 1 thread per planet, and that "1 million of units" was much more about 1 million of units spread accross many planets.
    Despite of this, I can testify that by having tested on 3 different machines (small to big configuration) that the client really scale well and really takes advantage of all your cores and your graphic card power. so from a scalability perspective i have no doubt it can.

    Note that the current version of the game can't absolutly be compared to very first alpha/beta.
    The client optimizations have been really, really impressive, condering that you can't compare a FPS to a RTS, a RTS having tons of independant small units moving in all directions to compute on a regular basis.

    Now from a server perspective, if my assumption about 1 planet / 1thread is correct, the being supposed to be about inter planetary battles, i see no scalability issue as we are unlikely going to have 40 players playing with 1000 units each on the exact same planet.

    The major concern maybe the network bandwidth which is required, but who knows, the internet is likely to change a lot over time. In good old TA days we used to play with 56k modems ....
  12. ghoner666

    ghoner666 Member

    Messages:
    38
    Likes Received:
    21
    Yeah but that's with a low number of planets. People are expecting bigger systems than 5 planets&moons if there's gonna be 40 players. 10 average planets with 4 players on each, that's already 10 thread, and people will want more.
    I know that the ultimate tournament I wanna see is our Entire solar system. Not to scale mind you, but all the celestial bodies are there. Giants like Jupiter have dozens of moons, lol. I know I'm dreaming, but hey that'd be enough room for 1 millions units. If Uber would pull this off, they'd get into the Guiness book or something.
  13. doud

    doud Well-Known Member

    Messages:
    922
    Likes Received:
    568
    I've never said that 1 million units is not possible :) I'm just saying we're unlikely going to have 40 players at the same time on the exact same planet with 1000 units each. Meaning, we can expect that the 1 thread / 1 planet (which is to me a very good concept) will allow a good scalability. And modern servers can have at least 48 cores .... And who knows, maybe when Uber work on PA2, we'll be able to have horizontal scalability with Infiniband inter-connected servers :eek::p
    ghoner666 likes this.
  14. cdrkf

    cdrkf Post Master General

    Messages:
    5,721
    Likes Received:
    4,793
    Hmm I thought it was per connected client, however your probably right actually thinking about it, it's per planet. Still that basically breaks down a large game into lots of much more manageble single planet matches, so there is a big oppertunity for scaling things up!
  15. donut64

    donut64 Member

    Messages:
    86
    Likes Received:
    46
    I've seen "optimizations" go really far.

    When you optimize the code, you get it closer to being more efficient. At maximum efficiency, I like to imagine there's a 1:1 relation between each function that comes to the user and each function that has to go through the processor. Such levels of optimization can have previously thought poor hardware to accomplish astounding feats.

    What I mention before though is just one side of optimization, as far as I understand. Another optimization is getting the now-optimized code to utilize only the resources it needs to. If the game is slowing down but not using 100% CPU / GPU, then that also reflects a poorly optimized game no matter how much is going on in the game itself.

    The **** do I know? Just from games I have played through beta, like Savage 2 beta'ing the K2 Engine that was then used in Heroes of Newerth. Or from playing PlanetSide 2, which, I'd say, ends up tracking and demanding more than PA does on average. And many would say PS2 does a pretty bad job of 'optimizing'.

    However, having the game run on both UNIX operating systems and Windows really complicates the optimizations, especially if it is the exact same software used for both. I'm gonna say that puts a hard-limit on how far we can go, but obviously we have not reached it yet.
    Last edited: August 21, 2014
    Remy561 and ghoner666 like this.
  16. forrestthewoods

    forrestthewoods Uber Alumni

    Messages:
    197
    Likes Received:
    705
    Your words don't phase me. I just shake em off.
    Remy561, squishypon3, doud and 2 others like this.
  17. knickles

    knickles Well-Known Member

    Messages:
    800
    Likes Received:
    134
    Muscles don't make the bigger man
  18. forrestthewoods

    forrestthewoods Uber Alumni

    Messages:
    197
    Likes Received:
    705
    There are a lot of areas that can be optimized. Notably server CPU perf, server memory use, server upload bandwidth, client cpu perf, client memory use, client download bandwidth. There's quite a bit of room to squeeze in all of them.

    Now to set expectations just squeezing what's currently there isn't going to make things 10x faster from where they are now. However with a concentrated effort from a handful of programmers focusing entirely on perf there is a lot of room for improvement. I hesitate to put a number on it because that causes words like promise to be thrown back in my face. So let's just say the game has made steady, continuous gains since alpha and it can continue to do so for quite awhile longer.

    That's for the immediate future. I'll save longer term schemes and plots for another post.
    Remy561, corteks, kjotak109 and 16 others like this.
  19. ghoner666

    ghoner666 Member

    Messages:
    38
    Likes Received:
    21
    Awesome. Even if you can only push it 2x faster, that's already twice the size of now, and 10 times what supcom could do back in 2005 And in the meantime computer will keep getting stronger as well. My current rig is an old i7, and on par with the new consoles, but I don't think I'll keep it for another 5 years, so I can see epic wars in the future!
  20. cwarner7264

    cwarner7264 Moderator Alumni

    Messages:
    4,460
    Likes Received:
    5,390
    Confirmed server will run 10x faster at release. Don't let us down Uber we have faith in you.
    Xagar, gerii, Remy561 and 9 others like this.

Share This Page