1,157 matches played · 138 frags · last on Box Canyon
An arena shooter in a shared world of blocks, played as a rotation of seven maps: a ship's drum whose bridges turn, a ship's spine, a concrete megastructure, a brutalist hall, an aqueduct carrying water and lava over the fight, and two homages, Sandstone and Box Canyon. A match lasts ten minutes, or until someone's score reaches thirty; then everyone sees the final board and votes on the next map, and a fresh world of it starts. Start with a blade, find or craft weapons from what you blast out of the world, and fall through portals of your own making.
Sandstone and Box Canyon are homages, laid out from memory at our own scale (a block is 40 of the old units, so a player stands 1.8 blocks tall) and built only of our own blocks and colours: Sandstone after a famous desert town map of a classic tactical shooter (its long lane through double doors past a pit to one site, mid down to its doors with a box and a catwalk beside it, tunnels round to the other site with its platform, doors and window), Box Canyon after a famous box canyon of a console classic (two bases at the ends, each with a lower level, ramps and a roof teleporter to the far side of the field, rocky hills, boulders and a creek between). Neither uses those games' names, art or text; in deathmatch the sites are just landmarks.
Fivefold is a team map, on the vote when six people are here: Blue and Orange HQs at either end, mirrored, and five lanes between them. Three run through the streets (by a canal and warehouses, down an avenue between arcades, through a market and a park), one over the rooftops of four tower blocks by a bridge, a catwalk and a glass bridge, with trams sliding across beside them, and one underground, through tunnels and a great cavern in a shell of stone you can dig through, past a river and over a lava pocket. The Spindle in the middle joins all five, and lifts, stairwells, a sinkhole and pads join the layers in each half. Each HQ has its haven, where its side spawns, with a teleporter to each lane. For now it plays as a team deathmatch: the Totem each side will defend, and the Wards and Guardians along each lane, are coming soon, and their sites are kept clear and ringed in each side’s paint. Which lane each player is in is a view in the database of where everyone is: their cell joined with the lanes’ zones.
What fold does here
Each match's map is grown from its seed and stored as ground. Every block anyone breaks, every crater, every wall and every tunnel is an edit, and each cell shows its newest edit, or the ground. That's a fold view, so taking an edit back brings back whatever it replaced, even if the world's changed nearby since.
The page never works out what to draw. Fold keeps a view of every block side you can see: each block's six sides, less those facing a block you can't see through, so glass shows what's behind it. The page loads the arena a chunk at a time, near where you are, and hears each commit's changes only for the chunks it holds: who holds which is a view too.
A rocket that bursts is one transaction: its crater's removals, what they were made of paid to the shooter, and the damage it did. A crater heals two minutes later by retracting those removals. Since a cell shows its newest edit, healing only brings back cells still empty from the blast: anything built there since stays. If the shooter undid the crater first, there's nothing left to heal. Steel takes three blasts, its dents a view per cell that a heal takes back too.
Pickups are rows. Taking one is a claim, and a view counts claims per item and refuses a second: two players touching an item in the same tick each commit a claim, and fold keeps the first. Your health, armor, weapons and ammo are views over your claims and the damage you've taken; mega health drains back to 100 by the clock, like an ammo tank run backwards; and a hit splits between armor and health in one row. When you die, your weapons drop where you fell in the same commit as your death, and your inventory, which only counts lives that haven't ended, empties in it too: nothing doubled, nothing lost.
Quad damage and moon boots are rows with an expiry. A rocket's damage and its crater are read through a join of your rockets with your live effects, so a rocket fired under quad hits four times as hard and digs half again as wide.
Portals are 3 × 3 doorways, nudged a block or two to fit a flat face, kept as a table keyed by player and colour, so firing blue again moves your blue. Whether one is open is a view over its backing blocks: blast the wall and the portal closes in that same commit. A link is a join of your blue and your orange. Jump pads, and teleporters linked in pairs of a colour, are views over the blocks as well: blast a pad's ceiling or a teleporter and the map's routes change for everyone.
Breaking the world pays: a crater, a tunnel, bullets wearing a block through, a chain of walls or a few blows of your blade each pay whoever broke the blocks in what they were made of. Recipes are rows, and a craft is one transaction: a row of crafts, joined with its recipe into what it spent, and what it makes in your hands. Your materials are a view, gains less what your crafts cost, and fold won't let it go below zero, so two crafts can't spend the same stone; other rules refuse a second craft before the first is done, a craft with no room for what it makes (armour past 100, a full backpack) and any recipe for the Beam. The Beam, the rarest weapon, bores a tunnel through everything but bedrock: hundreds of blocks across a dozen chunks, one transaction, a block in every two paid to its carrier.
The revolver, the carbine and the shotgun are shot by the server. Your page says where you fired and which way; the server draws the spread with its own random numbers, rewinds everyone to where you saw them, walks each bullet through the blocks, and sends every page the same rays to draw. Hold the right button to aim down the sights (the carbine has a 3× scope): your page says the shot was aimed, and the server draws a tighter cone. The top quarter of a body is its head, for double damage. Magazines and spare rounds are views over your pickups, reloads and rounds fired, and fold refuses a gun fired faster than it cycles or with nothing in it.
Bullets wear blocks down. What each material can take is a small fold table: glass shatters at a hit, wood takes six and lets bullets through, stone takes fifteen, and steel never breaks but sends a bullet back once at the reflected angle. The wear on a block is a view: every hit a row, summed per cell and joined with the block standing there and its material's row. Fold refuses a block left standing once it's worn through, so the hit that breaks it carries the break in the same commit, along with what the block pays its breaker. A crater healing or a rewind grenade takes the wear with it, and the block comes back whole.
You move as in Source: friction, acceleration and air strafing as its game movement has them, so holding jump hops without losing speed and strafing while you turn gains it; Shift (or C) ducks, and ducking mid-jump lifts your feet over a higher ledge. Shift while running is a slide that keeps your speed into the next hop; Shift with a move key in the air is a dash, once a jump. Double-tap a move key for a boost dash: the server keeps its cooldown and its window itself, in the in-memory database, and checks every shot against whether you were dashing when the shooter saw you. It runs on a fixed tick of 66.67 a second, drawn between ticks, so it's the same at any frame rate. Run along a wall in the air and you stick to it for a moment; jump to kick off it, to another wall and back.
The wall gun's walls are explosive. A rocket, a bullet, a blade, the Beam, a mine, fire or lava sets one off, and its blast primes the walls within reach, which flash their fuse and go off a ring later, then theirs, a commit a ring: a view joins the live blasts' reach with the foam still standing, as fluids step. Every kill in the chain is whoever started it.
Hold TAB for the scoreboard: everyone here by score, with frags, deaths, revenges, their run, ping and time in the arena, you and your nemesis marked; its fourth tab, Settings, keeps the volume, gore, the field of view, the mouse and how aiming works in your browser. Press Enter to chat. Each line is a row of an events table; fold refuses one over 160 characters, and a view of each player's latest four lines refuses a fourth inside five seconds.
A line starting with a slash is a command, answered to you alone: /help lists them. /rtv rocks the vote: each player's is a row keyed by the match and the player, so asking twice changes nothing, and a view counts them; once more than half the match has, it ends early into the vote. A rule refuses one in a match's first minute or once the vote is open. /nominate puts a map forward, and the vote's cards say who nominated it. /request asks for a feature: requests, upvotes and their statuses are rows in the league's store, and fold refuses a fourth request in an hour, a duplicate of an open one, and an upvote of your own. They're listed, most wanted first, at /blocks/requests.
Weapons are things in the world, carried as in Halo: two in hand and four in a backpack. Each weapon is a row, with its own magazine and where it is: on the ground, or in someone's slot. Picking one up is a take of the drop that put it there, and a view refuses a second take of one drop, so two players grabbing the same gun in the same moment can't both get it; other views refuse a fifth weapon in the backpack, a second weapon in a slot, a second Beam anywhere, and a take from out of reach. Throw your gun and it lands with its rounds still in it; die and both your hands drop where you fell, so every kill feeds weapons to someone. You start each life with the rocket launcher and the revolver. TAB is an inventory you drag weapons around in, each move one transaction.
The Beam corrupts whoever holds it drawn: a point of health a second, straight past armour, written as damage you did to yourself, so dying of it gives nobody a frag. Holster it and the drain stops, though you're still marked for as long as you carry it. Your health pulses violet and a violet vignette creeps in the longer you hold it.
The Beam is meant to be too strong: a quarter second's charge, no cooldown and no ammunition. What it costs is being seen and being thrown: every shot kicks you hard backwards, half again in the air. The old 20-second rule is still there, a rule over the gap between your two latest Beam shots, now with a threshold of nothing. Whoever carries it is marked for everyone, with a beacon above them that shows through walls. A mark dart marks someone for ten seconds, and the Beam's carrier is marked the same way: one view takes the marks table and adds whoever holds the Beam. A frag on someone marked counts double on the board, through a view that joins each death with the marks live at that moment, and with the Beam’s carrier, whose mark lasts exactly as long as they carry it.
A proximity mine is a row. Only its owner sees it, and anyone else within two blocks, faintly. In the in-memory database, a view joins each mine's surroundings with the cell each player stands in, and each tick sets off whatever that join holds, as one small blast. A bullet disarms one. A cloak takes you out of the view that decides who hears whose movement, so for fifteen seconds nobody's page knows where you are, except as a shimmer up close; firing or getting hurt shows you for a second. A decoy replays your last few seconds of movement, copied from the history of your poses, as a ghost the pages draw like a player, until a bullet pops it.
Press F to swing a blade, whatever you hold. Like the guns, the server decides whom it lands on, rewinding everyone to where you saw them, and a swing is a row: fold refuses one sooner than 0.6 s after your last, by a view of the gap between your two latest. The blow and its damage are one transaction, and a kill is a death with its own cause, so bounties, grudges, revenge and domination, all views over deaths, count it as they count any frag.
The wall gun and the rewind grenade are thrown (and a mine, lobbed with G, flies the same way): hold to aim, and the page draws the arc from the same numbers the server will fly, a chord a tick through the same walk of the blocks, ending in what it'll do where it lands. Hold longer to throw farther. A wall is nine blocks wide and five tall, and the carbine holds sixty rounds. Coming back from a death you're shielded for two and a half seconds, a shimmer everyone sees, until it runs out or you fire. A mine sticks to the first block it meets; it's used, and its row written, in one transaction as it lands, so a throw into the sky costs nothing.
Grudges keep themselves. A view counts kills by killer and victim, and another keeps the last two hours of them, rows that slide out by retraction. Your nemesis is a top one per victim over those counts: whoever has killed you most, at least three times, a tie going to whoever did it last. Kill them back and it's revenge, three frags on the board: the kill commits with a revenge row, which is also the reset, since the grudge only counts their kills after your latest revenge. A revenge on a marked player counts three, not six: the board takes the best multiplier per death, a max. Four kills in a row with none back is dominating: a view keeps the latest kill each way between two players, and a streak is the kills newer than the latest one back. Your nemesis glows red through walls with a skull over them, on your page alone.
Water, lava and fire are a layer of their own over the blocks, a row per cell: water and lava by how full, in eighths, and fire over the wood it burns. What happens when they meet is a table. Lava touching water becomes basalt; wood touching lava or fire catches; fire touching water goes out. A view joins each cell of the layer's neighbours with what's there, and each pair with the table, so making lava melt glass is a row, not code.
Fold has no loops, so water doesn't settle in one go: like a sheet settling its formulas, it moves a step every quarter second, each a commit. Which cells can move is a view, the frontier: water over an empty or half-full cell, or beside a lower one. A lake at rest has none, so a step touches only what's moving, and nothing at all is written while the world is still. The inspector shows each step: water · 41 cells moved · basalt ×1.
Water only moves. Its volume is a sum view, and fold refuses a step that leaves more than the world began with. What falls into the void is gone, and springs top their lakes back up while there's less. When a crater fills with water and heals, the water in the blocks coming back is carried up out of them, not deleted. Fire spreads a ring a second, cooler each ring, never more than four from the lava or 240 cells at once, and burnt wood heals like a crater. Lava burns whoever stands in it, and a kill counts for whoever's rocket let it out.
Where everyone is lives in a second fold database, in memory: the last half second of every player's moves, a few seconds of trail, which part of the arena each is in, and which chunks each page holds, all sliding windows. A hit is checked against where the shooter saw their target, and a move is relayed to those nearby.
Why it shows off fold
The rotation is rows and views in a store of its own, the league. A vote is a row keyed by the vote and the voter, so changing your mind is an upsert and only your latest vote counts; a view counts them per map, and a rule refuses a vote for the map just played, or one cast outside the vote's window: a view joins each vote with its intermission and fold refuses the commit if that view holds anything. Each match's end is one transaction: the match, everyone's result and the vote that opens. Careers (matches, wins, frags, deaths) and the latest matches are views over those rows, kept current as each match ends, and the TAB board's Career tab reads them. Each match itself is a fresh world in memory, grown on a thread of its own ahead of time, so craters, walls and drained aqueducts never outlast it.
The meshing, the economy, pickups, healing, portals, quad damage, bullet wear, magazines, marks and bounties are all definitions, not code that runs on each change. So is what water, lava and fire do to each other: reactions are rows, conservation is a rule, and each step of flow is incremental, reading and writing only the frontier. So are rivalries: they emerge from a kill-matrix view and a top one per victim, and no app code tracks them; the app only reads your nemesis at the moment you kill, to record a revenge. Fold keeps them current and works out what changed itself, so a crater costs a few dozen rows and a tunnel a few thousand, not a rescan of the arena.
Worth trying
- Wait out a match (or reach thirty), then vote: watch the counts move as others change their minds, and press \ to see each vote commit, or be refused.
- On Sandstone, hold the long lane from the pit, or look down mid from the top through the gap in the doors.
- On Box Canyon, take your base's roof teleporter across the field, and snipe from the perches up the pads by the cliffs.
- On the Carousel, time your step onto a turning bridge as it docks with your terrace.
- On Fivefold, ride a tram across the gap between two towers, or take the lift up the Spindle from the cavern under the middle to the roofs.
- Open the arena in two browsers: what one does, the other sees as it commits.
- Step on a jump pad looking where you want to go, and steer in the air. A pad on a pad throws twice as high.
- Fire a rocket at your feet as you jump. Find moon boots and do it again.
- Blast a bridge, wait two minutes, and watch it grow back. Throw a rewind grenade to bring it back at once.
- With the portal gun, put a blue portal in the floor and an orange one in a wall, then fall in.
- Chip a stone wall with your blade (F) until it breaks, then hold B and craft a revolver from it: press \ to watch the craft commit, or be refused.
- Hold the carbine on a wooden wall and watch the cracks spread until it gives; shoot a steel pillar at an angle and see the round come back.
- Take the Beam, and see how long you last with everyone hunting your beacon.
- On the Aqueduct, break the glass main over someone on the bridge, and watch it pour down through the levels.
- Break the Aqueduct's lava conduit over the wooden upper bridge, and get across before it burns.
- Get killed three times by the same player, then hunt the skull: revenge counts triple.
- Cloak, sneak up, and fire: you show for a second. Throw a mine onto a wall by a pickup and wait.
- Hold to aim a rewind grenade until the arc reaches a crater across the arena, and let go.
- Run out of rounds next to someone and press F: three blows and they're clobbered.
- Type /rtv in the chat bar with friends in the match: more than half of you, and the vote opens early.
- Type /request and an idea, then see it on the request list; /upvote someone else's.
- Press \ to watch each commit's sources and views come and go in the inspector.
- Open the lab: the character, what it holds and the view down its sights, with every animation played on demand, slowed down or paused, outside the fight.
Still app code
Growing the arena, the item models (and the weapon in your hand, drawn in a pass of its own) and the synthesised, spatial sound (all made in the page, nothing downloaded), how water falls and spreads in a step (which cells may, the frontier says), drawing the faces fold hands over and the far side of a portal, walking, jumping and aiming, the spread and the bullets' paths, flying everything through the blocks and the portals, carving a crater's shape, how hard a blast pushes, and getting moves from one page to the others over a WebSocket.
Press \ in the app to watch fold's commits as they happen.