Welcome to Colyseus¶
Introduction¶
Colyseus is an Authoritative Multiplayer Framework for writing your own game servers using JavaScript/TypeScript and Node.js.
Colyseus is agnostic regarding the technology you choose for the client-side. You can use one of the official client-side SDK's available, such as Unity, JavaScript/TypeScript, Defold Engine, Haxe, Cocos Creator and Construct3.
What Colyseus provides to you:
- WebSocket-based realtime communication
- Simple API in the server-side and client-side.
- Automatic state synchronization between server and client.
- Matchmaking clients into game sessions
- Scale vertically or horizontally
Getting started¶
Before we start, let's make sure we have the necessary system requirements installed in your local machine.
Requirements:
- Download and install Node.js v14.0 or higher
- Download and install Git SCM
- Download and install Visual Studio Code (or other editor of your choice)
Creating your server¶
Open your system terminal, and use the command below to set up a barebones server locally.
npm init colyseus-app ./my-first-game-server
This server template is ready to be used locally, self-hosted, or on Colyseus Arena.
Next steps¶
- Connect to your server by using one of the client-side SDK's available.
- Learn how to exchange messages between client and server
- Understand how the automatic state synchronization works
- Experiment! Play, and have fun!
Presentation: JS GameDev Summit 2022¶
Examples to explore¶
You are encouraged to check out existing projects to explore and understand how Colyseus works.
- Official examples
- PlayCanvas Tutorial
- BabylonJS Tutorial
- PixiJS Tic-Tac-Toe
- The Open-Source IO Shooter
- Colyseus + PixiJS Boilerplate (Agar.io simplistic adaptation)
Official Tech Demos
Community videos: a selection of videos made by community members for you: