vue-cli-plugin-boardgame
Adds supports for Boardgame.io
- Syncs game state with Vuex store
- Launch moves with store actions
- Separated folder for game logic
- Plug and play multiplayer server
- Usable official debug client (written in React)
Multiplayer
- To launch server use
yarn start
oryarn start:dev
for autoreload - Configure
playerID
,gameID
andmultiplayer
instore/gameModule.js
with your game needs
Notes
Game logic and server needs to be written using ESM modules for better browser-node compatibility:
- Files extension are
.mjs
- Node >= 8 is required.
- Node process uses
--experimental-modules
flag
Install
vue add boardgame # or yarn add --dev vue-cli-plugin-boardgamevue invoke boardgame
Example of Boardgame client usage
computed: ... { // Initialize boardgame client this } methods: ... { this }
Example game using Immer (immutable helper)
// game/index.mjsconst produce = immer const game = boardgame