Skip to content

Markkop/gather-town-websocket-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📡 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

About

Examples on how to interact with Gather.town Web Socket API

Topics

Resources

Stars

Watchers

Forks