Log inGet started
Package

main.scene

README.md

main: the Bastion Works gallery

The world's starting scene: turretsKit's showroom, where every turret, tier, targeting mode and style can be seen working against live targets. build.luau states all of it as code, scene.json holds the baked result, and entrypoint.luau runs on every player's machine while it plays.

What is in it

  • The lane. A ring-shaped lane curves round the spawn at 8.5 m, from the player's left, round the front, to the right. A looping spawnerKit stream (gallery/dummyStream.data, path pattern, up to 14 alive) sends practice dummies along it: standard, armoured and quick dummies (gallery.dummies). Each dummy that walks out gets a barsKit (Gaugeworks) overhead health bar, and SecondWind handles their health, hit effects and a kill feed HUD.
  • Twelve labelled turret stations. Outside the lane, facing it, stands one of each turret, all inside the view from the spawn (-45° to 36°). Neighbours alternate between a far ring (15.8 m) and a near ring (12 m), with the far ring at both ends, and each ring's labels hang at one fixed height (far ones higher and bigger), so the labels form two rows that never overlap. Each label reads its name, then its tier and targeting mode. Each station is named after its turret, so the kill feed reads "Machine Gun ✖ Dummy":
TurretTierTargeting
Machine gun1first
Cannon2strongest
Mortar1last
Laser3weakest
Tesla2nearest
Frost1first
Support2(boosts nearby turrets)
Poison3strongest
Missile2first
Sniper1strongest
Flame2nearest
Wall1(blocks the lane)
  • The wall stands across the lane on the left of the view (52°), its label above the far row and its health bar where the near row leaves room: dummies that reach it stop and claw at it until it breaks, then it rebuilds itself.
  • The workshop. Inside the lane, right in front of the spawn, is a machine-gun turret with four switch pads (gallery.SwitchPad) in a row, two each side of the view's centre: TYPE, TIER, TARGETING and STYLE. Step on a pad, or press E / tap the screen while standing on it, to step the workshop turret to the next value; the pad's sign shows the current one.
  • Style of every turret. A fifth, blue pad just beside the spawn (low sign, bottom of the view) swaps the style (sci-fi, medieval, toy) of every turret at once.
  • Signs. "BASTION WORKS", a subtitle and a one-line hint about the pads hang above the far side of the gallery.
  • On every screen. gallery.PhoneFraming, on the player's camera rig, lays the labels out for each player's own screen. When the screen changes shape it hides them, measures every turret label, pad sign and title line once as the engine draws it, works out the whole layout (rows above the models, the title block above, nothing touching, nothing near an edge, clear of the kill feed, the wall's health bar and the player's name tag), applies it in one go and shows them again. Held upright it also widens the view and stacks labels one word per line. It places labels with TK.setLabelPlacement, so it works for a player who joined someone else's game too. Each player's screen is laid out on its own; nothing of it is synced.

Setup

A checkerboard floor with a collider, a sun, ambient light and a late-afternoon procedural sky. Each player arrives at the spawn just behind the centre with a humanoid avatar and an orbiting follow camera (PlayerPrototype), framed for the shape of each player's screen by gallery.PhoneFraming. Turrets are synced entities, so every player sees the same aim, shots and settings. The entrypoint sets the default style to sci-fi and picks the projectile budget for the machine (desktop, web or phone).

Layout numbers live in gallery.layout.