Show HN: I built an indie, browser-based MMORPG (alpha.reconquer.online)
Here are the major open source technologies that I use:
Blender - 3D modeling software for creating the overall environment and every game object. I've gotten a lot of CC and Public Domain assets from https://poly.pizza
GLTF - I export assets from blender to the GLTF asset format
JSON - I write a JSON config for every game object that describes things like its name, its interactions, its collisions, etc.
Node.js exporter - I iterate over the environment and every asset to create a scene hierarchy. I use gltf-transform for processing all GLTF files, compressing them, removing redundancies, etc.
Node.js server - Uses express and socket.io to process game state updates. It keeps track of every client's game state and issues delta's at each game tick (currently 600ms). The client can send interactions with different objects. The server validates those and updates the game state accordingly.
HTML/CSS/JavaScript/Three.js client - I use regular web technologies for the UI elements and three.js for the 3D rending on the browser. The client is responsible for rending the world state and providing the client with different interactions. All code is written in JavaScript which means less context switching. Performance seems to be good enough, and I figure I can always optimize the server code in C++ if necessary.
I am currently running two cheap shared instances but based on my testing, they can likely support about 200 users each. This is a low-poly browser based game so it should be compatible across many devices. The data a user needs to download to play, including all 3d assets, is approximately 2 MB, even though there are hundreds of assets.
Overall, it's been a fun project. Web development and open source software have progressed to the point that this is no longer an incredibly difficult feat. I feel like development is going pretty well and in a year or so there will be plenty of good content to play.
164 comments
[ 3.0 ms ] story [ 238 ms ] threadI downscaled a lot of them in blender. They are quite good for how easy it is to get them and work with them.
I used 600ms because that's a reasonable rate for walking one square and it's also what is used in the largest similar game Old School Runescape. Even at 600ms ticks, I had to do some tricks to make it feel smoother. For example, I calculate the average latency variation in the client and delay updates so that they fall more closely to exactly 600ms apart. I think 50ms could work if the players are geolocated, otherwise I think that's pushing it. You would need to figure out a very intelligient way to deal with lag at the start.
Seems to be related to this: https://bugzilla.mozilla.org/show_bug.cgi?id=1365492
Always good to see that Firefox has a severe bug and no plans to address it.
As suggested in the bug report comments, toggling webgl.disable-angle to true in about:config lets the page load correctly. I'm not thrilled with this, mostly because I failed to find any documentation of the behavior, or existence, of that setting.
It is possible to request the high performance GPU in javascript, but it is up to the OS to grant it, or not. In windows one has to explicitely choose for each app, which GPU to use. Which is stupid right now, as I would like the big GPU on my laptop only for some things like web games and the automatic dedection does not work, so I can either switch it on - or off.
But it does NOT change GPUs based on required performance. At least not for me.
This seems somewhat at odds with the fact that changing a Firefox setting addresses the issue, though I don't know how it addresses the issue.
It seems most of this is work in progress and not really a high priority as people with a discrete GPU in a laptop are a minority.
I assume the browser could request the GPU, because my normal games also can. But the only way to get chrome and firefox use the real GPU, was an explicit setting somewhat hidden in the windows UI.
And as a standard this might sense, as my GPU really draws battery and gets loud, which I do not want for random websites. But for some websites/apps I would grant that permission. But consensus seems to be that users cannot be burdened with even more permission dialogs, so here we are.
And you can also writing C++ (complies wasm) in a browser.
Software bloat and general lack of performance continue to be among the chief complaints end users have.
Not saying you're wrong, of course. The guy who passes the finish line badly wins the race, not the guy who fails the race goodly or the guy who doesn't even start running perfectly.
And if one ignores the mmo part and thinks of other show HNs, one can assume it's 300 lines of js in the main app and 2.4 gigabytes of js dependencies including 10 separate tracking frameworks...
Most of these projects exist in c++ already, they literally exist as the majority of MMOs, not sure what blather to justify your own bad architecture decisions you're on about.
Node.js is fine on the server and JS is my preferred language. That said I switched from VSCode to vim a few years back because my laptop couldn't handle all the Electron apps I had running. Now the only browser instance I run is the actual browser and I'll never go back to Electron apps.
Awesome work, good luck!
Will have to check it out more on my laptop.
One thing the pinch zoom is super funky on iOS. It zoomed me really far out and I couldn’t really get it back.
My plan is to develop content for the next year or so, make sure it's pretty stable, and then see what happens from there. There could be a membership option that unlocks more of the world or more playtime or something. I figure I need to make an actually good game though first before I think about monetizing it.
https://youtu.be/hWTFG3J1CP8?si=01CPwHIFDMoENWFe
Is there a way to interact or chat on mobile?
People have said mobile works but I honestly haven't tried it yet. All my devices are too old to work with webgl.
Congrats on launching though, looks like a fun project.
I built Genfanad (http://genfanad.com/) as a browser based game with similar inspirations to yours a few years ago. A lot of the technologies you mentioned are very similar. It's surprising how easy getting something up and running is these days!
We ended up shutting down a few months ago as I couldn't figure out how to take it to profitability. Do you have plans for that, or is it just a fun side project?
A bit more serious, I haven't seen many attempts at just making a donation bar showing how much it costs to keep it running per month? Let people donate until the bar is filled, when it overflows it goes to next month. Very visible on login screen. In this bar ofcourse include your salary for keeping it running after developement is doneish.
Maybe stretch-goals for donation to make new functions?
And please use Ko-fi for donations, much friendlier and less cutting into your profits :-)
I would want, in exchange for that, that the game be fairly stable, that there be things to do such as Quests or Tasks, and that I could enjoy the game for maybe an hour a week, maybe 2 if I'm in a rut.
Coding is the fun part, but it's less than 5% of actually launching and making a successful product. If you don't think you want to spend most of your time not coding, don't try to make it a business!
Marketing is more important than making something. You will get a small boost from things like this (I was always too embarrassed to post here!), but it's an endless pit of time and money! To do it right, I've heard all sorts of numbers, but a good rule of thumb is every dollar/hour you put to making your game, put a dollar/hour to marketing it as well.
From a technical perspective, your stack is fine. You want to make sure you host all your assets behind cloudflare/s3 or similar, the $5 server is fine for gameplay but if you also try to make it send all the stuff, it's gonna die. (As evidenced today!)
Most of my other experience and advice is about how to run a team and set budgets and goals. If you're going about it as a hobby (and that's probably the best way to go!) then just keep doing what you're doing, write some blogs and foster a community instead.
I think, like you said, a good strategy will be to keep it fun and hobby-like as long as possible. I can definitely see the business-side of it sucking all my time and energy.
I think doing some educational materials will be a worthwhile way to market and gain interest. Community building with something like a Discord server will also help. Competing as a business with something like Jagex is 100x harder than just making a good game.
Unfortunately, the #1 lesson that I've learned is that while nostalgia gets some reception, there's a reason no big companies are really making MMOs, even at a smaller scale. There's just not that large a viable market for them.
I could do a little analysis, but Genfanad is probably hard to sell because... what's the name mean? It seems rather niche and artsy. I'm not sure what's going on from the site. Reconquest is quite obvious from the name and going into the screen, it seems... woah, maybe I have a lot of agency here? Then you look at comments and read of people getting ganked without moderator interference. That's likely why it took off.
Many games are fun to build and play, but they'll never ever be hits and have to be fixed from a structural level. Names are easy to fix. Steam is also very much hit and miss; if you don't have a certain level of wishlists, it's just going to be a waste of time doing any marketing.
For me building cloud infrastructure is easy, the choices and tradeoffs are obvious to me. To all my colleagues in the past 16 years it's been some sort of magic. They are smart people, mostly, but lack the experience and make 'obivous' mistakes all the time.
There's a good video on designing games to be sold. The base idea is to treat it like a search algorithm. You can be an amazing fisherman but you can't catch many fish where there's no fish. https://youtube.com/watch?v=o5K0uqhxgsE
Different than industrial CDNs but my new go-to for small-to-mid and indie sites.
[0] https://bunny.net