2moons socket

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

    • 2moons socket

      hi, i'm working on a new 2moons version.
      but it will be different to 2moons.

      on the serverside is a socket running, every client connects to the socket, and therefor the server can send updates to the client without a updaterequest.

      the socket connection is used to constanly update the clients local database containing all relevant data to build all pages in the client.
      the updates occure eventdriven.

      the socket also accepts orders, like build or send fleet, it checks if the player is allowed to do this action, after check it writes the order to db, and (for example for a fleet) sends updates to the attacked and the attacker clients.

      the server only serves the local database,updates it and takes ordes. but he no longer does any templating.

      the client does all the templating, (since js has webcomponents and other funky stuff now), there is no additional framework needed.
      the client has his database, and language array, and templates.
      if the user does something like changing the planet or call buildings or whatever, the server is not needed at all.
      only action wich causes the client to send something to the server are orders like build something.

      therefor the client feels like an offlinegame(fast), caus it mainly is. the server has much less work to do.



      but all this comes at a cost, the socket is a php script, wich has to run constantly.
      cheap and free webspaces will not support that.

      also the templating is done with js functions wich build the templates. but this is more or less the same as before but in js.

      all in one the build is more complex then 2moons, wich is not good for success and
      it can not be run on free webspaces, wich is also a downer.

      actually i'm not sure if someone would be interested in such a version,
      it is more about efficiency , speed, cusomizeability and less about easy to start with.

      it lacks in requirements to the owner, since the owner should have abilities like a bit nginx/apache , js , and has to handle a constanly running script(socket), wich is different from just calling a php script from browser.
      calls to the server are done with established socketconnection and not html links.

      the concept could cause a lot of confusion and makes it hard to work with, if the user is used to classical browser - server communication.





      this is a picture of the prototype,
      the client is very customisable, all the windwos can be positioned, zoom colored and so on by the player, and are saved.
      the player can even sort the menu.
      the thought behind this is, to give the player the option to build himself a layout he likes most with ease.
      since there is no perfect design, cusomizabilty is one way to react to that issu.
    • there is a demo, but you can't do much in there.
      if you register in cloneuniverse.com and after login change cloneuniverse.com/game.php to cloneuniverse.com/client.php
      you can see some kinde of preview, it is not made to be a preview, so don't expect anything.^^