19 ms·
Show HN: I built an indie, browser-based MMORPG
I've been working on an MMORPG that is now in alpha as a solo developer.
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 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.
- metadat 2y agoHow can I make my character move? Arrows, WASD, clicking.. not doing anything.
- onemandevteam 2y agoYou can click where you want him to move. Right click lets you do special interactions.
- metadat 2y agoIt works a lot better on mobile.
- onemandevteam 2y agoYeah, 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.
- deleted 2y ago[deleted]
- brigadier132 2y agothe attack animations are pretty hilarious
- onemandevteam 2y agoI got a lot of the animations from https://www.mixamo.com/ 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.
- Madmallard 2y ago600 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!
- onemandevteam 2y agoThe 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.
- Madmallard 2y agoDo you think gafferongames algorithms would be good enough or need like a scheme for basically every game mechanic that would need to be synchronized?
- onemandevteam 2y agoThat'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.
- juststartguide 2y ago
- thaumasiotes 2y agoShows a blank white page in Firefox. Seems to be related to this: https://bugzilla.mozilla.org/show_bug.cgi?id=1365492 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.
- onemandevteam 2y agoStrange. I'm running it okay in FF. Any other info you can share?
- thaumasiotes 2y agoJavascript 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.
- onemandevteam 2y agoThank you. I'll add a todo item to add a webgl detector and error handling
- lukan 2y ago"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.
- mrbirddev 2y agoThis is interesting lmao. And you can also writing C++ (complies wasm) in a browser.
- LightHugger 2y agousing js for an mmo, a performance critical application, sounds like a big difficulty.
- onemandevteam 2y agoIt 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 2y agoOn 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 2y agoBingo. 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.
- Dalewyn 2y agoFSVO 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.
- hipadev23 2y agoI’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.
- deadbabe 2y agoA 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?
- onemandevteam 2y agoThat'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 2y agoI think this kind of hack is pretty unnecessary given web transport is supported by 2/3 major browsers
- candleknight 2y agothe combat is intense, it really felt like i was slowly getting pickaxed to death
- thomasfromcdnjs 2y agoIf anyone wants to test with better latency, there is a second world on the home screen. Awesome work, good luck!
- onemandevteam 2y agoSpread the load and go to world 2: https://alpha.reconquer.online/#w2 https://alpha.reconquer.online/#w2
- 0x00cl 2y agoI don't know much about MMORPG but this looks heavily inspired by Runescape, no mention of that?
- onemandevteam 2y agoIt definitely is. Although I think their development decisions have been really bad and so there's openings for competition.
- nickzelei 2y agoInteresting! 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.
- wetpaws 2y ago[dead]
- renewiltord 2y agoHaha that was fun. Very old school feeling when the internet was new.
- mepian 2y agoWhat is the gameplay like, and what are your plans for it?
- onemandevteam 2y agoIt'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.
- wayvey 2y agoJust reached the playtime limit, a bit sad but will be back tomorrow <3
- wayvey 2y agoJust out of curiosity what is the playtime limit for? I'm slowly starting to understand how to progress but I feel like I don't get much done in 30 minutes. Having fun though and it's taking me back to the runescape days of my childhood :)
- fitsumbelay 2y agothis looks cool as f*ck. thought it was aframe at first. very cool
- changexd 2y agoLogged 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.
- nvy 2y agoI stole a dead guy's pickaxe and got ganked by like 4 goblins. And then someone stole my pickaxe.
- changexd 2y agoIt was "your" pickaxe, congrats now we've got communism in the game, damn this game progresses fast
- weird-eye-issue 2y agoWouldn't communism be "our"?
- baud147258 2y agono, 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 2y agoI don't know why you're being downvoted, that's exactly how it'd work under Stalinist communist regime.
- ffsm8 2y agoThis comment chain reminds me of the early 2010s https://youtu.be/hWTFG3J1CP8?si=01CPwHIFDMoENWFe https://youtu.be/hWTFG3J1CP8?si=01CPwHIFDMoENWFe
- cephelapod 2y ago
- karl_gluck 2y agoCongratulations! 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?
- onemandevteam 2y agoIt'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.
- metadat 2y agoActually 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 2y agoThis looks fantastic
- Thorentis 2y agoSurely 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.
- sirjaz 2y agoIt 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.
- sirjaz 2y agoI 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.
- onemandevteam 2y agoLooks like there is some sort of DOS attack =(
- makeitshine 2y agoWas about to message and ask if this was region locked to North America or something.
- slater 2y agoYeah, the "posted on the front page of HN" DDOS :S
- onemandevteam 2y agoStrange. 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.
- nottorp 2y agoMost likely no DOS, just us HNers :)
- onemandevteam 2y agoTurned 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.
- rizky05 2y ago[dead]
- poochkoishi728 2y agoHow long did it take you to make this? Looks cool, watched someone fight a chicken before the server update.
- onemandevteam 2y agoSorry 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 2y agoGetting a 502 here. Welcome to scale, good luck with the fires! Keen to check it out in a couple of days.
- onemandevteam 2y agoAdrenaline rush from firefighting. Just changed some TCP settings. Let's see how she does now.
- akrotkov 2y agoHuh, this is fun! I built Genfanad (http://genfanad.com/ 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?
- onemandevteam 2y agoNice 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.
- Moru 2y agoIknowIknow! 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 :-)
- freeAgent 2y agoI 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).
- 2y ago
- VariousPrograms 2y agoCool stuff! I had fun with Genfanad for a while. Keep it simple so the RSC fans don’t riot :)
- samanator 2y agoThe server got the HN hug of death
- onemandevteam 2y agoGiving 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 2y agoPro tip: have 2-3 providers and make sure you can quickly switch between them
- dewey 2y agoAnd 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
- johnfn 2y agoHalf 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.
- onemandevteam 2y agoChick 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.
- d3w3y 2y agoSo you're the reason I had to put numbers in my username, eh?
- dewey 2y agoI know that pain of trying to get a very generic username all too well!
- wiseowise 2y agoAnd it’s down.
- Turboblack 2y ago502 Bad Gateway
- CodeCompost 2y agoLevel 502 already? Who knew the Gateway class would be so easy /s
- sandGorgon 2y agohave u tried using UDP over webrtc ? https://geckos.io/ https://geckos.io/
- modeless 2y agoI'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 https://github.com/ioquake/ioq3/pull/673
- sandGorgon 2y ago>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
- modeless 2y agoThe thought had crossed my mind honestly, but I have no idea who would pay for it.
- sandGorgon 2y agohttps://assetstore.unity.com/packages/tools/network/webrtc-video-chat-68030 https://assetstore.unity.com/packages/tools/network/webrtc-v... https://assetstore.unity.com/packages/tools/network/fm-websocket-4-0-280159 https://assetstore.unity.com/packages/tools/network/fm-webso... of course, it doesnt have to be tied to unity...but just a thought.
- modeless 2y agoInteresting, I hadn't considered game asset stores. I'm guessing that the vast majority of sales for the plugins you linked are for native apps that want video chat or to communicate with existing WebSocket endpoints. A WebRTC DataChannel plugin would really only be useful for web builds, which are unpopular for Unity and unsupported for Unreal.
- bradhe 2y agoThis 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.
- willvarfar 2y agoFor 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/ 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 :)
- szehe 2y agohttps://web.archive.org/web/20240627011030/https://alpha.reconquer.online/ https://web.archive.org/web/20240627011030/https://alpha.rec...
- muzani 2y agoI 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.
- kleiba 2y agoOr Minecraft.
- deleted 2y ago[deleted]
- muzani 2y agoIs there a waiting list for when you get back online? It's giving me a 502.
- onemandevteam 2y agoIt's been pretty stable today since I fixed my email service.
- mmarian 2y agoLooks like it's been hugged to death.
- ethcat 2y agoHTTP/1.1 502 Bad Gateway Server: nginx/1.18.0 (Ubuntu)
- gunalx 2y agoBad gateway. ಥ _ ಥ
- psini 2y agoLove the classic RuneScape inspiration :)
- keiferski 2y agoThis is great. It reminds me of something that was released circa 2000-2005, when there were more experimental fun things online.
- onemandevteam 2y agoWe need more "fun" places on the internet. It feels so dreary and manufactured most of the time.
- keiferski 2y agoAgreed 1000%.
- skill347 2y agobased
- caxco93 2y agobest 30 minutes of nostalgia. Game Design wise, I would suggest disabling attacking while walking, otherwise people can't even really run away
- cnity 2y agoThese kinds of things are just so fun. This is what the internet is about. Bravo OP.
- mikejulietbravo 2y agoThis is such a wild undertaking. I love it
- llmblockchain 2y agoIt was pretty fun, though not much to do? I ran around smacking cows and chickens and PK-ing some people.
- onemandevteam 2y agoNot much compared to just about any completed game, but hopefully the framework is there. You can talk to NPC's and do all their quests/tasks/riddles etc and do the goblin boss fight and quest. There is a lever-door puzzle in the basement of the chef's house. You can fish, cook, mine, smelt, smith, woodcut, farm, and craft different items. There are some special abilities you can unlock. To me at least, the fun is just choosing your own adventure and discovering things as you go. You do have to get used to right clicking on things to see if you can interact with them.
- animex 2y agoI joined. Immediately got ganked. I left. Congrats on 100% Authentic MMO Experience! xD
- futhey 2y agoI saw someone kill a chicken and get an egg. I thought I'd do the same but almost died.
- poopsmithe 2y agoI see a lot of promise with this. My biggest complaint is how often my clicks go without effect. I'd say 60% of every click goes unnoticed by the game and I have to click several more times before I see a UI dropdown or a red or yellow X. A little bit about my computing environment. Terribly bad Wi-Fi on terribly bad DSL in rural America. Modern CPU, but no GPU. Some visual stutters here and there. I would not be surprised if it's my network which is causing the errors, but at the same time I think the engine should assume the network is unreliable and compensate. Anyway, thanks for the fun distraction!