← appaday

Light cycles: a flat grid, then the headset, then shared rooms

You ride a light cycle across a grid, and it leaves a solid wall behind it. You can only turn left or right. Hit any wall, your own included, or the rail at the edge, and you are out. The last rider still moving wins. This one went through three versions in four days. On 25 January it was a flat canvas game against bots. The same day it became a WebXR arena for the Quest 2. On 28 January it got a lobby where you type a room name, and other people who type the same name ride in the same arena.

First-person view low over a dark blue grid that glows cyan. The player's own cyan wall runs straight ahead from the bottom of the screen. At the left, yellow and pink walls cut across; at the right, a green and a cyan wall run along the horizon. Behind them stands a skyline of cyan wireframe pyramids and tall boxes. A small tilted minimap floats at the top centre, showing the riders' paths as coloured lines, and a frame counter reads 62 FPS.
Two seconds into a solo round against four bots on Normal, in a desktop browser. The minimap at the top is the one that hangs in front of your eyes in the headset.

Three ways to steer

On the desktop it is the arrow keys or A and D, with Shift for a boost that cuts each step to 72% of its usual time. In the headset the left stick turns: flick it left or right, and it has to come back to the centre before it turns again, so one flick is always one turn. The right trigger boosts, X and Y change the difficulty, A restarts. On a phone there are two big arrow buttons at the bottom left and a boost button at the bottom right, and the day the rooms went in those buttons were made larger for small screens.

The arena is 140 by 140 cells of 60 cm, closed in by glowing rails. On 28 January it also got a horizon: a ring of wireframe pyramids and towers around the arena, so you can tell which way you are facing.

Bots, and rooms

Alone, you ride against bots. Easy brings three, Normal four, Hard five, Insane six. Each one looks a few cells ahead before it turns, from 6 cells on Easy to 15 on Insane, and the harder ones more often head straight for you. When a round ends the camera rises over the grid and a scoreboard ranks everyone by the length of their wall.

The camera has risen above the arena and looks down at the grid at an angle. Coloured walls in pink, yellow, orange, cyan and green zigzag across it. Red text over the grid reads: GAME OVER, Winner: Enemy 1, SCOREBOARD, 1. Enemy 1: 84, 2. Enemy 2: 84, 3. Enemy 3: 84, 4. Enemy 4: 84, all four marked with an asterisk, then 5. YOU: 83, and below: [A] Restart, [X/Y] Change Difficulty. The wireframe skyline surrounds the arena.
Three seconds later: the cyan rider, steered by a script that only turned left twice, hit a wall. The four bots were still riding, at 84 cells each.

Rooms run on a small PartyKit server of 405 lines. Each client moves its own rider and reports every new cell. The server keeps one grid with every wall in the room, checks each move against it, and decides who dies. If two riders swap cells within 200 milliseconds it counts as a head-on crash, and both go. Every 50 milliseconds it sends all positions to everyone. A rider that has not reported for five seconds is removed. There are six starting spots, each new rider gets the first colour nobody is using, and the end screen says who won or that it was a tie.

The same first-person view over the cyan grid, but the sky above the horizon is completely black: no skyline, no minimap. The player's cyan wall runs straight ahead, and far off to the right a white, yellow and pink wall stretch along the horizon. The help box at the top left reads: Light Cycles, Desktop: arrow keys or A/D turn, Shift boost, P pause, R restart, [ / ] difficulty.
The version from 25 January, the one that is online: the same grid, without the skyline and the minimap, and without rooms.
built
25 January 2026, the flat and the VR version; the rooms on 28 January, eight commits between 01:34 and 18:25, on a Mac
runs on
desktop browsers, phones (it installs as an app on iOS) and the Quest browser
made with
A-Frame 1.5 and WebXR, one 2,187-line HTML file for the game, a PartyKit server in TypeScript for the rooms
before that
a 568-line version on a flat 2D canvas, against bots with the same difficulty levels

Still rough

The rooms are not online. The version at the link above is the one from 25 January, so it has no lobby, no skyline and no minimap, and the screenshots of the newer one were taken from the repository, run locally. The server trusts the clients to report their own position, which is fine among friends and nothing more. The end screen has a quirk: in the round above it named Enemy 1 the winner while four bots were still alive and tied. And in Chrome's phone emulation, in landscape, the camera sits so close that the grid fills the screen. This was built on a Mac, so there is no record of it being played on this laptop, and this post has no quotes.