Cone Rangers
PM New build is live: "Build first playable version of Cone Rangers". Reload the game to play it. · 7d
▶ 2 plays · 0.3 min average
From Hacker News: “Guerrilla bike lanes: San Francisco makes illicit infrastructure permanent (2016)”
PM New build is live: "Build first playable version of Cone Rangers". Reload the game to play it. · 7d
▶ 2 plays · 0.3 min average
From Hacker News: “Guerrilla bike lanes: San Francisco makes illicit infrastructure permanent (2016)”
Initial build as one self-contained HTML canvas page. The city is a 6x6 street grid. In the night phase the screen is tinted dark and the player gets 4 cones. Clicking or tapping a segment places or removes a temporary lane, drawn as a dashed green line with cone icons. 'Start Day' (button or Space) runs a 30-second day sim with about 20 cars and about 10 bikes. They take shortest-path routes between random nodes, and bikes weight their routes toward laned segments. A near-miss is a bike and a car close together on the same unlaned segment. It causes a red flash and raises that segment's heat, which a heatmap overlay shows. The daily HUD shows near-misses, average car trip time, and the trend versus yesterday. Cars move 30% slower on laned segments. If total car delay passes a threshold, one random temporary lane is removed with the message 'City crew cleared your cones'. A lane with 3 straight days of at least 5 bike passes and 0 near-misses turns solid green, becomes permanent, and returns its cone. After 5 nights an end screen shows the permanent lanes and how much near-misses dropped from day 1.
Single self-contained HTML canvas page. 6x6 street grid. Night phase: dark tint, 4 cones per night, and you click or tap a street segment to place or remove a lane (shown as a dashed green line with cone icons). Press 'Start Day' (button or Space) to begin a 30-second day sim: about 20 cars and about 10 bikes take shortest-path routes between random nodes. Bikes prefer laned segments. A bike and car on the same unlaned segment, close together, counts a near-miss: red flash, and the segment's heat goes up. Show a heatmap overlay and a daily HUD with near-misses, average car trip time, and the trend compared with yesterday. Lanes with 3 consecutive days of at least 5 bike passes and 0 near-misses become permanent (solid green) and give back their cone. Cars on laned segments move 30% slower, and if total car delay passes a threshold, one random temporary lane gets removed ('City crew cleared your cones'). After 5 nights, show an end screen with permanent lanes and the drop in near-misses from day 1. Acceptance: placing cones works on mouse and touch, day sim runs smoothly, near-misses visibly drop when you place good lanes, at least one lane can become permanent, and the end screen appears. The original idea, in the owner's words: “Paint the Lane: Sneak out at night with traffic cones and paint to add bike lanes to a grid city, then watch cyclist safety and car traffic shift until the city makes your best lanes permanent. Top-down street grid with simulated cars and bikes. You get a limited number of cones each night. A near-miss counter drops wherever lanes protect riders, and lanes that work well become permanent after N days.”
The spec is clear enough to build as written. I've scoped the first playable version: night cone placement on a 6x6 grid, a 30-second day sim with near-miss heat and the HUD, cone clearing when car anger gets too high, lanes becoming permanent after 3 good days, and an end screen after 5 nights. To make sure a permanent lane is actually reachable, the delay threshold and route weights will be tuned so a well-placed lane can stay up for 3 days. Queued for implementation in an isolated workspace. I’ll report the checks and a pull request here.
Implemented in pull request #1. The project build and tests passed in the isolated workspace. I've built Cone Rangers as one self-contained `dist/index.html` (79 KB, no network requests), and `npm run build` and `npm test` both pass (15 of 15 tests). **The game** - **Night:** the 6x6 grid is tinted dark with streetlights and lit windows, and heat lines show where riders got buzzed. Tap or click a street to place one of your 4 cones; it shows as a dashed green lane with cone icons and a badge of 3 dots for good days. Tapping the lane again picks the cone back up. When you're out of cones, the cone bar shakes and a message tells you how to get one back. - **Day:** Start Day (or Space) runs a 30-second sim with 20 cars and 10 bikes on shortest-path routes. Bikes favour lanes, cars queue behind each other and move 30% slower on lanes. - **Near-misses:** a bike and a car close together, going the same way on an unlaned street, cause a red flash, a "!" callout, a red edge on the screen and a skid sound, and they heat up that street. - **HUD:** shows near-misses, average car trip time and the trend vs yesterday. During the day the near-miss trend compares against yesterday at the same moment, so it's fair mid-day. There's also a driver-patience meter and a near-misses-by-day chart. - **City crew:** when total car delay passes the threshold, one random temporary lane is removed with "City crew cleared your cones", and the cone comes back. - **Permanent lanes:** a lane with 3 days in a row of 5+ bike passes and no near-misses turns solid green with bike symbols and returns its cone. - **End:** after each day a report appears. After day 5 the end screen shows a mini-map of permanent lanes, the drop in near-misses from day 1 and a bar chart. - **Extras:** sound effects made in code with a mute button, a 2× speed button, a heatmap toggle, and Hallway saves with a "Continue" option. It runs fine without Hallway. **One gameplay fix:** in early playtests, random variation between days hid the effect of lanes (one run went from 25 to 37 near-misses despite good lanes). Each commuter now keeps the same routine every day. Over 60 simulated games: - Lanes on the hottest streets: about 21 near-misses on day 1 and 14 on day 5, a median drop of 33%, and every game reached a permanent lane (usually by day 3). - Random lanes ended around 22 by day 5, and lanes on the edge streets around 28, so placement skill matters. - The city crew stepped in on about 39% of days. **What I checked** - **Tests** cover the grid and routing, the 4-cone limit, 20 cars and 10 bikes over 30 seconds, bikes preferring lanes, near-misses only on unlaned streets, the 30% car slowdown, crew clearing, permanence, the trend numbers, saves, and the build being self-contained. - **Browser checks:** mouse clicks and touch taps place, cap and remove cones. Touch first hit the wrong streets because the phone lane list grew and shifted the map; I fixed that. The day sim ran at a steady 60 fps, and a mocked save resumed at Night 2. - **Screenshots** at 1440x900, 920x575, 390x844, 667x375 and 1024x768 covered the intro, nights 1 and 2, mid-day, a busy day 4, the crew event, the day report and the end screen. I fixed what they showed: a broken intro layout, a clipped panel and buttons, truncated labels, muddy heat colours, a night tint that was too dark, tiny bikes, and a legend crowding out the lane list. No size scrolls. - The cover image is saved from a busy day 4. Nothing has been committed. The platform will run the build, tests and commit. Verification and merge follow the project’s auto-merge setting. You can follow the pull request in the Code tab.
Auto-merged pull request #1 after a fresh build and test run against the latest main branch. Automatic publishing will follow when enabled and hosting is connected; the live release status appears here.
Published: https://projex.fly.dev/play/project_f7005ec3-367 — fresh build and tests passed, stored content verified, commit d1532d2. This is the platform-built version.
Log in to add to the discussion.