Show HN: I built an indie, browser-based MMORPG

304 points by onemandevteam 1 year, 7 months ago on hackernews | 137 comments

brigadier132 | 1 year, 7 months ago

the attack animations are pretty hilarious

[OP] onemandevteam | 1 year, 7 months ago

I got a lot of the animations from https://www.mixamo.com/

I downscaled a lot of them in blender. They are quite good for how easy it is to get them and work with them.

How can I make my character move? Arrows, WASD, clicking.. not doing anything.

[OP] onemandevteam | 1 year, 7 months ago

You can click where you want him to move. Right click lets you do special interactions.
It works a lot better on mobile.

[OP] onemandevteam | 1 year, 7 months ago

Yeah, one odd mechanic is that other players can block you. Since everyone spawns at the same point, it's possible some people are getting boxed in.
600 ms tick rate and can only support 200 users per instance? Can you elaborate on all that? I was working on a browser game that i’d like to have be realtime and responsive but it seems maybe a tall order from what I’ve been told but I don’t really understand why. Like would 30 fps and maybe something like 50 ms tick rate for 4 players in the same game instance be feasible in browser? Thanks ahead of time!

[OP] onemandevteam | 1 year, 7 months ago

The 200 users are on a $5 per month server. I'm guessing a better server could support more, but there are scaling challenges if everyone wants to be in the exact same location. In that case, you're sending 200 updates to 200 people each tick which gets slow since it scales O(n^2).

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.

Do you think gafferongames algorithms would be good enough or need like a scheme for basically every game mechanic that would need to be synchronized?

[OP] onemandevteam | 1 year, 7 months ago

That's above my paygrade I think. All my logic is rule based at the 600ms tick level. If you pick a berry, each tick take one step closer, then do a pick animation, then add the berry to your inventory and remove it from the bush. The client is responsible for tweening between those ticks. It might be a whole different thing to try physics/fine movements etc.

thaumasiotes | 1 year, 7 months ago

Shows a blank white page in Firefox.

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.

[OP] onemandevteam | 1 year, 7 months ago

Strange. I'm running it okay in FF. Any other info you can share?

thaumasiotes | 1 year, 7 months ago

Javascript console shows many failures related to WebGL. I assume my laptop's integrated Intel graphics chip doesn't implement any of the features WebGL wants. The laptop also has an (also-integrated) NVidia graphics card, but while Firefox recognizes its presence, it won't use 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.

[OP] onemandevteam | 1 year, 7 months ago

Thank you. I'll add a todo item to add a webgl detector and error handling
"The laptop also has an (also-integrated) NVidia graphics card, but while Firefox recognizes its presence, it won't use it."

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.

thaumasiotes | 1 year, 7 months ago

> 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.

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.

Well, the one thing I did not found while investigating this, was clear information.

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.

This is interesting lmao.

And you can also writing C++ (complies wasm) in a browser.

LightHugger | 1 year, 7 months ago

using js for an mmo, a performance critical application, sounds like a big difficulty.

[OP] onemandevteam | 1 year, 7 months ago

It hasn't been so far. I can always write C++ plugins to nodejs on the server. The most intensive code is the part where I calculate deltas each tick. Eventually that could be optimized. For now, the calculations for each tick are taking an average of 1.2ms, which is good for having a 600ms tick time. Client side performance is fine with low poly graphics.

OsrsNeedsf2P | 1 year, 7 months ago

On one hand, js isn't known for its performance. On the other hand, OP actually has a product. I know who I'd invest in.

byearthithatius | 1 year, 7 months ago

Bingo. These dudes never code anything because they get analysis paralysis wanting everything to be super optimized Rust/C++. Meanwhile 90% of the apps making real money run literally whatever language they started with and have been able to scale fine.
FSVO fine.

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.

I’m curious why you chose an incorrect reply about JS performance on the thread of a very minimal web-based MMO to talk about software bloat.
No one can see the MMO at the moment, it's been HN-ed. So no idea how minimal it is.

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...

What are you talking about? C++ powers trillions of dollars of market value. Rust is in the billions and growing. All of those apps start with dudes that have a vision to create a solid technical foundation for making bank.

brigadier132 | 1 year, 7 months ago

There have been some pretty impressive things created with threejs

byearthithatius | 1 year, 7 months ago

There have been lots of impressive things created with just plain JS. Google had an entire world simulated coded in just JS. I think their Christmas world with all those games are also pure JS (given their obsession with internal JS frameworks like Boq and shit)
And then there is wasm nowdays avaiable.

byearthithatius | 1 year, 7 months ago

A LOT of apps use JavaScript, even performance critical ones. VSCode the most popular IDE in the entire world is JS running w/ Electron.

worksonmine | 1 year, 7 months ago

> VSCode the most popular IDE in the entire world is JS running w/ Electron

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.

