HOW WANDER IS BUILT · LAYER 7 OF 7

A world has rules

Vehicles, missions, prizes, warps and the weather clock.

1. A number is a column2. A column is a height3. A window is a chunk4. A chunk is a mesh5. A mesh is a view6. A world has people7. A world has rules

The last layer is what you can do. Vehicles share one driving model (throttle, steer, grip, a slope from the ground under each wheel); tanks lob shells under gravity; the opponent in the Proving Ground is a WSRF forest trained on this very ground, and it shows its thinking. Missions are lists: visit these sites, carry this parcel from that station to this well, fly through these rings in order. Prizes stand on the summit of every prize column (rank 5 and up with an even square remainder) and a warp gate on the region's biggest hill; every place has a warp address, world-g36-z36-check, that anyone can type into the Warp panel or paste as a link. The weather is three bits on three exact clocks from a triangular XOR register: it rains on your valley every so many hours, and that is proven, so it is still true in a thousand years. None of it is random. The whole world, people, prizes and weather, is a function of the column number and your seed.

The twenty lines that make it

const V = WanderVehicles;                               // vehicles.js (sitoolz/js/vehicles.js): pure functions
let car = V.spawn ? V.spawn("car", 10, 10) : {x: 10, z: 10, yaw: 0, v: 0};   // see cards/vehicles.md for the exact API
for (let t = 0; t < 120; t++) car = V.step(car, {throttle: 1, steer: t < 60 ? 0.3 : -0.3}, 1/60, (x, z) => inst.ground(x, z));
console.log("after two seconds:", car.x.toFixed(2), car.z.toFixed(2), "heading", car.yaw.toFixed(2));
const P = W.regionPrizes(inst, 0);                       // {prizes: [{g, k, x, z, h, code}], gate: {code}, cells}
console.log(P.prizes.length, "prizes; the gate's address:", P.gate.code, "->", RulerLand.warpDecode(P.gate.code));
const wx = WanderLaw.weatherAt(hour);                    // {cloud, rain, wind}: bits of tri_xor columns 11, 9 and 6
console.log("hour", hour, wx, "next rain change in", WanderLaw.nextChange(hour, "rain"), "hours");

Cards: vehicles.md, rulerland.md (prizes and warps), clocks.md (the almanac), indexed.md (why nothing here needs a random number). The Fair Arena demo shows the same idea for dice: every roll addressed by stream and turn.

← A world has people

How Wander is built · by Lars Rocha · every layer stands on a law in sitoolz, written twice and checked against one fixture.