Log inGet started
World

Hold Your Breath: Horror FPS Kit with Flashlights, Scripted Scares and Stalkers (fork)

Branchmain
Commit6143ad305f

README.md

bulkheadKit

Build derelict sci-fi interiors in code: research stations, ships, bunkers, submarines, labs, maintenance tunnels. One call builds a room or corridor with real doorway openings, door frames, structural ribs and ceiling beams, pipe runs, cable trays and trims; another places one of 30 procedural props. Six surface themes switch the whole look with one word. Made for horror levels (it builds the demo level of the horror kit in this world, Brinefall Station), and works for any interior.

Version 1.0.2 (Build.VERSION).

Install

Search ZeroMind for bulkheadKit and install bulkheadKit.package, or zero zeromind installAsset <guid> in the shell. It needs nothing else: the surfaces it builds with ship inside it.

First example

In a scene's build.luau:

local B = require("bulkheadKit.build")

function content()
    local root = entity.spawn("Station")
    B.useTheme("derelict")                       -- pale green bulkheads, grating, rusty pipes
    -- a 3 m wide, 20 m long corridor with a doorway at its north end
    local hall = B.room("hall", { x0 = -1.5, x1 = 1.5, z0 = 0, z1 = 20, h = 3.2,
        openings = { { side = "N", at = 0, w = 1.6, h = 2.3 } } }, root)
    -- a lab beyond it, in another theme
    B.useTheme("clinical")
    local lab = B.room("lab", { x0 = -6, x1 = 6, z0 = 20.3, z1 = 32, h = 4,
        skipWalls = { S = true } }, root)
    B.prop("labBench", { 0, 0, 25 }, 0, lab.root)
    B.prop("tank", { -4, 0, 29 }, 0, lab.root)
    B.prop("fluoro", { 0, 3.95, 25 }, 90, lab.root)   -- ceiling fixture; put your Light under it
end

Two rooms that touch share one wall: give one of them skipWalls on that side and cut the doorway (openings) on the other.

Rooms: B.room(name, spec, parent?) -> { root, cuts, center, y, h }

spec is the inner floor rectangle and what to put round it:

fieldmeaningdefault
x0, x1, z0, z1inner floor rectangle, metres (+Z = north)required
y, hfloor height and room height0, 3.2
wallwall thickness0.3
openingsdoorways { side = "N"/"S"/"E"/"W", at = centre along that wall, w, h, sill } (a sill makes a window)none
skipWalls{ N = true, ... } sides left open (corridor ends, shared walls)none
ribsspacing of structural frames on the long walls and beams across the ceiling (0 = none)2.4
pipes, traysthe pipe bundle along one long wall and the cable tray down the middleon
noFloor, noCeilingleave them out (pools, shafts, ramps, open sky)off
floor, walls, lower, ceilinga material or theme role for this room onlythe theme's

Walls have a dark lower band (wallLower) to 1.05 m, a skirting and a dado rail, and every doorway gets jambs and a header in the theme's trim. Walls and floors carry box colliders; decoration does not.

Themes: B.useTheme(name)

themewallsfloorfor
derelictchipped pale-green riveted bulkheadrusty gratingresearch stations, the default
hulldark bolted pressure hullwet tread platedocks, engine rooms, the deep parts of a ship
clinicalcracked white tilestudded rubbermed bays, labs, showers
concretedamp stained concretegratingpump rooms, service tunnels, basements
quartersgreen over wood laminaterubbercabins, offices, a mess
industrialdark green over hazard stripestread plateplant rooms, cargo holds

The surfaces are generated PBR sets (colour, normal, roughness/metal) wrapped with the engine's world-space triplanar shader, so a 20 m wall and a 0.3 m jamb both tile at real size and nothing stretches. B.material(roleOrName) returns any of them for your own parts.

Props: B.prop(kind, pos, yaw?, parent?, opts?) -> group

Every prop is built round its own floor point, facing -Z, and placed with pos and yaw (degrees). B.propKinds() lists them:

kindwhatoptions
lockerrow of steel lockerscount, openIndex (one door hangs open)
bunktwo-tier bunk with mattresses, blankets, ladder
desksteel desk, drawers, papers, lamp, mug, chairchair = false, chairYaw
chairswivel chair
crate, casesstrapped crate; a stack of three casessize, mat
shelffour-shelf rack with boxesseed varies the contents
labBenchsteel bench, microscope, jars, tray, clipboard
consolecontrol desk, toggles, three CRT monitorsscreens = false for dead screens
tankcylindrical specimen tank with murky fluidheight, fluid = false
pumppump housing, motor, plinth, pipes, valve wheel, gauge
gurneymed-bay gurney with instrument trolley
gasTanksfour chained gas cylinders
ventwall duct mouth whose grate is its own child entity grate (blow it off in a scare)size
fluorocaged double fluorescent fixture (tubes tubeA/tubeB)off = true for dead tubes
wallLampcaged bulkhead lampglow = glowRed, glowAmber, glowTube, glowCold
hangingBulbbare bulb on a cord (bulb)cord, glow
valveWheel, hatchRingbrass valve wheel; bolted pressure-hatch ring for a doorwaysize
divingBell, submersiblehero props for a dive bay and a sub dock
bodyBag, papers, cable, barrel, table, puddledressing

Lower level: B.part, B.box, B.pipe(parent, name, a, b, radius, material?), B.group, B.quatYaw, B.quatAxis, B.quatMul.

Multiplayer

Everything is plain scene content built at author time and baked into the scene, so every player loads the same station. Put moving or scripted things (doors, lights that fail) on synced entities with the kits that drive them.

Performance

A room is ~40–120 primitive entities; a 10-room level is ~1,900. Props share a handful of materials. Fixture glows are emissive and cast no light; add real Lights only where they matter and keep shadow-casting lights few.

Known limits

  • Props are built from primitives (boxes, cylinders, tori, capsules), not sculpted meshes. They read well in the dark; up close they read as stylised.
  • Ramps are a rotated box (B.box with a rot), so stairs are not modelled step by step.
  • Rooms are axis-aligned rectangles.

1.0.1

Props use lit materials instead of tints, so nothing shows in total darkness. Fixture glow follows its light.

1.0.2

Ships a test suite, bulkheadKitTests: every theme and prop builds, unknown names are refused, doorways open, the README example builds (all dry runs, nothing lands in your scene).