Advanced Realtime Networking

Last Updated on January 3rd, 2012 (sub-pages have their own dates)

Isogenic Engine includes an advanced realtime networking system that abstracts away the complex details of multiplayer / networked game programming whilst allowing you to maintain low-level control when it is desirable to do so.

The core networking system is not just a simple socket server written with Node.js. Isogenic runs the same engine code on both client and server and automatically propagates changes to the game simulation to connected clients using regular world update packets. On the client-side the update packets are received and interpolated over to create a smooth and robust gaming experience.

Isogenic features code that runs on both client and server, regular tick-based network world updates with auto-propagation, client-side entity interpolation and data compression all built-in. No special code is required to use these features, they are enabled out-of-the-box.

Here is a basic 2d example of the engine’s networking system running 14 connected clients viewing a simulated 9-player game (there are 9 realtime networked world entities). The physics simulation is being calculated and simulated entirely server-side and no physics code is running on the client. In effect, the client-side engine is acting as a “dumb terminal” and just outputs graphical data as instructed by the server. As you can see, all browser windows display the exact same simulation at the exact same time across PC, Mac and iPad:

There is no special code to do this… simply updating an entity’s position, rotation, scale or any other networked property on the server will automatically update all connected clients during the next world network interval and once received the clients then interpolate between the previous interval data and the current one. This networking system just works… out of the box. Isogenic Engine is the only HTML5 game engine in the world that includes advanced realtime networking with all of these features as standard.

  • http://blog.v-design.pl woyteck

    What about security of socket communication? If one can see the client-side source code, he basically sees what the app sends to the server. What is your idea of preventing cheaters to do such evil things :) ?

  • Rob Evans

    Well basically, everything the client does must be vetted by the server. The server logic controls all the actions. This is how most modern networked games behave because regardless of whether the cheater can see the client-side code or not, they can always do packet sniffing and learn the protocol then attempt to cheat that way.

    Server logic must be in control.

  • http://YourWebsite Gaston

    Totally agree. Good games does all logic , server side.

  • http://cwssoftware.com Charlie Sibbach

    You mention multiple world instances, presumeably as node.js shards. The game we are interested in making would involve a single, non-sharded world, but we need horizontal scaling for capacity. Does isogenic support this, or will we need to plan on using zones?

    • Rob Evans

      Hi Charlie,

      Each node.js instance will need to communicate the changes in the world to each other but this is possible. This feature will probably not make the beta but it is on the planned features for the final release.

      Communication between the node instances is really not that much of a challenge and the underlying MongoDB can be configured to use replica-sets instead of sharding the data so that every instance of node has access to the same replicated data on every node + mongo instance / shard. The short answer is yes this will be possible. The long answer is, not in the beta.

      Hope that helps!

      Rob

      • http://twitter.com/davvilla David Villarreal

        What about individual instances that don’t need to communicate to each other? Something like Halo / Call of Duty matches going on independently.

        • http://twitter.com/IsogenicEngine Rob Evans

          If each Node.js instance is running the same game but is separate from each other instance running, this is a pretty simple situation. Just start each instance with a different port and set the MongoDB database name to one not already in use.

          Each Node.js instance will then run the same game script but serve individual content from it’s own database and game world.

  • Ahsan

    Though isogenic engine offers a lot i.e. HTML5-> isometric tile-based games, physics with MMO functionality etc. I mean, I understand that we can develop a full-fledged isometric MMO game using it (solely).

    Though I have a questions regarding MMO functionality:
    1) Is it possible to build (using isogenic engine) MMO game for mobile apps which do not use the HTML5 rather some other graphics engine.
    Let me rephrase: Is it possible to develop a mobile app which uses some other graphics engine (for isometric tile-based game) but at server end will use isogenic engine’s MMO functionality.
    Sorry if its a stupid question. I know HTML5 is playable on every browser, actually I already have an isometric game for iOS (using some other graphics engine), in order to convert it to MMO how can I use Isogenic?

    • Tom Wilson

      As I understand it, Isogenic can fall back to using DOM elements instead of canvas. I assume in that case tiles would be in overlapping divs. So the capability for what you want is built in.

      • Ahsan

        well, you are right, but I was asking a different question here. I already have a game for iphone (using cocos2d framework), it is a multiplayer game (something like mafia wars but not browser based). Can I (some how) use isogenic game engine’s MMO functionality and use it as the back end of my game. *just a random stupid thought*

        • Tom Wilson

          Ah, sorry I didn’t quite grok the question. Perhaps Lord Rob can fill us in :)

    • Anonymous

      Hi Ahsan,

      Yes it would be possible although you would need to write some client-side code that would connect to the server and “speak it’s language”. Your client would need to accept network CRUD messages from the server and handle them accordingly, but apart from that it should be pretty easy sailing.

      • Ahsan

        That’s great! really, I am looking forward (with my team) to not only use it but also to contribute.
        Cheers.

  • Leland

    Do you enable devs to get down and dirty with the server code to choose what attributes they want to let the client handle, and which ones to let the server handle? Of course, the client cannot be trusted, but there are many entities in most game worlds that would be better left computed via the client.

    Hope you can give me a reply.

    **Edit: just wanted to add.. is it possible to use an external physics engine in place of the one used by default by isogenic? For example, using Box2d for physics simulation and then rendering out.

    • http://www.isogenicengine.com Rob Evans

      Hi Leland,

      The engine allows you to define which properties and entities are handled server-side and client-side so there is a lot of flexibility. For instance, you can create entities server-side that can be controlled directly by the server game code and then those changes are propagated to connected clients, or you can create them client-side via the client’s game code and the server will not know about them or have control over them.

      The physics engine in Isogenic is Box2d. The video you see above is using a Box2d simulation which is calculated and simulated server-side and then the changes to the entities are automatically propagated to the connected clients.

      Isogenic also allows you to run Box2d client-side as well using the exact same interface that exists server-side so you can copy and paste control code from the server-side to the client-side and it will run exactly the same way.

      The engine does not enable physics on server or client by default, you tell the engine to enable physics via some calls to the physics module after which Box2d is loaded into memory. This allows you to preserve memory on clients when you only need Box2d server-side.