Hacker News new | ask | show | jobs
by MasterScrat 1513 days ago
It reminds me: a decade ago, I had the idea of porting Baldur's Gate 2 to the web: http://lumakey.net/labs/battleground/demo1/

I initially played with EMSCRIPTEN as well, starting from GemRB, an open-source reimplementation of the engine. But that was boring, as I wasn't really getting any sense of how things were working under the hood.

So I started reverse-engineering the various file formats (a website called IESDP had most things figured out already) and converting them to PNG, JSON and other web formats. At that point I only knew PHP which made it a pain to work with binary data. Then, I started rebuilding the game from scratch: pathfinding, streaming huge maps using small tiles, animations...

10 years later, there's still that one single room and single character that were implemented, but it was still fun times.

2 comments

That was literally how I first approached this problem of getting Zelda Classic quests to work in the browser. I had initially failed to port it with Emscripten, so I reverse engineered the quest binary format and started painstakingly recreating the engine in JavaScript [1].

I got pretty far but there would have been years and years of tweaks to get it just right, so I gave up.

[1] https://hoten.cc/quest-maker/play/

Baldur's Gate 2 (demo) in WebAssembly. You're welcome!

https://personal-1094.web.app/gemrb.html

Amazing! did you make this? any more details anywhere? what is the license?