Live Website: silenthillmuseum.org
The Silent Hill Museum is a digital archive of Silent Hill assets.
The museum reads the original binary files directly in your browser and delivers them to you in an interactive exhibit.
The binary format is documented in Kaitai Struct, a powerful declarative binary parsing language. This serves as both a human-readable outline and also a rigorous specification that can be compiled to a parser in many different languages. See the ksy file for the Silent Hill 2 mdl format.
In particular, the ksy files are compiled to a JavaScript parser, which allows the JavaScript Kaitai Struct runtime to facilitate the parsing of assets in their original form. Additionally, we emit TypeScript .d.ts type definitions from the Kaitai source, allowing this project to be written in TypeScript. The beauty of this is that it enables an IDE to know the structure of the binary files.
Once everything is parsed, we use Three.js to draw assets to the screen.
To get started locally, you'll need a working installation of pnpm. To view assets, you also need to have Silent Hill 2 Restless Dreams (PC) fully extracted.
- Clone the repository and enter the folder.
git clone https://github.com/laura-a-n-n/silent-hill-museum.git
cd silent-hill-museum-
Copy the
datafolder from Silent Hill 2 into thepublicdirectory of this repository. -
Install the dependencies.
pnpm install- Run the setup script.
pnpm setup- Start the development server.
pnpm devThis should be enough to get started. See the package.json for more scripts.
If you'd like to edit the Kaitai Struct (ksy) files, you need a copy of the Kaitai Struct compiler.
In order to emit TypeScript .d.ts files from the ksy source, this repository relies on a fork of the Kaitai Struct compiler that has not been merged to main. Huge thanks to aquach for making this project possible.
- Install the Kaitai Struct compiler. It should be globally available as the
kaitai-struct-compilercommand.
To make sure this step worked, try pnpm kaitai all in the root directory of this folder.
-
Clone this fork of aquach's TypeScript compiler for Kaitai Struct, as a sub-directory of this repository. It is the same feature, I just merged it with latest.
-
Follow these instructions for building Kaitai Struct from source in the newly cloned folder, except checkout
feature/typescript, not theserializationbranch.
To test that everything worked, try pnpm kaitai js in the root folder of this repository.
Now whenever changes are made to the ksy file, run pnpm kaitai js && kaitai ts before committing.





