github.com/rzymek/web-boards

Game engine for playing online adaptations of board wargames. Is inspired by VASSAL, but allows play diractly via browser (on desktop or smartphone).


License
GPL-3.0
Install
go get github.com/rzymek/web-boards

Documentation

web-boards

Web application for playing online adaptation of board games.

Goals:

  • online play as well as turn based
  • VASSAL modules import
  • state on server - no need to send log files like in PBEM
  • works on Desktop as well as Mobile

Implementation

This is work in progress. If you're interested please DO send me an email at eerzymek@gmail.com and I'll update this document.

Startup:

  1. load sprites.svg
  2. subscribe to Tables collection

On /play:tableId

  1. subscribe to Operations(tableId)
  2. find out what game this is: Tables.findOne(tableId).game
  3. render appropriate board: /games/{game}/images/{board.image}
    1. attach sprites to board
  4. execute Operations (observe)
  5. check if user is in Table(tableId).players
    1. if not, ask if what to join -> Meteor.call('join', tableId)

Counters

Counters are represented by SVGImageElement.

Properties:
  • .position - the hex (SVGUseElement) the counter is placed on
TransformList

.transform (SVGTransformList) items are in the follwing order:

  1. translation
  2. scale
  3. translation inside stack/stackSelector
  4. rotation

All are optional, but if present must be in this order and on these positions.

Hexes

Hexes are SVGUseElement-clones of a SVGPathElement. Hexes are positioned using translation transformation. x=0,y=0 of a hex is in it's center.

Properties:
  • .stack Array of counters (SVGImageElement) on the hex. May be undefined if empty.