main.scene
- .build.state16 B
- .metadata17 B
- README.md3.6 KB
- authoring
- build.luau27.7 KB
- entrypoint.luau6.3 KB
- scene.json1.3 MB
This package holds more than this page lists. See all of its files in its world.
README.md
main
A campfire clearing to start a world from: a low wooded bowl at the edge of a pond, a path from the spawn to the fire, three log seats and a bench round it, a lantern on a post beside it, and a sky that runs through the day from 17:30, with clouds drifting over. Players arrive on the path facing the fire.
Everything here is yours to keep, change or remove. All of it hangs under one
entity, clearing, so one call clears it and leaves the player setup:
tools.use("scene", "remove", { "clearing" })
Parts
Each part directly under clearing carries a role attribute, so a part is
found, kept or removed by what it is for:
| Part | role | What it is |
|---|---|---|
lighting | sky | The scene setup @builtin::scenes.clearing.lighting: the sky and its hour, the sun and the moonlight that follow it, ambient light and height fog that dim and blue with the hour, and a sky light. |
clouds | sky | A VolumetricSky cloud layer, lit by the sun at every hour. |
ground | ground | The terrain, the path over it and a HeightfieldCollider holding the same heights. |
pond | ground | Pond water from the Tidewater package (@tidewater::tidewater.components.WaterBody, installed when the world was made), reeds round its edge and a Water volume that floats what falls in. A world without Tidewater gets a plain still surface instead. |
campfire | prop | A ring of stones and logs, a Fire at medium quality, and a collider that keeps players and the camera out of the flames. |
seats | prop | Three log seats and a plank bench, each with a collider. |
lantern | prop | An iron lantern on a post, with a warm point light that casts shadows. |
plants | decor | Trees, bushes, rocks, grass and flowers, scattered from a seed. |
tools.use("scene", "find", { attribute = { name = "role", value = "decor" } })
tools.use("scene", "remove", { attribute = { name = "role", value = "prop" } })
PlayerSetups and Spawns stand beside the clearing: the player prototype
(a humanoid avatar and an orbiting follow camera) and the spawn on the path.
Packages
A new world made with this scene installs the Tidewater water kit as a library
(/source/libs/@tidewater, pinned at one version), and the pond is its water.
Its guides say what else it does: lakes, rivers, waterfalls, floating and
swimming. world.uninstallLibrary("@tidewater") takes it out; the next rebuild
of this scene then draws the plain surface.
Changing it
build.luau states the whole clearing as code, and scene.json holds the baked
result. The terrain and the scatter come from one seed and the functions at the
top of the file: change SEED for another clearing with the same plan, move
POND, PATH or SPAWN, or edit heightAt for another landform. Each part is
one section of content(); deleting a section removes that part at the next
rebuild.
The hour is a value of the scene setup:
local setup = entity.find("lighting").component.get("SceneSetup")
setup:set("sky/backdrop/timeOfDay", 21) -- night
setup:set("sky/backdrop/autoCycle", false) -- hold the hour
The day runs while the game plays, on the session clock, so every player sees the same hour; it holds still in edit mode. The sun, the moonlight, the ambient light and the fog follow it: after dark the sky turns dark blue with its stars and moon, the ambient light and the fog dim and blue, and the campfire and the lantern light the clearing.
Entry point
entrypoint.luauholds the scene's load and per-frame hooks, all commented out until needed.