Log inGet started
World

Ganesha: Guardian of the Portal

Branchmain
Branchesmain
Commit1ae1a54e78

README.md

Stage — the world slice

The place GANESHA: GUARDIAN OF THE PORTAL happens. One instance, on the scene's MountWorld. Builds and re-grades the eight arenas from G.ARENAS, the festival town and the portal, and stages every beat from the darkness through the portal, the tunnel, the transformation and the blessing.

Public fields

None. Everything it needs is in game.Game.

Methods

  • :showArena(index) — rebuild the arena for 1..8, immediately.
  • :arenaId() — which arena is standing, by id ("grassland", "festival", "blessing", …).

Lifecycle

  • start() — reaches MountWorld, subscribes to the bus, stands up arena 1 and, while the act is TITLE, the dark festival the player opens in.
  • update(dt) — runs the beat queue, and watches for the guardian standing in the portal so it can raise PORTAL_NEAR and the "Enter the portal" prompt.
  • onDestroy() — unsubscribes and despawns everything it placed.

Notes

  • Everything it places is temporary and hangs under one root it created. The world is shared, the scene is the plan pass's, and a slice must not put runtime objects into either.
  • Geometry is code. The discs, boulders, crystals and spires are generated as runtime meshes with per-face normals, so the flat-shaded look is a property of the generator rather than of a texture. The engine re-runs that code on every load, which is exactly why none of it is frozen into an asset.
  • Materials are made from the component, so the engine files them under the runtime store and re-creates them per load; they are never accepted into the scene.
  • Lighting is re-graded, not rebuilt. lighting.setup writes the scene's own sun, ambient and sky, and this slice sets them per arena.