Skip to content

ryleu/simple-vtt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleVTT

A simple, fast, system-less Virtual Table Top.

If you want to use it right now, you can use this handy button here to launch it on Heroku:

Deploy

A free demo (that may be laggy and should not be used for actual games) can be found at https://vtt.ryleu.me.

Table of Contents

Configuration

The port is set through the $PORT environment variable.

Running

Install Node.JS and NPM and then run npm i in the project root.

Use npm start to start the server.

Protocol

S-VTT uses a simplistic spec for websocket communication:

Action Request Response Description
Add a piece &S;<name>;<x>,<y>;<icon> &S;<id>;<name>;<x>,<y>;<icon> id: Unique identifier
name: Base 64 encoded piece name
x,y: Integer coordinate pair
icon: Base 64 encoded icon URL
Move a piece &M;<id>;<x>,<y> &M;<id>;<x>,<y> id: Unique identifier
x,y: Integer coordinate pair
Delete a piece &D;<id> &D;<id> id: Unique identifier
Create a line &L;<x1>,<y1>;<x2>,<y2>;<thickness>;<color> &L;<x1>_<y1>__<x2>_<y2>;<x1>,<y1>;<x2>,<y2>;<thickness> x1,y1: Initial coordinate pair
x2,y2: End coordinate pair
thickness: Thickness of the line
Hex color code
Remove a line &R;<x1>_<y1>__<x2>_<y2> &R;<x1>_<y1>__<x2>_<y2> x1,y1: Initial integer coordinate pair
x2,y2: End integer coordinate pair
Fill a tile &F;<x>,<y>;<color>;<style> &F;<x>,<y>;<color>;<style> x,y: Tile coordinate pair
color: Hex color code
style: Style of fill. Options: solid. Default: solid.
Re-size the board &B;<x>,<y> &B;<x>,<y> x,y Integer length / width pair
Clear the board &C &B;30,15 None
Join a room &A;<invite> &A;<invite>;<success> invite: Invite code
success: true if the session exists, false if it does not
Set the background &G;<image>;<width> &G;<image>;<width> image: Base64-encoded image URL
width: integer width of the background image measured in tiles

There are also an HTTP API at /api/:

Endpoint Description
/api/board/?id=<invite> GET to get the board for or PUT to load in a new one for
/api/new/ POST to generate a new blank board, responds with {"invite": "<invite>"}

Any other path is sourced from site/.

Roadmap

  • Basic HTTPS communication
  • Rendering
  • Lines
  • Pieces
  • Saving and loading
  • Heroku deploy support
  • Tile fills
  • Chromium / Webkit support
  • Rewrite in TypeScript
  • Reactive design for mobile
  • Default pieces
  • Custom saved pieces
  • Game master This will never be implemented in v1.x.x.

Attribution

Icons are from the Papirus Icon Theme.