Hacker News new | ask | show | jobs
by johmar 2491 days ago
The alpha is using three.js, which is fast enough for what alpha is doing. For the beta, I wrote my own renderer based on OGL that uses a lot of optimizations for specific things that you can't easily do with Three.js (batch draw calls of dynamic objects for example).

Largely, the alpha was made in 3 months, after which I added features on and off. I did not work in it full time, but released two major updates from 2017-2018. (Items, and UI overhaul).

In late 2018 I started working on the beta. Entirely new codebase, too much technical debt in the alpha. Many technologies were improved, such as moving from a json based net protocol to a much faster and smaller binary net protocol, moving away from mongodb and threejs.

The result is now a much more stable and future proof engine. We even have a world editor that also runs in the browser and communicates with the server. You can edit the world with multiple people at the same time with the changes reflecting in real time for the players.

1 comments

Awesome work! What is your technology stack now?
Thanks! The entire project essentially lives in a series of horizontally scaling node.js processes doing all kinds of things. The worlds are divided into chunks which helps significantly with culling network traffic and distributing the load.

For the database I moved from MongoDB to Postgres. When I started doing Hordes I had very little DB experience and thought that using MongoDB might be a good idea since I am using node. Turns out that Postgres is much better at helping with transactional logic for an MMORPG. Inventory management for example can be constructed almost entirely with constraints, ensuring that the data always makes sense (no two items occupying one slot, that kind of thing).

The alpha used vanillajs for the entire front end, but with the beta I started using Svelte and Rollup, which I would highly recommend for almost anything.

Yup, Svelte is hot and Postgres is always a good decision! Thank you for the details, really interesting project!

Once I built a CSS based browser MMO myself as a challenge. I used Clojurescript and React on the front end and Clojure with a simple in memory key-value storage. My solution was basically a turn based architecture, but many turns happened in a sec, so it was semi-realtime.

CSS means I didnt use webgl, just pseudo 3D with divs and transforms. Field of view was small, but playable. :D

Postgres is my fav. I've never heard of Svelte but just looked it up and might have to give it a whirl.

Anyways great information and great work on your MMO! If you ever need more Dev staff I'd love to help!

Hey, thanks! Feel free to check by on our discord channel - https://discord.gg/hordes :)