Skip to content

TesseractCat/bg3d

Repository files navigation

Board Games in 3D!

This is a board game engine created in Three.js and Rust, designed to make it as easy as possible to start playing a boardgame online.

Try it now!, also check out the itch.io page.

Building

Building is simple. You will need a recent version of Rust + NPM.

First, install the npm packages with npm install. Next, run build.sh. You're done! (Right now I'm patching Three.js to only export /src/Three.js, for better tree-shaking).

Usage

All lobbies are given a unique URL: https://example.com/lobby_name. You can give a lobby a custom name, or get a random one generated by visiting the base URL.

Controls:

  • Left click and drag to orbit
  • Shift click and drag to pan
  • Scroll wheel to zoom
  • Click and drag to move objects
  • T to take an object or card from a bag or deck
  • G to add a card to your hand
  • And of course Right click any object for more!

Making games

Creating a new game is easy. Just zip up your assets with a manifest.json with a main.lua script. Then just drag your zip file onto the game window.

You can register up to 40MiB of assets (each under 2 MiB), which will be stored and distributed on the server until the lobby closes.

There isn't any documentation yet, but take a look at plugins/*/ for guidance.

For models:

  • Add colliders to GLTF files by adding a custom collider property set to either box or cylinder.
  • Units are in inches.