Comment by davorb
I turned Leisure Suit Larry 1 (the 1987 Sierra AGI version) into a shared co-op game that runs in the browser. Everyone who opens the page is in the same running game.Source: https://github.com/davorb/lsl-experiment
The original game logic runs unmodified on a Node server. There is an AGI bytecode interpreter in ts. Every room, puzzle and line of text is therefore the real game, not a re-creation.
The server owns all state. The wire protocol is plain JSON over a WebSocket, validated with zod on both ends. The server sends a full render frame (sprites, status line, text) only when the frame differs from the last one it sent. It sends the picture only when the picture changes. It sends sound events once when the game starts them, so a late joiner or a reload gets the current music.
Browser is a thin renderer. It uses PixiJS and plays the original PCjr music, which I synthesize with WebAudio.
The game has exactly one Larry. The first player to join is Larry. Everyone else walks their own character around the same room. Typing a command takes over Larry (you swap places), so the role gets passed around. When Larry changes rooms, everyone arrives with him. Score, cash and inventory are shared, because it is one game.
It is one global game. It resets every two hours, with a chat warning five minutes before. A game with nobody in it for ten minutes is discarded.
Graphics are the original art with a light HD-2D treatment: depth sorting by the original priority layers, lighting, tilt-shift and a vignette. Click-to-walk uses pathfinding over the original barrier data.
Some known problems are:
- The one-Larry model gets chaotic when several people type commands at once.
- Dialogs block the whole game for everyone until someone dismisses them.
- Nothing persists. The game resets every two hours.
- Players can easily grief other players.
The game data is not in the repo. An extractor reads it from an original install, so self-hosting needs your own copy. It is easy to find if you just google.