Skip to content

Instantly share code, notes, and snippets.

@mattraykowski
Last active August 10, 2016 21:36
Show Gist options
  • Save mattraykowski/60eadc57ea0ba57a377f7ade6b3d4c6c to your computer and use it in GitHub Desktop.
Save mattraykowski/60eadc57ea0ba57a377f7ade6b3d4c6c to your computer and use it in GitHub Desktop.
VASSAL Web Enhancements

VASSAL Web

Summary

VASSAL is a table-top game simulation with many board game modules. It currently supports live games and "PBEM" games through "log" sharing - a sequence of commands such as moving tiles, etc. The server is any standards-compliant XMPP server. I have configured ejabberd and connectd two VASSAL clients to it playing the same module to very that it works.

Components

  • VASSAL Client (www.vassalengine.org)
  • VASSAL Server (XMPP Server, ejabberd)
  • VASSAL LFG (Phoenix web, look for game, chat in lobbies)
  • VASSAL PBEM Launcher (Electron app, detects when it's your turn, loads your VASSAL module, allows you to chat on your games)

Design Problems

Encoded MUC Messages

VASSAL encodes each turn into a string. Overcoming this is easy (the encoding is not complex), but it needs to be handled uniformly.

Chat Implementation

VASSAL Client will continue to create MUCs and send messages to them the way that it does whenever a player chats in a game or lobby. The problem that needs to be solved is how do the web and launcher front-ends allow users to chat? The users of the web and launcher frontend need to authenticate with the Phoenix server for non-Jabber things. But they will also need valid Jabber users and sessions in order to chat, get rosters, etc. It boils down to two potential solutions:

  1. Electron and Web have client-side authentication into both the Phoenix and ejabberd services. Phoenix will handle registration of its users as well as ejabberd users.
  2. Phoenix runs Hedwig for each "player" channel and connects as the user to ejabberd.

I'm not sure if there are other better solutions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment