Skip to content

Customize the board layout

Trivabble has always been about letting people play the way they want. A feature toward this goal would be to let people provide their own board layout, placing double, triple letters / words or even more custom rules (why not ×4, or penalties like divided per 2 ?).

We must be careful not to break existing games when doing this.

To do:

  • Server: accept a layout from clients, store it per game, and provide it to joining clients and to currently connected clients (broadcast)
  • Client: accept a layout from the server
  • Client: provide a way to input a layout:
    • by copying one from an existing game
    • by selecting a local file
    • by selecting a board saved in the localStorage
    • by editing the board.
  • Client: provide a way to save a layout:
    • by "downloading" a file
    • by saving in the localStorage
  • Client: Eventually stop providing the layout we currently provide, which might be copyrighted and which use is unsafe
  • Client: explain to people they need to configure their board. This might be highly user-unfriendly so we need to handle this carefully
  • Client: Provide a default safe layout, and allow admins to provide a custom default layout (through config.js). Suggestion for the setting name: DEFAULT_BOARD_LAYOUT

Note: requiring a game restart is probably not needed

To discuss:

  • the design of the board editor and how to enable it
  • how to handle user friendliness
  • how to handle migration of existing games? Do we allow ourselves to load the currently used layout? This means we don't get rid of it in Trivabble code.

A natural sequel of this ticket is allowing a configurable board size, but this might break things, including the page layout. We could restrict the configurability as a first step (say, 8x8 to - 12x12, I don't know). This is probably out of scope of this ticket, but we need to have this in mind while designing things / how we store custom board layouts in this ticket.

Edited by Laurent Mazet