Synchronizer
A downloadable tool
Project for reSource jam.
This is a websocket server with 4 commands to send to the server to get an answer:
- "GetTickRate" returns the delay in miliseconds between "tick" messages sent to the clients.
- "SetTickRate" sets the tickrate to the integer that's superior to 1 to the right of SetTickRate (SetTickRate 15)
- "GetClients" returns a list of the remote ip's of clients connected to the server
- "Broadcast" (main point of the server) sends a message to all the clients (including the one who sent it)
Every message is json with a "type" field (type of what we're sending), optionally a "data" field (what we're sending) and a "timestamp" field (unix miliseconds, in case of broadcast it is when the server started sending the message to the clients)
You can configure it with a config.json file or leave default configuration (default hosts on port 8080). To know what fields to put in config.json, see the "ServerConfig" class' fields.
HTTP-wise, it's a teapot.
Status | Prototype |
Category | Tool |
Author | Zetelias |
Tags | dedicated-server, lightweight, nodejs, server |
Install instructions
(You need NodeJS installed)
- Extract your .zip or .rar file
- run "npm install" in the source directory
- run "npm start" for dev mode, it will recompile with every change to src/main.ts
Leave a comment
Log in with itch.io to leave a comment.