Reviving Shockwave: Making 90s Web Games Playable In Modern Browsers
In the mid-to-late ’90s, the Internet began revolutionizing PC game distribution. Previously, publishing PC games required producing a costly master disc and then cheaply replicating it. Such high upfront costs incentivized developers to make their games as flawless as possible before release as producing patches was rare and expensive. It also encouraged them to pursue deals with publishers to guarantee sufficient distribution to recoup costs. With the Internet however, developers could publish games directly and offer patches at marginal cost.
This frictionless distribution enabled the advent of web games: games built to be played directly in a user’s web browser. Since early web browsers were meant for document viewing and ill-suited for interactive multimedia experiences, users needed to install browser plugins to play web games.
Playing Shockwave games in 2024
In 2024, I decided I wanted to experience some of these early web games. I had to decide between:
- Playing natively on Windows in compatibility mode
- Emulating Windows 9x in a x86 virtual machine
- Emulating Shockwave
For the first two options, there is a risk of viruses.
Challenges
- Preservation status - Not all web games have been preserved.
- While the Internet Archive archived many .dcr files, some pages had plugin detection and refused to serve
- Xtras - many Shockwave games require Xtras, which were essentially Internet-downloaded DLLs which had to be compiled for each operating system and downloaded along with the game
Explored Solutions
v86: Emulating x86 in a web browser
There is an x86 emulator called v86 which compiles to WebAssembly and provides decent performance of entire OSes like Windows 95 or Windows 98. The emulator demo allowed me to load virtual floppy disks into the emulator, so I used an ancient Windows utility to split up game files into 1.44mb pieces on the host and recombine them in guest. In the end I was able to demonstrate that at least the earliest LEGO Shockwave games can be played in browser at the game’s target FPS.
I’ve figured out how to build a 2GB image of Windows 95 given a hard disk image and boot disk and load that into v86. Now I want to load the game files into the guest.
Things I’m trying to figure out:
- Efficiently loading game files - the emulator supports asynchronous loading of hard disks so I am trying to create a second hard disk which will contain all the Shockwave games. However when I load the emulator with both hard drives, Windows 95 fails to boot because of memory issues. I am wondering if this a bug in the emulator or Windows 95 can’t handle two large drives.
- Determining min specs for Shockwave games - I’d like to use Windows 95 which I assume is less computationally expensive for the simpler games and Windows 98/Windows 2000 only as needed. However I’m not sure how to efficiently check the minimum Shockwave version of a game for 30+ games or check the minimum OS for a version of Shockwave.
- I want to pass information from v86 to the emulator right as after it loads so it knows which game to launch.
DirPlayer - Shockwave on Web Again
Difficulties:
- Lack of easily accessible information - much of it is not publicly available digitally
- From talking with a Shockwave developer, one of the most efficient ways to learn was cracking open a Shockwave game and learning from there
- Various targets - there are several versions of Director which vary in behavior
- Behavior is undocumented or inaccurately documented
- File format is designed for performance, not serialization. Data was often dumped straight from memory into files. This likely also means there are considerable security issues running Shockwave, all the more reason to focus efforts on web emulation inside that trusted sandbox