Log inGet started
World

Mario Kart OrigoZ

Branchmain
Branchesmain
Commit9a3c94ad3e

README.md

core

The shared contract of Mario Kart OrigoZ. Every slice reads its rules here, so no slice hard-codes a number that belongs to the game.

require("game.core") from anywhere in this world.

What it holds

FieldWhat it is
TITLE, PROMPT, ARTThe game's name, the pulsa J para jugar prompt, and the art-direction sentence — word for word from the reference pass, reused by every prompt.
CIRCUITSThe three circuits: id, name, laps, layout (ring / square / ribbon), racing surface, what lies beyond the edges, and half-width.
KARTHow a kart feels: max speed, acceleration, braking, turn rates, hop and gravity, drift multipliers, trick spin.
SURFACEWhat each surface does to you: road 100%, water 75%, grass 50%, space falls.
SPARKThe drift charge table: blue at 1.0s (0.5s boost), orange at 2.5s (1.25s), rainbow at 4.0s (2.5s).
BOOSTTrick 0.75s, mushroom 2.0s, feather 2.0s.
ITEMSCrate respawn (8s) and the mushroom / feather odds.
RESCUEHow Lakitu puts you back: drop height, lift speed, lift duration.
PHASE, flow, raceThe flow state machine and the live race clock.
recordsThe best time on each circuit, kept in runtime_data.world — shared and durable.

API

  • M.circuits(), M.circuit(id), M.circuitIndex(id)
  • M.register(name, api) / M.system(name) — how slices reach each other
  • M.on(name, fn) / M.emit(name, payload) — the slices' event bus (phase, circuit, lap, crate, boost, rescue, finish)
  • M.setPhase(p), M.selectCircuit(id), M.openControls(), M.beginRace(), M.startRace(), M.tick(dt), M.reachPoint(total), M.finishRace()
  • M.records.get(id) / M.records.set(id, ms) / M.records.all()
  • M.formatTime(ms) → "00:45.678", M.countdownLabel(seconds)
  • M.clamp, M.lerp, M.approach

Who reads what

  • kart — KART, SURFACE, SPARK, BOOST, RESCUE, race.
  • tracks — CIRCUITS, SURFACE, reachPoint, PHASE.
  • items — ITEMS, BOOST, FEATHER_LIFT, emit("crate").
  • screens — flow, race, records, formatTime, PHASE.
  • audio — on("phase"), on("boost"), on("crate"), on("finish").