Log inGet started
World

ターフヴィクトリー / TURF VICTORY

Branchmain
Branchesmain
Commit7947fe284a

README.md

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.