Similar story here. After using VSCode as my daily driver for 2 months (during which I never once touched Emacs) I switched back to Emacs because VSCode's responses to my keystrokes felt mushier and because I like to use dinky little mini PCs with no fans (because I'm much more easily annoyed by fan noises than most people and I prefer not to become bound to using Macs).
It's a wrong comparison. A high-level language is usually good enough for a desktop app because there's not much ongoing computation happening. It's only input processing and small, infrequent updates to the view in response to the input (not to mention rendering of the DOM and low level input processing is done by the browser's C++ compiled code). A video game on the other hand has to do computations all the time at a very high frequency.
JS is quite performant, and a 600ms tick is nowhere near “performance critical”.
What's funny is this is an homage to RuneScape, a longtime Java based MMO.
Nothing wrong with JS here. MMOs are I/O bound which Node is great at.
A very neat trick I heard is that you can basically use multiple socket connections to simulate UDP like behavior. Just rotate through each connection when sending data. Anyone tried this?

[OP] onemandevteam | 1 year, 7 months ago

That's neat. So far I just am dealing with potentially bad latency with different smoothing and delaying operations. I can't really afford dropped packets anyway I think for real time-style performance that would be great though.

brigadier132 | 1 year, 7 months ago

I think this kind of hack is pretty unnecessary given web transport is supported by 2/3 major browsers

candleknight | 1 year, 7 months ago

the combat is intense, it really felt like i was slowly getting pickaxed to death

thomasfromcdnjs | 1 year, 7 months ago

If anyone wants to test with better latency, there is a second world on the home screen.

Awesome work, good luck!

[OP] onemandevteam | 1 year, 7 months ago

Spread the load and go to world 2: https://alpha.reconquer.online/#w2
I don't know much about MMORPG but this looks heavily inspired by Runescape, no mention of that?

[OP] onemandevteam | 1 year, 7 months ago

It definitely is. Although I think their development decisions have been really bad and so there's openings for competition.
Interesting! Clicked around a bit on my phone. Had fun slapping a chicken to death with someone else.

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.

renewiltord | 1 year, 7 months ago

Haha that was fun. Very old school feeling when the internet was new.
What is the gameplay like, and what are your plans for it?

[OP] onemandevteam | 1 year, 7 months ago

It's a very self directed game play. You explore the world, defeat monsters, fight other players, solve puzzles, and complete quests. Some people might focus on leveling up skills, others might just want to do the quests. You can talk to other players or team up to defeat monsters. It's similar in principle to OSRS or Runescape Classic.

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.

Just reached the playtime limit, a bit sad but will be back tomorrow <3

fitsumbelay | 1 year, 7 months ago

this looks cool as f*ck. thought it was aframe at first. very cool
Logged in, saw a guy spitting out racist words, attacked the shit out of him with two other strangers, we've beat racism, 10/10 game.
I stole a dead guy's pickaxe and got ganked by like 4 goblins. And then someone stole my pickaxe.
It was "your" pickaxe, congrats now we've got communism in the game, damn this game progresses fast

weird-eye-issue | 1 year, 7 months ago

Wouldn't communism be "our"?
no, it should be the State's pickaxe, that the central committee might entrust to you so that you work your part in the 5-year plan

BossingAround | 1 year, 7 months ago

I don't know why you're being downvoted, that's exactly how it'd work under Stalinist communist regime.
This comment chain reminds me of the early 2010s

https://youtu.be/hWTFG3J1CP8?si=01CPwHIFDMoENWFe

Stalinism is one specific variety of communism, in my experience most leftists today are critical of the overly centralized and rigid type of state structures that may have been present in historically socialist oriented nations.

robertlagrant | 1 year, 7 months ago

It would be the state's pickaxe, but we'd call it "our" as that's the official nomenclature.

noSyncCloud | 1 year, 7 months ago

groan There's no helping you people. Communism is a society without a state, classes, or money. There's no such thing as a "Communist government".

plasticchris | 1 year, 7 months ago

Serious question: How is that different from anarchy?
Communism doesn't imply anarchy as it is primarily an economic system rather than a form of government.
how is a communist society organized, absent of any state? Does it self-correct, like free market is supposed to self-correct, according to capitalism?

tonetegeatinst | 1 year, 7 months ago

Racism solved, world hunger and poverty next.

calvinmorrison | 1 year, 7 months ago

cyan: selling lobbies 100gp
Only have been on in for like 3 seconds before crashing, the game definitely gave me early RuneScape vibes. Tbt to RuneScape in the school library in like 2006
Congratulations! Happy to hear you describe making an indie mmo as fun and not that hard these days :)

Is there a way to interact or chat on mobile?

[OP] onemandevteam | 1 year, 7 months ago

