Half-Life Engine JS

Logo for HL Engine JS

Half-Life is one of my favorite games. Not only because it was revolutionary when it was released, but also because I have spent countless hours creating maps and mods for it. In retrospect, I think being involved in the Half-Life modding community taught me a lot about game design and programming. Out of nostalgia, I recently dug into old maps I had designed. While they still can run with the original game, I wondered if they could also run in the browser as a way to preserve them forever.

I have discovered Xash3D, a C++ game engine aiming to provide compatibility with Half-Life Engine (called "GoldSrc"). Some time ago, the engine was ported to JavaScript using Emscripten. While I wish a more modern web port using WebAssembly of the engine was available, the existing JavaScript port was already able to run my maps.

So I have created hl-engine-js, a JavaScript module that wraps a cleaned-up version of the web port of the Xash3D engine and provides a simple API to load and run Half-Life maps.

I have used it to host online old maps I have created, such as Half-Life Parpaing or a virtual tour of a nuclear power plant. Give them a try!