Captain Claw, Back in a Browser Tab
writingCaptain Claw was my favourite game as a kid. It is a pirate platformer Monolith made in 1997: you play a cat captain with a sword and a pistol, fighting your way through fourteen levels of soldiers and treasure.
I turned it into a browser game. You can play it at captainclaw.lol: no download, no install, open the page and press Play. Then I added online multiplayer, so you can play it with your friends.
How I did it
I did not rebuild the game from scratch. OpenClaw is an open-source remake of the Captain Claw engine in C++, by pjasicek, that plays the original levels from the original game files. I compiled it to WebAssembly with Emscripten, which turns C++ into something a browser can run, and packed the game files in with it.
Getting it to start was the quick part. Making it feel like the original took longer. The copy of the game files I started from had no sound effects in it, so I merged the original sounds back in. I got the sound and the MIDI music playing in the browser, fixed the screen flashing black between scenes, and moved the controls to WASD so nothing clashes with browser shortcuts. A few friends played the early builds, and the bugs they found, like slippery ledges and enemies attacking too fast, got fixed one by one. It all runs from a Mac I use as a server at home.



Adding multiplayer
The original is single player, and I wanted to play it with my friends. Now one person creates a room and gets a six-character code, everyone else types in the code, and you all land in the same level. You see each other's Claw running around in real time with names above their heads, and enemies one of you takes out are gone for everyone. A room holds up to eight players.
Behind it is a small Node.js server that passes each player's position to the others twenty times a second, and the game smooths the movement in between. The multiplayer menu is built into the game itself, in the same gold lettering as the original menus.









Play it at captainclaw.lol.
