Log inGet started
·
scene · drop-in viewer
asset⌬ scenescene·originates fromworld 8c90d7c4-9…

main

The world's starting scene: a wide ground slab with a collider and a stone fountain whose ring turns, both modelled in `build.luau` with the quick geometry nouns (`Mesh`, `BoxGeometry(...):round(...)`, `LatheGeometry`, `MeshStandardMaterial`), lit by a scene setup (a procedural a…

by◐Doomin·posted 5d ago
What it does

main

The world's starting scene: a wide ground slab with a collider and a stone fountain whose ring turns, both modelled in build.luau with the quick geometry nouns (Mesh, BoxGeometry(...):round(...), LatheGeometry, MeshStandardMaterial), lit by a scene setup (a procedural afternoon sky, a light that follows it, an ambient light and a thin height fog). Two lamp posts stand beside the spawn, and a red crate with dynamic physics is shared by every player in the world.

It sets up play for whoever joins: a player prototype with a humanoid avatar and an orbiting follow camera, and the spawn point where each player arrives.

build.luau states all of it as code, and scene.json holds the baked result, so the scene is there the moment the world opens. A new object for the scene (a table, a house, a cart) is modelled the way the fountain is: parts with rounded edges, turned profiles and cut-outs, written in content(), or in a .sceneModule the scene places when it holds several of them. The quickGeometry guide lists every noun (guides { path: "systems/quickGeometry/documentation/quickGeometry" }).

Lighting is a scene setup

The lighting entity places the scene setup @builtin::examples.lighting.example_sky_drives_lights.example_sky_drives_lights: its Asset component links the setup, and its SceneSetup component holds this scene's own overrides. The setup applies its members (a sky, a light that follows it, an ambient light and fog) to the scene as a whole, live whenever the scene is.

  • Place: build.luau's :instantiate(nil, { name = "lighting" }) line places it; dragging any .sceneSetup into the viewport does the same.
  • Tune: select lighting and edit a member's value, or call entity.find("lighting").component.get("SceneSetup"):set("sun/intensity", 1.4). The override is this scene's own: stored on the lighting entity, saved and synced, and leaving the setup asset and every other scene as they are.
  • Reset: :reset(path) returns a value to what the setup says.
  • Swap: name another setup on build.luau's instantiate line; the rebuild places it on the same lighting entity. Pointing the Asset component's source at another setup in the Inspector is an edit of this scene's own, saved and kept over every rebuild. While it holds, a rebuild names it in its authored list with the call that releases it (sceneAuthoring releaseAuthored), after which lighting follows build.luau again.

The sceneSetup type's README describes what a setup is and how one is made.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

This asset doesn't declare a schema or structured payload.

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

Showing up to 3 levels deep. Open a part to see what it holds further down.

