Show HN: 2D RPG base game client recreated in modern HTML5 game engine with AI

When I was much younger, I used to play a Korean MMORPG called Helbreath, and I also hosted a bunch of private servers for it. I eventually moved on, but I always loved the game’s aesthetics, its 2D nature, and its atmosphere. That may just be nostalgia talking.

The community maintained private server and client, which to my knowledge were based on leaked official files, were written in fairly archaic C++. If you’re interested in the original sources, I’ve included the main client and server files, Client.cpp and Server.cpp, in the reference folder. I always felt that if the project was rewritten in something more modern and better structured, a lot more could be done with it. But rewriting an MMORPG client and server from scratch is not exactly the kind of thing you do on a whim. That said, there was a guy who got pretty far with a C# rewrite and an XNA-based client, though that project is now also discontinued.

Now that the AI has become quite capable, I decided to see how far I could get by hooking up original assets in a modern HTML5 game engine. I wanted HTML5 because I figured a nearly 30 year old 2D game should run just fine in a browser. I ended up choosing Phaser 3 for a few reasons. Mainly, it's 2D only, free, HTML5 first (JS/TS), and code-first, which mattered because I wanted good Cursor integration for AI assistance. Another thing I liked was its integration with React, which let me build the UI using browser technologies and render the UI at native resolution on top of the WebGL canvas, rather than building the UI inside the game engine itself, which runs at 1024x576 resolution. The original game ran at 640x480.

After about 1.5 months of talking to AI on evenings and weekends, and roughly $200 worth of Cursor usage later, I finished hooking up the original assets in a modern game engine that seems to run just fine in a browser.

By "base game client", I mean that it's not fully hooked up in terms of how the full (MMO)RPG should function, but it does include all the original assets and core mechanics needed to provide a solid foundation if you want to build your own 2D (MMO)RPG on top of it. Continuing to build with AI should also work just fine, since this is how I managed to get that far. The asset library is quite rich, if you ask me, but there is one caveat: these assets are not in the public domain. They are still the property of someone, or some entity, that inherited the IP from the original developer, which is no longer in business. You can read more about that on the GitHub page.

URL: github.com
2 comments

I like the idea of recreating older MMORPG clients in modern browser tech. Running a full game client through WebGL + JS is surprisingly viable now compared to a decade ago.

Did you run into performance issues with rendering or networking once multiple entities are active on screen? I'm curious how far a browser-based client can realistically scale for MMO-style environments.

So far I haven't ran into performance issues, but this version doesn't have networking, so I only tried spawning lots of monsters in a small map, so they have to recalculate their movement quite often + each monster runs an AI loop for its actions, didn't drop an FPS in my M1 Mac that I'm using for development, which is quite beefy in terms of computing power. Anyone can retry this simulation. Open the demo, load "Shop" map for example, which is small, and spawn lots of monsters, see how it performs on your hardware.

One thing to note that, at least in terms of rendering, monsters are far simpler to draw, since they originate from a single sprite. Players, at least in in the multiplayer setting, have each equipment sprite drawn separately, which means that having lots of player characters in a single screen can have higher performance penalty, but this option cannot be simulated with the current version.