SF Laser Taxi is a multiplayer browser game where you drive a robotaxi around a small San Francisco and shoot lasers at the other players. There's no install and no account: pick a name and you're in.
Controls are WASD to drive, Space to fire and Shift to boost. Your score is how many taxis you've tagged since you last died, and the high score board keeps each name's best single life. There are 5 bots always driving around, so there's something to shoot at even when nobody else is online.
How it's built:
- The frontend is Babylon.js with plain ES modules, so there's no bundler and no build step. The textures, models and sky are CC0 assets from Poly Haven.
- The backend is one Node WebSocket server whose only dependency is ws. It sends position snapshots 20 times a second and owns HP, kills and deaths.
- Each client moves its own car and reports its own laser hits. The server rejects a hit if there was no recent shot, the target is too far away, or the target just respawned. That's enough for a game with no stakes, but it isn't cheat-proof.
- The city is generated from a seeded RNG, so every client gets the same buildings and laser collisions agree without the server ever sending a map.
- Phones get a lighter three.js renderer, because the HD scene was too heavy for mobile Safari. Both renderers use the same protocol, so phone and desktop players are in the same game.
The code is MIT licensed: https://github.com/bortpro/WaymoWorld
A tip: on desktop, type "starman" while you're driving. Your taxi turns into a flying roadster. Z and X fire the left and right thrusters, both together lift you, and you can land on rooftops.
I'd like to hear how the netcode feels on your connection, and what you'd add next.