It's definitely not bang your head against a wall frustrating. Just a lot of different things to do to make it work.

People have said mobile works but I honestly haven't tried it yet. All my devices are too old to work with webgl.

Actually playing doesn't work well on mobile, because you can only "left-click" and can't view inventory, chat, or do much of anything other than attack the cow and pickup the leftover entrails. Ah well, still a neat idea.

adambartlett | 1 year, 7 months ago

This looks fantastic
Surely this was heavily inspired by Runescape? The click to move (including cursor animation on click), camera angles and graphics, chat text colour and position etc. all give me huge Runescape (Old School Runescape) vibes.

Congrats on launching though, looks like a fun project.

I think so, one of the other comments OP mentions OSRS having the same tick rate.
Then this game will be easy. My heart is trained to beat every 0.6 seconds thanks to OSRS.
It would be better if you made this an actual app to run locally on devices and used something like wasi to get it cross platform.
I should have added this is still a cool project, and very impressive. I was just adding that it would be another level better if it was a native app.

[OP] onemandevteam | 1 year, 7 months ago

Looks like there is some sort of DOS attack =(

makeitshine | 1 year, 7 months ago

Was about to message and ask if this was region locked to North America or something.
Yeah, the "posted on the front page of HN" DDOS :S

[OP] onemandevteam | 1 year, 7 months ago

Strange. Both servers at the system level stopped accepting TCP packets. It might've been my cloud provider trying to mitigate an attack. I guess I shouldn'tve killed the server. Putting it back up now.
Most likely no DOS, just us HNers :)

[OP] onemandevteam | 1 year, 7 months ago

Turned out to be my email service blocking me for "suspicious activity". Error logs weren't helpful for some reason. I didn't realize my server would crash if it couldn't do an initial connection to the email server.

poochkoishi728 | 1 year, 7 months ago

How long did it take you to make this? Looks cool, watched someone fight a chicken before the server update.

[OP] onemandevteam | 1 year, 7 months ago

Sorry about that. I think it's back up. I'm wondering if it hit a TCP limit for the cloud provider or something. My first commit was 15 months ago, but I spent some time doing 3d modeling before that, and lots of other failed projects that were somewhat related before that.

averageRoyalty | 1 year, 7 months ago

Getting a 502 here. Welcome to scale, good luck with the fires! Keen to check it out in a couple of days.

[OP] onemandevteam | 1 year, 7 months ago

Adrenaline rush from firefighting. Just changed some TCP settings. Let's see how she does now.
Huh, this is fun!

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?

[OP] onemandevteam | 1 year, 7 months ago

Nice job with Genfanad! That looked like a really neat game. I don't have a good plan for profitability other than try to keep my expenses as low as possible and see if I can find some way to scrape by in a year or two.
IknowIknow! You could have some lets call it "lootboxes" that people could pay real money for to open. And in them they would find items to use in the game! :-)

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 think presenting costs as a rough “per user/player” calculation might be more effective than presenting just the total cost. That way people are reminded of their own personal resource usage, which seems like a more manageable/tangible number, and it can be accompanied by the broader stats since of course not everyone voluntarily pays (and some people pay more than their fair share).

BizarroLand | 1 year, 7 months ago

Back of the napkin math, but if the servers cost $0.25/month/player and the owner would like to make $5,000/month (very conservative but sure, why not) and there is a 20% "future emergency fund" in place, when the game has 5,000 players then each player would need to contribute on average $1.50/month, or $18/year.

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.

Exactly, and I think that sort of request for contribution is much more likely to make people feel inclined to contribute than some abstract goal of getting $10k/mo in donations or whatever.

[OP] onemandevteam | 1 year, 7 months ago

Do you have any suggestions? Your game seemed very popular. Anything you wished you had focused more on?
Set your expectations accordingly.

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.

[OP] onemandevteam | 1 year, 7 months ago

Thank you!

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.

To be clear, it's not Jagex you're competing with. It's the 20+ other indie MMO solo developers who are trying to do the same thing as you, including but not limited to: RetroMMO, New Eden, Valorbound, Carth, Eterspire, Omuri, Shadefell, Cookie Dragon, Cinis, Cinderstone, Legends of Etherell, Legendarium, Mirage Realms, Aether Story, Ethyrial, and so on. There's more that come and go every month.

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 don't think marketing is too hard honestly. It's just that many people make a game that doesn't look amazing on the surface. The hits come with a different structure. If you can't hook someone in the first 3 seconds, it's going to be very difficult. That means name, screenshots, etc too.

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.

Then I think you underestimate your marketing prowess; because these are not obvious things to everyone.

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.

They're all learnable skills. But I guess my point is if it's taking 95% of the effort, it's probably the wrong path. But when you've already put the effort into that one game, it's hard to see yourself marketing a different game.

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

