DEV Community

Cover image for I found Shahzor on the Internet Archive and brought it back to the browser
youxufkhan
youxufkhan

Posted on Originally published at shahzor.yousufkhan.uk AI-assisted

I found Shahzor on the Internet Archive and brought it back to the browser

I searched Google for Shahzor, found two download links, and both were dead.

If you grew up playing PC games in Pakistan in the late 90s or early 2000s, you might remember it. Shahzor was one of those games you could find at local CD shops. It was popular here, and I wanted to play it again.

That turned into a search through the Internet Archive. Thankfully, Ahmad and Fatima's YouTube channel had uploaded a copy there. Someone had kept it available long enough for me to find it, years after the other links had stopped working.

I've now made it playable in a browser. You can open it on a desktop, click Play Shahzor, and get back to the game.

Play Shahzor

Shahzor is a Pakistani DOS beat 'em up by BrainSoft from 1998 and 1999. You play as Captain Umer, fighting your way through Karachi. The programming and art are credited to Zia ul haq Ansari and Farrukh Amrohvi.

I wanted other Pakistani millennials to be able to open a link and spend a little time with a game they remembered from the CD shop days. Finding the files was only part of that. Getting them running conveniently on a current computer was the next job.

The browser version uses js-dos 8.5.4, with DOSBox compiled to WebAssembly. The original DOS executables run inside that emulator, along with the game's graphics and sound files.

The loading path is fairly small.

  1. The page waits for the player to click Play Shahzor, which also gives the browser permission to start audio.
  2. js-dos loads a bundle containing the game files, a DOSBox configuration, and a launcher.
  3. DOSBox mounts the bundle as its C: drive and runs the launcher.

The launcher opens the original menu and starts the game when you choose Start. After the game ends, it returns you to the menu.

Some of the interesting work was in the details of that launcher. The original game expects to be started through its batch file. Launching the executables directly produces a fatal error. The browser launcher preserves the arguments the original batch file passes, so the menu and game start correctly.

The picture needed some attention too. Shahzor uses 320×200 VGA graphics, which would have appeared on a 4:3 CRT. The browser frame keeps that 4:3 shape. DOSBox handles the hardware emulation, including the Sound Blaster audio the game expects.

Keyboard shortcuts are another small reminder that this game comes from a different computing setup. Ctrl and Alt are game controls, and a browser or operating system can also use those keys. The page has a fullscreen button, with keyboard locking where the browser supports it.

The site itself is plain HTML, CSS, and JavaScript, hosted on Cloudflare Workers with static assets. The emulator runs on the player's computer, so serving the game is mostly a matter of delivering the files.

I added a new illustrated landing page, a larger game frame, and sharing buttons so people can send it to friends who remember it. The original title screen and menu are still inside the game.

The copy I found is the 1999 demo, with two levels. After the second level, it shows the credits and returns to the menu. That's the version available on the site.

If you want to play, use a desktop keyboard. Arrow keys move, Shift punches, and Ctrl jumps. Ctrl + Alt does a jump kick. The title screen takes two keypresses before the menu appears, which is how the original behaves.

I'm grateful to Ahmad and Fatima's channel for uploading the files, and to the people behind js-dos and DOSBox for making this possible. The game itself is BrainSoft's work.

I'd love to hear from people who remember buying or playing Shahzor. Did you get your copy from a CD shop too? And which other Pakistani games from that time do you still remember?

Play it in your browser

Top comments (0)