https://github.com/endel/colyseus-0.15-protocol-buffers
Demonstrating Colyseus 0.15 and Protocol Buffers (Raw Binary Message Exchange)
https://github.com/endel/colyseus-0.15-protocol-buffers
Last synced: about 1 year ago
JSON representation
Demonstrating Colyseus 0.15 and Protocol Buffers (Raw Binary Message Exchange)
- Host: GitHub
- URL: https://github.com/endel/colyseus-0.15-protocol-buffers
- Owner: endel
- Created: 2022-03-03T18:06:48.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-06-20T00:25:21.000Z (almost 3 years ago)
- Last Synced: 2025-02-12T06:21:17.922Z (over 1 year ago)
- Language: TypeScript
- Size: 11.7 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Colyseus and Protocol Buffers (Raw Binary Message Exchange)
Since Colyseus version 0.15, you can exchange raw bytes as messages via `.sendBytes()`.
This is a _monorepo_ demonstrating how to send and receive [Protocol Buffers](https://www.npmjs.com/package/protobufjs) through raw bytes using Colyseus.
- [packages/server](packages/server): The Colyseus Server (0.15), consumes shared package.
- [packages/client](packages/client): The JavaScript client, consumes shared package.
- [packages/shared](packages/shared): The shared package, having `protobufjs` as dependency.
[Protocol Buffers](https://www.npmjs.com/package/protobufjs) is just an example of an arbitrary custom serializer/de-serializer you could use to exchange messages.
## Running locally
Clone this project, and from the root folder, run:
```
npm install
npm start
```
Now, access [http://localhost:1234/](http://localhost:1234/) from your web browser.