Log inGet started
Package

layout.module

README.md

gallery.layout

Part of the Bastion Works showcase world's own content, not part of turretsKit or projectileKit. It says where everything in the gallery stands; the scene build (scenes/main.scene/build.luau) places entities from it.

The player spawns at the origin looking along +Z. The dummies' lane is an arc of radius 8.5 m around the spawn, sweeping from the left round the front to the right. The turret stations stand on two rings facing the lane, all within the view from the spawn, one of each turret, each with its own tier and targeting mode. Each ring's labels hang at one fixed height, so they form two rows that never overlap. The wall stands across the lane on the left of the view. In front of the spawn, inside the lane, is the workshop turret with four switch pads; a fifth pad beside the spawn swaps the style of every turret.

Fields

  • LANE_RADIUS: 8.5 m.
  • LANE_FROM, LANE_TO: -104, 112: lane start and end, degrees from +Z.
  • LANE_POINTS: 19 points along the lane.
  • NEAR, FAR: 12, 15.8 m: the two station rings.
  • LABEL: { near = { size = 1.05, at = 2.7 }, far = { size = 1.3, at = 4.4 } }: label size and fixed height per ring, passed to each turret as labelSize / labelAt.
  • STATIONS: eleven { def, deg, ring, tier, targeting } entries, 8.1° apart from -45° to 36°, alternating far and near, with the far ring at both ends (the near row's left end stays free for the wall's health bar):
TurretdegRingTierTargeting
machineGun-45far1first
mortar-36.9near1last
laser-28.8far3weakest
missile-20.7near2first
tesla-12.6far2nearest
support-4.5near2first
frost3.6far1first
sniper11.7near1strongest
flame19.8far2nearest
cannon27.9near2strongest
poison36far3strongest
  • WALL: { deg = 52, tier = 1, labelSize = 0.95, labelAt = 4.5 }: the wall turret across the lane, its label above the far row and its health bar at the near row's free left end.
  • WORKSHOP: { pos = { 0, 0, 4.6 }, def = "machineGun", tier = 1, targeting = "first" }.
  • PADS: five { name, field, title, pos, signHeight?, signSize? } pads: PadType (def, x -4.6), PadTier (tier, x -2.3), PadTargeting (targeting, x 2.3), PadStyle (style, x 4.6), all at z 1.8, and PadStyleAll (styleAll, "STYLE OF EVERY TURRET") at { 1.6, 0, -2.6 } with a small, low sign.

Functions

  • polar(deg: number, r: number, y: number?): { number }: point at an angle (degrees from +Z) and distance from the spawn.
  • lane(): { { number } }: the lane's points, start to end.
  • faceCentre(pos: { number }): number: yaw (radians) turning an entity at pos to face the spawn.
  • yawQuat(yaw: number): { number }: a yaw-only rotation quaternion.