FWIW I've had great experiences recently with Bunny [0] to deploy content to a very affordable, very configurable CDN. Integration is also dead simple (you deploy normally to your regular site and then just replace hostname in all URLs with the CDN hostname, it handles the rest automatically)

Different than industrial CDNs but my new go-to for small-to-mid and indie sites.

[0] https://bunny.net

VariousPrograms | 1 year, 7 months ago

Cool stuff! I had fun with Genfanad for a while. Keep it simple so the RSC fans don’t riot :)
The server got the HN hug of death

[OP] onemandevteam | 1 year, 7 months ago

Giving up for today. I think I reached a SMTP email limit and that's causing failures elsewhere related to TCP connections. I'll look into it tomorrow. Thank you for all the feedback!

There were 5000+ successful logins! I think I need a better SMTP email provider and a way to make sure a failure doesn't crash everything else.

albertgoeswoof | 1 year, 7 months ago

Pro tip: have 2-3 providers and make sure you can quickly switch between them
And that's why many indie projects fail before they start because people think they have to do something like this and build for scale before launch day :P
Half of all projects fail because they start with making a load balancer. The other half of projects fail because they become successful and don't have one.

[OP] onemandevteam | 1 year, 7 months ago

Chick and egg problem with email providers. Prove you're not spam by having actual customers, then we'll allow you to send more than 100 emails.
So you're the reason I had to put numbers in my username, eh?

[OP] onemandevteam | 1 year, 7 months ago

Decided to disable email in code and try again. Not too optimistic but we'll see. Signups will fail, logins might still work if everything is cached.

[OP] onemandevteam | 1 year, 7 months ago

Root cause of the issues: Trying to connect to an SMTP service to send OTP's that began to block me after "suspicious activity".

[OP] onemandevteam | 1 year, 7 months ago

Just switched to an actual transactional email service so it might actually work for a bit. (oops, still need to get verified to send more than 100...)

albertgoeswoof | 1 year, 7 months ago

I own https://mailpace.com - if you sign up and set up your DKIM records you can send right away. Drop a note to support@mailpace.com once you're up and we'll remove your rate limits.

[OP] onemandevteam | 1 year, 7 months ago

Thank you for the offer on the short notice! I ended up getting verified with the other service and am happy to enter have a little stability now. I will check out mailpace though!

mrsilencedogood | 1 year, 7 months ago

Love the hustle!!! Consider this a successful HN launch my dude. There are far worse fates than the hug of death.
And it’s down.
502 Bad Gateway

CodeCompost | 1 year, 7 months ago

Level 502 already? Who knew the Gateway class would be so easy /s
have u tried using UDP over webrtc ? https://geckos.io/
I'm working right now on upstreaming WebRTC DataChannel support to Quake III[1]. Performance is great, but it was a huge pain to get working. WebRTC is insanely complex. It's also annoying that it can't be used from web workers or service workers.

I hope someday WebTransport gets peer-to-peer support that is easier to use than WebRTC. And Safari support.

[1] https://github.com/ioquake/ioq3/pull/673

>Performance is great, but it was a huge pain to get working. WebRTC is insanely complex. It's also annoying that it can't be used from web workers or service workers.

this webrtc/udp question is something that gets asked super frequently. If you have been able to make this work, it might be worth commercializing it

The thought had crossed my mind honestly, but I have no idea who would pay for it.
This is amazing and a project I always thought about doing! Inspired by MUD servers back in the day that were open source and community maintained. Super happy to see this.
For those of us who missed the party, can we have a video and screenies please please please? :D

Also, a very long time ago I remember seeing the early genesis of minecraft emerging on iirc https://forums.tigsource.com/. The community there is still vibrant, so if not already there then that is a good place to show your game and get solid feedback and encouragement :)

I remember AI Dungeon and character.ai taking off on HN. TIGS is still one of the best game communities around, even if the people have changed. Devlog section has some amazing things too, like Return of the Obra Dinn and Disco Elysium.
Or Minecraft.
Is there a waiting list for when you get back online? It's giving me a 502.
Looks like it's been hugged to death.
HTTP/1.1 502 Bad Gateway Server: nginx/1.18.0 (Ubuntu)
Bad gateway. ಥ _ ಥ
Love the classic RuneScape inspiration :)
This is great. It reminds me of something that was released circa 2000-2005, when there were more experimental fun things online.

[OP] onemandevteam | 1 year, 7 months ago

We need more "fun" places on the internet. It feels so dreary and manufactured most of the time.
Agreed 1000%.
based
best 30 minutes of nostalgia. Game Design wise, I would suggest disabling attacking while walking, otherwise people can't even really run away
These kinds of things are just so fun. This is what the internet is about. Bravo OP.

mikejulietbravo | 1 year, 7 months ago

This is such a wild undertaking. I love it