A simple http and websocket server handling multiplayer
The program can be directed to read different .env files on startup using the flags:
--dev
#or
--prod
Which will attempt to read a "dev.env" or "prod.env" file respectively.
For development, it might be useful to switch the datatype of any broadcasted messages to Base16 (hexademical) instead of the default binary messages.
go run ./src messageEncoding="base16" # Default: "none"
This service is the single source of thruth for multiplayer event handling. Therefore some tools are provided to make it easier to port specifications to other languages and the like. These tools can be invoked by running the executable with the
--tools
flag. This wont start the service, but rather end it when execution is complete.
Prints all event specifications and associated data.
Example:
go run ./src --tools --print-event-specs --output="<path>"
# path: Defaults to EventSpecifications-<program version>.ts
# Output type (json, ts) is derived from path.
For future reference:
go run ./src --tools --print-event-specs --output="../bsc-frontend/ursa_frontend/src/integrations/multiplayer_backend/EventSpecifications.ts"