Home

Awesome

React + BabylonJS + Colyseus (with BabylonJS NullEngine) starter project

This is a starter project for a realtime 3D multiplayer game with simple rooms lobby. You can try a live demo here.

alt text alt text

Main tech stack

Server

Server uses authoritative arhitecture provided by Colyseus. Game state authority is given by instance of BabylonJS NullEngine while Colyseus package synchronizes the state to the clients.

NullEngine enables you to run Babylon.js on a node server without having to render anything to the screen. That way you can simulate virtual world on each client but also on the server.

How to run locally

After cloning the project, position yourself inside root directory, install dependencies and start local server.

yarn
yarn watch-debug

Your server is now listening on http://localhost:4000.

To run client code position yourself inside client folder, install dependencies and start react client.

cd client
yarn
yarn start