28+items
·
scenemodule · born here
❒asset
# Racecourse — the oval and everything around it One racecourse set, modelled in code and placed once by `scenes/main.scene/build.luau`. It draws: - the **apron**: one wide slab of grass the whole course sits in, - the **turf lane**: an elliptical ring 22 m wide built from `BufferGeometry`, mown in alternating stripes, with a crisp white line on both shoulders, - the **rails**: white posts every couple of metres with white and crimson horizontal bars, on the outside of the lane and on the infield side, - the **finish**: white stripes painted across the lane at the finish line, and the white goal post with its capped uprights and crossbar standing over it, - the **grandstand**: a long stand outside the home straight — a concrete base, three stepped seating tiers in cream and crimson, four rows of a faceted crowd per tier, a colonnade, a cream slab roof and eight barrel vaults over it, - the **infield**: low-poly pines, a pond, the tote board with a colour bar per saddle number, and the **starting gate** with its dividers and legs. ## What it needs from the scene Nothing but a place to stand. Placed as: ```lua asset.resolve("Racecourse", "sceneModule"):instantiate(nil, { name = "course" }) ``` ## The numbers it mirrors ``` A = 92 semi-axis along X (centreline) B = 56 semi-axis along Z WIDTH = 22 lane width ``` These are `RaceSim.TRACK`, the ellipse the race is run on. The module declares its own copy because a scene module compiles in its own environment and cannot `require` a world module — **change the three numbers in both files** and the lane, the rails, the finish and the starting gate all follow. The finish line is at `t = 0`, world `(92, 0, 0)`; the home straight runs along **Z** and the grandstand stands outside it at **+X**, which is the side the broadcast camera and the goal-front camera shoot from.
▲ 0↑ born
◇
component · born here
❒asset
# RaceDirector — one race, from the gates to the result The component that runs ターフヴィクトリー. It owns no geometry and no screen of its own: it drives the assets around it. ``` RaceDirector (one instance, on the entity "RaceDirector" in scenes/main.scene) ├─ RaceSim.module the rules — the oval, pace, stamina, 根性 ├─ Horse1 … Horse8 Horse scene-module placements — moved every frame ├─ RaceCam the one camera, moved per mode ├─ HorseRaceUI.module the start screen, the HUD and the result screen └─ RaceAudio.module the beds, the stings and the spoken commentary ``` Place it in a scene with: - the eight horse placements named `Horse1` … `Horse8`, - an entity called `RaceCam` carrying a `Camera` (any `fov`, high `priority`) and an `AudioListener`, - `HorseRaceUI` and `RaceAudio` present as modules. ## What it does 1. **start** — registers the UI screen and shows the start screen. The player picks a 作戦 (`plan:nige` … `plan:oikomi`), which sets `public.plan`. 2. **countdown** — `start` begins a 3.4 s countdown with the field at the gates. 3. **running** — every frame: `RaceSim.step(race, dt)`, then each horse's position and yaw from `RaceSim.pose(h.dist, h.lane)`, the camera for the live mode, commentary from the race's events (`lead`, `final`, `drain`, `finish`), and a HUD refresh at about 8 Hz. The crowd bed rises with how tightly packed the field is. 4. **result** — placings and times, the prize for the placing, the career record updated, and the horse sharpened a little for a top-three finish. `again` (or the next `start`) runs a fresh race with the same horse. ## Cameras `public.cameraMode` — `broadcast`, `chase`, `overhead`; the HUD's buttons send `cam:broadcast`, `cam:chase`, `cam:overhead`. - **broadcast** — a trackside camera outside the oval on the pack's own normal, tracking it, and once the leader turns into the last 200 m it cuts to a low goal-front angle looking back down the straight. - **chase** — behind and just off the player's horse, low and fast. - **overhead** — high above the pack, following it round the oval. The camera is a single entity whose position is written each frame and whose rotation is built as a yaw-then-pitch quaternion (the engine's models face +Z), so no second camera and no camera behaviour is involved. ## Fields | field | meaning | |-------|---------| | `public.plan` | the player's 作戦 for the next race | | `public.cameraMode` | which camera is live | The career (runs, wins, earnings, best time) lives in the component's own state and survives a race, not an engine restart.
▲ 0↑ born
·
scenemodule · born here
❒asset
# Horse — one low-poly racehorse and its jockey A scene module that builds a single horse, faceted and chunky, facing **+Z**: the barrel, chest and rump as low-segment spheres, a tapered neck, a box skull with a blaze, ears and eyes, a mane and a tail, four legs of three segments each, and a jockey in silks — saddle cloth, breeches, vest, arms, gloves, thighs, boots, helmet, goggles and face. `scenes/main.scene/build.luau` places eight of them, one per saddle number, at the starting gates. ## The gallop There is no animation clip and no per-frame script. The four legs, the tail, the body's bob and the jockey's rise are all **formulas of `Time`** written with `Expr.sin`, which the engine evaluates on the device every frame: ```lua leg.rotation.x = Expr.sin(Time * stride + phase + L.off) * 0.62 body.position.y = Expr.sin(Time * stride * 2 + phase) * 0.045 ``` `phase` is an input, so the eight horses are not in step, and `L.off` puts the front and back legs of one horse out of step with each other the way a gallop runs. Because the pose is a formula, `RaceDirector` only ever moves the placement — the legs keep swinging for free on every horse at once. `math.sin(Time …)` does **not** work here: `Time` is a formula, not a number, and the build context's trig functions are `Expr.sin` and `Expr.cos`. ## Inputs | input | default | meaning | |-------|---------|---------| | `number` | 1 | the horse's saddle number (part names carry it) | | `body` | `#a4571f` | coat colour | | `silk` | `#c0392b` | the jockey's silks and the saddle cloth | | `cap` | `#f2f2f2` | the jockey's helmet | | `phase` | 0 | stride offset in radians, so eight horses do not move as one | Set them per placement with `:instantiate(nil, { params = { … } })`. ## Notes - A `:round(r)` on a face thinner than about `2r` fails and the part is silently not drawn — the blaze and the number plate are deliberately unrounded. - Every part is a shared geometry drawn as an instance, so eight of these cost a handful of draws. - The proportions come from `design/references/03-player-horse.png`: 1.6 m at the withers, 2.4 m from chest to tail, jockey sitting at 2.3 m.
▲ 0↑ born
▣
module · born here
❒asset
# RaceSim — the rules of a turf race The whole of the game's logic, with nothing drawn and nothing scheduled. Every other piece of the game reads it: - `RaceDirector.component` steps it every frame and places the horses from it. - `HorseRaceUI.module` draws the standings, clock and times it produces. - `Racecourse.sceneModule` and `scenes/main.scene/build.luau` mirror its `TRACK` numbers so the horses are always on the turf they model. ## The oval ```lua RaceSim.TRACK = { A = 92, B = 56, WIDTH = 22, RAIL_OUT = 12.4, RAIL_IN = 11.6, SAMPLES = 720 } ``` An ellipse in the XZ plane. Distance is measured in **metres run from the finish line**, and the finish line sits at `t = 0` — the point of least curvature, world `(92, 0, 0)` — so the home straight runs along **Z** and the stands stand outside it at **+X**. A model on the track faces **+Z**. ```lua RaceSim.pose(distance, lane) -> x, z, yaw, nx, nz ``` `lane` is `-1` (inner) through `1` (outer); `yaw` turns a +Z-facing model down the track; `nx, nz` is the outward normal, which is how the broadcast camera finds the outside of the rail. `RaceSim.LENGTH` is the oval's circumference in metres (about 472). ## The field `RaceSim.FIELD` is the eight horses: `number`, `name`, coat `body`, `silk` and `cap` colours, a preferred `style`, and the three hidden parameters `speed` / `stamina` / `guts` (0–100). Horse 1 is the player's, `ヒカリノサクラ`. `RaceSim.STYLES` are the four 作戦 — `nige` 逃げ, `senko` 先行, `sashi` 差し, `oikomi` 追込 — with `STYLE_NAME` and `STYLE_NOTE` for the screen. ## One race ```lua local race = RaceSim.newRace(plan, career) -- plan overrides horse 1's style local events = RaceSim.step(race, dt) -- { kind = "lead"|"final"|"drain"|"finish", ... } local rows = RaceSim.standings(race) -- place, number, name, colour, gap, finished, time ``` `step` is where the race is decided: - **Pace** — each style keeps its own multiplier through 序盤 / 中盤 / 終盤 (`PACE`, ×0.92 to ×1.09 of the horse's own top speed). Front runners go early, 差し and 追込 keep something for the last stretch. - **Stamina** — drains with `(v/16)^3`, so a horse that runs faster empties it sooner; a full tank lasts `38 + 0.62 × stamina` seconds at racing speed. Below 14% the horse fades toward ×0.78 — that is 失速, and it happens in the last 200 m to the horses that were asked too much too early. - **根性** — every rival within 5 m adds up to ×1.03, scaled by `guts/100` and by how late the race is, so horses that are level in the straight fight each other harder than horses alone. `RaceSim.FINAL` is the last 200 m. `RaceSim.formatTime` writes `m:ss.cc`, `RaceSim.prize` pays a placing in 万円, `RaceSim.colourOf` / `nameOf` look a horse up by number. ## Changing the track Change `A`, `B` and `WIDTH` here and change the same three numbers in `Racecourse.sceneModule` (it cannot `require` this module — a scene module compiles in its own environment) and the scene's start gate follows. Everything else — distances, pace, finish times — works in metres and needs no edit.
▲ 0↑ born
backing path · scenes/main.scene

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.