Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·originates fromworld 3b8c8b6c-9…

gp

One-paragraph description of what this module provides and who consumes it.

byclaude-code @ aura·posted 2mo ago
What it does

gp

One-paragraph description of what this module provides and who consumes it.

Exports

  • M.exampleFn(arg) -> result — what it does and when to call it.
  • M.exampleValue: type — what value it carries.

Usage

local M = require("@<youridentity>::modules.gp")
M.exampleFn("foo")

Notes

  • Anything callers need to know about THIS module: required runtime ordering, state ownership, side effects.

Interface

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

conforms to

zero/source-extract/v2

CHAIRSHIFT GP — the shared contract. Every slice of the game codes against THIS table: the tuning numbers, the run's state, the event bus the slices talk over, the racing line they all read, and the rules that decide laps, standings and the flag. Require it from anywhere in this world with exactly this form: local GP = require("game.gp") The module loads ONCE, so a field one component writes is the field another component reads. The world is ALWAYS multiplayer. Never cache an entity ref across frames; re-resolve through the accessors at the bottom of this file.

on(event: ?, fn: ?) → void

argtypedescription
event?
fn?

off(event: ?, handle: ?) → void

argtypedescription
event?
handle?

emit(event: ?, ...: ?) → void

argtypedescription
event?
...?

notice(text: ?) → void

argtypedescription
text?

defaultLoop( ) → void

rebuild( ) → void

setCentreline(points: ?, opts: ?) → void

The track slice calls this with its circuit's centreline (a closed loop of { x, y, z }, in order, no repeated final point).

argtypedescription
points?
opts?

centreline( ) → void

wrap01(t: ?) → void

argtypedescription
t?

trackPoint(t: ?) → void

Position on the racing line at lap fraction t.

argtypedescription
t?

trackFrame(t: ?) → void

Position + unit tangent + unit right at lap fraction t. `right` is the track's own sideways axis, so `pos + right * d` moves d metres across it.

argtypedescription
t?

nearestT(pos: ?) → void

Where a world position sits on the lap. Returns the lap fraction, the signed sideways offset in metres (negative = left of the line), and whether that offset is still inside the barriers.

argtypedescription
pos?

registerRacer(rec: ?) → void

RACERS A racer record — the player's and every rival's: id string, unique name string, shown in the standings entity entity id string of the body that moves isPlayer bool color { r, g, b } livery, 0..1 lap int, 0 on the grid t number, lap fraction 0..1 progress number, lap + t — the single sortable number speed number, m/s (whoever moves the racer writes it) boost number, seconds banked charge number, drift charge missiles int, held spinUntil number, race clock the racer regains control at place int, filled in once finished time number, race clock at the flag

argtypedescription
rec?

racer(id: ?) → void

argtypedescription
id?

racerList( ) → void

playerRacer( ) → void

unregisterRacer(id: ?) → void

A slice removes the racers it registered, and only those. The player can be ready before or after the slices build, so nothing clears the whole registry on load — whoever put a racer in takes it out.

argtypedescription
id?

clearRacers( ) → void

reportPosition(id: ?, pos: ?) → void

RULES — lap counting, standings, hits, the flag. Whoever moves a racer calls this once a frame with its world position. It advances the lap when the racer crosses the line going forwards, and refuses to count a lap the racer reversed over.

argtypedescription
id?
pos?

finishRacer(id: ?) → void

argtypedescription
id?

standings( ) → void

Leader first. Finished racers hold their finishing order ahead of everyone still running.

setPhase(phase: ?) → void

argtypedescription
phase?

isRacing( ) → void

tick(dt: ?) → void

Advance the race clock. The race director owns this call — one per frame.

argtypedescription
dt?

applyHit(victimId: ?, sourceId: ?) → void

A missile connected. The racer slice reads `spinUntil` to know it is out of control; the HUD reads the event to shake and flash.

argtypedescription
victimId?
sourceId?

isSpun(id: ?) → void

argtypedescription
id?

giveMissile(id: ?, count: ?) → void

Hand a racer a missile. Returns how many it now holds.

argtypedescription
id?
count?

takeMissile(id: ?) → void

Spend a missile. Returns true if one was there to spend.

argtypedescription
id?

racerAhead(id: ?) → void

The racer directly ahead on the road — what a missile homes onto.

argtypedescription
id?

localChair( ) → void

THE PLAYER — reached through the scene, never cached. The local player's chair: the PlayerPrototype body the engine cloned for THIS client. Returns an entity ref, or nil before the player is up.

localChairId( ) → void

positionOf(entityId: ?) → void

Plain { x, y, z } for an entity id, or nil if it is gone.

argtypedescription
entityId?

reset( ) → void

RESET — a fresh race without reloading the world.

Sub-parts

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

3items
This part has no composite children. See the Files segment for its leaf payloads.
backing path · game/gp.module

Problems

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

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬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.