PYRAMID — Tower Defense
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.
| Mesh | Size (metres) | Stands in for |
|---|---|---|
sand_wraith | 2.62 tall, feet at 0 | the enemy body in Enemy — scaled 0.62 / 1.0 / 1.2 / 3.0 by kind |
obelisk_tower | 9.12 tall, base at 0 | the obelisk body in Tower |
brazier_flame | 1.48 tall, base at 0 | the flame in the brazier's bowl |
sphinx_guardian | 2.94 tall, base at 0 | the guardians either side of the door |
scarab_seal | 3.30 tall, centred at 0 | the seal on the door |
scarab_sun | the gold disc | the sun the scarab holds above its head |
standard_banner | 9.25 tall, base at 0 | the 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).