All-in-one Empire View

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • All-in-one Empire View

      That's my suggestion for 2.0 while under development.

      If you guys would like to add a Premium on your game and you have many planets, I would suggest develop a all-in-one Empire view where you could build in multiple planets such fleet, defense or buildings. It would push many server resources since it will acquire every planet you own, but that's all about your VPS speed&compatibility.

      That's just an Idea, I have started developing it since in my game you can either colonize many planets you wish with Astrophysics [or expedition tech, don't even know the name after all those years] or you can conquer planets/structures from event.

      That's a snippet, not finished, but that's would be able to do.
    • Hello,

      Thats a must have, and i am also planning to develop this. I am already busy with it aswell.
    • I have it almost done. Still has some performance issues to fix, if user has a lot of planets, that's a lot of foreach loops.
    • may you try it with a json and js template, then you can do the calculations and foreachloops on the clientside :) nearly directly from the db, if you use the session to identify the user, you dont need to load all the framework(2moons) with smarty and stuff.
      also you can check the already sended array-hash for changes, so you can save bandwidth, a persistent connection avoids tcp roundtrips(undnessacery handshakes and stuff) and blocking caused by limited connection to one host by the browser.
      with threadpools you can avoid blocking on the server.
      with the header cache-control : immutable you can avoid the lookups on the server for static content, this saves enourmous ammount of connection/requests.
    • Hello mimriki, I have started your solution like 4-5 days ago. Indeed it loads a lot faster, like it was pre-loaded, but I only have "stackoverflow" experience on javascript, so I still have some tweaks to do :)
    • Yup, getting better now. Json + js was a good solution indeed

      This is the Empire Upgrade behaviour with 20 planets. On 50 planets upgraded empire takes around 3-5 sec loading.


      vs. classic empire

      The post was edited 1 time, last by Qwa ().

    • your downloadtime reduced massivly this is good, but the waitingtime is still very long.
      may you meassurements about the workingtime of php. cause it don't look like its phps fault, it looks like a block.
      if you make severer requests at the same time and u have some wich do sleeps or take longer, you have to unload the session else the sessionfile is blockt and that keeps processes in queqe.
      also if you work with nginx you can activate accept multi
      also 'keep alive' and the header 'cache-control immutable' for static content is reducing loadingtime significant.
      activating threadpools give you lot of speed, and you can avoid blocked queqes wait-times on the server, if do async requests.
      loading static content without processing it via php might also be intressting if not immutable.
      details
    • About nginx I will create a new droplet and try this. I do not want to make my users angry doing testing stuff on live server and game goes down :P

      Meanwhile I don't know why it takes longer to fullyload the page [which it ends after downloading game resources] if should be cached just like on old empire view [almost no-wait time as you can see on the screen] even if he says it's cached on google dev tool, since the load ends after the images and stuff has been loaded.

      I will debug and test your suggestions, will tell how the "benchmark" performed later :)
    • Hello.

      I have it live on my version now. Players with huge amounts of planets (+50) can take up to 1-3 seconds loading (based on their feedback + connection), which is not a nightmare at all. As a full-working mode, I consider I have it finished and ready :)

      Still I'll do performance updates on localhost server.

      The post was edited 1 time, last by Qwa ().