Tic Tac Toe Multiplayer Example for Defold Engine using Colyseus

I ported the Endel Dreyer’s Colyseus example tic-tac-toe to the Defold. Server code is as it is, but I made slightly changes on client side code.
Sorry if I made a terrible design decision, feel free to shout them on my face :expressionless:

You can download the project from github.
Github: https://github.com/selimanac/defold-colyseus-tic-tac-toe

First, you need to install Node.js.
Server is in the <project_path>/server folder.
You can install and start the server from CLI:

cd /<project_path>/server
npm install
npm start


For better understanding check out the room implementation and registering room codes.

Then you can start clients from Defold.

There are known issues:

  • Fixed: Sometimes client.onError doesn’t triggered when there is no connection/server GitHub issue: #6
  • There is a flow problem which you should wait until onJoin to be completed before changing the turn(or you can run it twice). #