Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Gossip Client for Ranvier

This bundle is a sample implementation of a client to the Gossip Network.

To enable:

  • Register for an account on gossip.haus, and then register your game
    • You will get a Client ID and Client Secret from this step, you will use it in the configuration below
  • Clone to your bundles folder
  • Add the "gossip-ranvier" bundle in ranvier.json
  • Add the following configuration to ranvier.json
{
  "gossip": {
    "url": "wss://gossip.haus/socket",
    "clientId": "CHANGE ME",
    "clientSecret": "CHANGE ME"
  }
}

The channels configuration key is set up as an object with the remote channel as the key, and the local channel as the value.

Adding new channels

You can add new channels by creating more GossipChannel objects. They will automatically be detected and join the network.

Note that remote channel names are validated before subscribing. They must be a single word of letters only and a maximum of 15 characters.

Fake Player

In order for messages to be broadcast into your game, the bundle makes a fake player object as follows:

let player = {
  isGossip: true,
  name: "player@RemoteGame",
  getBroadcastTargets: () => {
    return [];
  }
};

Make sure this works for your game and extend as needed.

Sign In/Sign Out

In your fork of Ranvier, you will need to emit the spawn event on your player characters when they sign into the game, and you will also need to emit the quit event when they quit the game, if you want to take advantage of Gossip's sign in/sign out messaging.

About

A ranvier bundle for Gossip

Topics

Resources

License

Releases

No releases published

Packages

No packages published