Well, it certainly was.
While writing that post, I had been thinking hard on an abstract for That Conference. (Which, by the way, if you haven't heard of That Conference, you should check it out and then plan on attending next year.) The idea was to present on HTML multiplayer game concepts using Node.js and Socket.IO. (Yes, I may have a slight fascination with web sockets.) I wanted to take it one step further than just concepts. I intended to provide and demo a simple, lightweight, and open source game server that implemented those same concepts during my talk. Once I found out that my abstract was accepted, I had just over 3 months to prepare a talk and write a Node.js game server.
So, I did just that.
I developed what I call GarageServer.IO - a simple, lightweight, HTML multiplayer game server for Node.js.
Source: My Wife (graphic designer for hire)
- Client Side / Input Prediction
- Client Side Smoothing
- Entity Interpolation
- Server State History
- Server and Client Messaging
- Server Reconciliation
- Works with any rendering and/or physics engine
My goal was to keep things simple. I didn't set out to create a game server with 50 pages of API documentation but, let's face it, you probably won't be creating World of Warcraft with it anytime soon.
So, let's see how simple it actually is.
Install it via the Node Package Manager:
Create an instance of the GarageServer.IO server, fire up your physics loop, continually get the players, process their pending inputs and send the new state back to GarageServer.IO. Each client that connects to GarageServer.IO is treated as a player, for non-players (I.e. bullets, treasure chests, etc.), GarageServer.IO offers entities.
and add it to your application's scripts folder.
Create an instance of the GarageServer.IO client, fire up your game loop, continually get the player inputs, send them to the GarageServer.IO and render all of the players latest states received by GarageServer.IO.
That's it. Over-simplifying things, of course.
GarageServer.IO is in an alpha release... the API may very well change - hopefully for the better. I intend on releasing the beta later this year that will have a more stable API and it'll include additional features such as:
- Regions - broadcast state only to players who need to know
- Latency Resolver - enhanced game play based on latency
- Bug fixes - believe it or not... ;-)
It's licensed under the MIT License... so do whatever you want with it. Fork it, clone it, ????, and/or make millions of dollars with it - the choice is up to you. Lastly, if you don't like X or you wish it had Y, I accept criticism in the form of pull requests.
I'll continue to post GarageServer.IO updates either on my blog or on my Twitter account. In the mean time, happy game development.