From ec32f6b196ccd4272f52618a9380515578f65db9 Mon Sep 17 00:00:00 2001 From: Jeremiah Billmann Date: Fri, 26 Jul 2013 15:14:51 -0400 Subject: [PATCH] Progress: Documentation --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 55aecd6..91be508 100644 --- a/README.md +++ b/README.md @@ -14,21 +14,23 @@ A simple, lightweight, HTML multiplayer game server (and client) for Node.js ### Server +**1.** Create instance of GarageServer.IO - pass in a Socket.IO instance and GarageServer.IO options ```js var garageServer = require('garageserver.io'), -// Create instance of GarageServer.IO - pass in a Socket.IO instance and GarageServer.IO options var server = garageServer.createGarageServer(sockets, { interpolation: true, clientSidePrediction: true, worldState: { width: '400px', height: '400px'; } }); - -// Start GarageServer.IO instance prior to starting physics loop +``` +**2.** Start GarageServer.IO instance prior to starting physics loop +```js server.start(); - -// Inside physics loop, process inputs for players, process entites and update states +``` +**3.** Inside physics loop, process inputs for players, process entites and update states +```js var players = server.getPlayers(), entities = server.getEntities();