Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 1.37 KB

README.md

File metadata and controls

38 lines (27 loc) · 1.37 KB

📡 Gather.town Websocket API interaction examples

Simple examples on how to interact with Gather.town Web Socket API

How to Develop

# Copy .env.example to .env
cp .env.example .env

# Set the environment variables on .env
# Get GATHER_API_KEY from https://gather.town/apiKeys
# Get GATHER_SPACE_ID from your space URL.
# Eg: 5jnhRfDYRIUyDmbF/my-space
# Get GATHER_MAP_ID from Mapmaker's Rooms panel

# Install dependencies
npm install

# Run server
npm run dev

Tips

Finding the event name and payload you wish to use

Go to node_modules/@gathertown/gather-game-common/src/events.proto and check ServerClientEvent message.
You might want to add this extension for syntax highlight.
On VSCode, select the the event name such as MapSetObjects, press Ctrl+D and find its payload.
You can also Ctrl+Click on the payload class names to check their content. In this case, WireObject.

References