Log inGet started
World

Game Night: Cards, Dice and Board Games Kit

Branchmain
Branchesmain
Commit0cb8462300

README.md

gameNight

The game glue of the Game Night world: a cosy room where friends sit down at tables and play a card duel and a dice race, plus a gallery of every style the kits offer. Everything the games are made of comes from installable kits; this package only joins them up, so it is also a worked example of combining them.

partwhat it does
DuelStation componentJoins the felt table (tableKit) to the Lantern Duel (cardsKit + lanternDuel): sitting in a chair takes that card seat and opens the card screen for you alone (setLocalUi), the table machine moves the turn indicator and writes glow, shield and card count on the nameplates, and a finished duel shows the results screen with Rematch.
RaceStation componentJoins the tavern table (tableKit) to the race board (boardKit) and the dice tray (diceKit): your chair is your pawn, only the seat whose turn it is may roll (R, pad A, tap or drag on the tray, or the Roll button), the dice total moves the pawn, board events show as a line at the top, the turn ring follows the board, first pawn home wins, and the results screen offers a rematch.
Gallery componentThe gallery kiosk: one panel (Dice, Boards, Pawns, Tables, Cards) listing every entry of the four kits' catalogs, applying a pick live to the try-out table or either game table. Mouse, touch, keyboard and gamepad.
results moduleThe shared end screen: MatchFlow's winner banner with Rematch and Stand up.
guideHow to make a board game with dice and turns, at a table with seats

Quick start

The Game Night world's scenes/main.scene/build.luau places everything; the parts that matter:

local TK = require("tableKit.api")
local LD = require("lanternDuel.rules")
local BK = require("boardKit.api")
local DK = require("diceKit.api")

-- the duel
TK.Table { name = "Duel", position = { -3.6, 0, 0 }, yaw = 90, style = "felt", shape = "round", seats = 2, hud = "top" }
LD.Table { name = "DuelCards", style = "fantasy", autoSeat = false }
entity.spawn("DuelStation").component.add("gameNight.DuelStation", { tableName = "Duel", cardsName = "DuelCards" })

-- the race
TK.Table { name = "Race", position = { 3.6, 0, 0 }, yaw = -90, style = "tavern", shape = "long", seats = 4, hud = "top" }
BK.Board { name = "RaceBoard", position = { 3.6, 0.76, -0.42 }, size = 0.82, track = "loop", spaces = 30, autoSeat = false }
DK.Tray { name = "RaceDice", position = { 3.6, 0.76, 0.6 }, dice = { "d6" }, look = "wooden", showUi = false, input = false }
entity.spawn("RaceStation").component.add("gameNight.RaceStation", { tableName = "Race", boardName = "RaceBoard", trayName = "RaceDice" })

-- the gallery kiosk
entity.spawn("GalleryKiosk").component.add("gameNight.Gallery", {})

Defaults: the duel is two players, 20 glow, 3 energy, 5 cards; the race is up to four players on a 30-space loop with a d6, overshoot finish and fortune cards. Change any look or rule with one setting on the kit it belongs to (see each kit's README, or open the gallery kiosk in play).

How to play

  • Walk up to a chair and press E (pad A, or tap the prompt) to sit; Esc (pad B, or Stand up) to stand. C (pad Y) changes the camera view.
  • Card duel: drag a card from your hand onto the felt (or tap it, then tap the felt), play what your energy pays for, press End turn. Damage hits shield first; the first lantern to reach 0 glow loses.
  • Dice race: on your turn press R, tap or click the tray, press pad A, or drag across the tray to aim a throw. Your pawn hops the total; spaces push you on, send you back, skip your next turn, warp you or draw a fortune card. First home wins.
  • Gallery: walk to the lectern in the north alcove and press E. Pick a tab, a target table, and an entry; it changes on every screen at once.

Tests

The kits carry the tests (cardsKit, lanternDuel, tableKit, boardKit, diceKit test suites). This package is checked by playing: two clients seated at each table, a full duel and a full race to a winner, rematch, and the gallery applying entries to each target.