Log inGet started
World

PYRAMID — Tower Defense

Branchmain
Branchesmain
Commit82c25f40b2

README.md

models

The six props PYRAMID was blocking in, carved from code: the sand wraith, the obelisk tower, the brazier flame, the seated sphinx guardian, the turquoise scarab seal with the gold sun it lifts, and the causeway standard.

init.luau is the source of every model — proportions, palette and facets — and M.write() bakes each one into the .mesh asset beside it (asset.create("mesh", name, { folder = "pyramid/models" }), durable, so it lands on canonical source). Everything here is procedural: the mesh service's provider was out of quota when this slice ran (upstream 402), so none of it is generated from a picture, and every model was built against the reference in design/references/ by hand.

MeshSize (metres)Stands in for
sand_wraith2.62 tall, feet at 0the enemy body in Enemy — scaled 0.62 / 1.0 / 1.2 / 3.0 by kind
obelisk_tower9.12 tall, base at 0the obelisk body in Tower
brazier_flame1.48 tall, base at 0the flame in the brazier's bowl
sphinx_guardian2.94 tall, base at 0the guardians either side of the door
scarab_seal3.30 tall, centred at 0the seal on the door
scarab_sunthe gold discthe sun the scarab holds above its head
standard_banner9.25 tall, base at 0the standards along the causeway

Every mesh faces +Z, stands with its base at y = 0 (the seal is centred so it can hang on a door), and carries its colour per vertex — honey limestone, turquoise faience and weathered gold in one mesh under one material. The values in init.luau are the linear ones the renderer reads vertex colour as, not sRGB: 0.72 linear is a sun-bleached 0.87 on screen.

The game reaches each mesh by name (pyramid.models.sand_wraith) through a Model component's model field, so nothing on the gameplay path has to resolve a computed asset identity.

Calling it

local Models = require("pyramid.models.models")
local made = Models.write()        -- authoring only: writes every .mesh asset
local geom = Models.geometry("obelisk_tower")  -- the flat arrays, unwritten

pyramid.models.solids is the geometry kit they are cut from: boxes, frustums, spikes, cylinders, ellipsoids, extruded slabs, swept ribbons and tubes, each oriented against an outward hint so a model author never thinks about winding.

Materials

carved_stone (rough limestone, cloth, bronze), flame (the brazier's fire), seal_glaze (the turquoise glaze that still shows its form while it glows) and sun_gold (the disc the scarab lifts).