https://github.com/endel/colyseus-tic-tac-toe
Colyseus 0.16: Turn-based Multiplayer Example
https://github.com/endel/colyseus-tic-tac-toe
colyseus colyseus-sample multiplayer pixijs tic-tac-toe
Last synced: 6 months ago
JSON representation
Colyseus 0.16: Turn-based Multiplayer Example
- Host: GitHub
- URL: https://github.com/endel/colyseus-tic-tac-toe
- Owner: endel
- License: mit
- Created: 2016-03-01T00:06:35.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-03-07T13:01:36.000Z (7 months ago)
- Last Synced: 2025-03-31T04:04:43.807Z (6 months ago)
- Topics: colyseus, colyseus-sample, multiplayer, pixijs, tic-tac-toe
- Language: JavaScript
- Homepage:
- Size: 8.02 MB
- Stars: 98
- Watchers: 8
- Forks: 46
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tic-Tac-Toe Multiplayer
Turn-based demonstration project using Colyseus.
This repository has:
- `server/`: The Colyseus server, with tic-tac-toe room implementation.
- `javascript-pixi/`: A JavaScript/PixiJS client-side project.
- `defold/`: A [Defold](https://defold.com/) client-side project.# Running the server locally
You'll need two terminal windows open to be able to run this. One for the
client, and one for the server:**Running the server**
```
cd server
npm install
npm start
```**Important files to have look at**
- [registering room](server/index.ts#L20)
- [room and state implementation](server/rooms/tictactoe.ts)## JavaScript / PixiJS
The JavaScript/PixiJS example uses:
- [colyseus](https://colyseus.io)
- [pixi.js v4](http://npmjs.com/package/pixi.js)
- [parcel](http://npmjs.com/package/parcel)**Running the JavaScript/PixiJS client**
```
cd javascript-pixi
npm install
npm start
```**Important files to have look at**
- [room connection](javascript-pixi/src/screens/GameScreen.js#L36)
- [receiving state updates](javascript-pixi/src/screens/GameScreen.js#L39-L63)## Defold Engine
The Defold project was made by [Selim Anaç](https://github.com/selimanac/).
## License
MIT