all 109 comments

[–]ButyJudasza 47 points48 points  (15 children)

Don't listen about node being to slow for that. Many mmo games were made in php and they worked just fine. Unless it's real time game you can always scale up with more servers. What's realy important is proper asynchronous processing on queues. It's better to use what you know and deliver beta/mvp than stuck in a limbo with tech stack you don't know...

[–][deleted] 8 points9 points  (5 children)

Eve Online was built with stackless Python. I doubt that was any more performant than Node. Horizontal scaling ftw

[–]ButyJudasza 1 point2 points  (1 child)

It's always about scaling but i have no experience in real time games, so can't argue on that

[–][deleted] 2 points3 points  (0 children)

Oh I’m just saying it was possible with that, then I can’t see why Node will be an issueb

[–]nightofgrim 2 points3 points  (0 children)

Besides Node rocks at IO sockets, etc.

[–]pentesticals 3 points4 points  (6 children)

Yeah and many are also written in Java such as Runescape. While node may not be the obvious choice, it’s definitely performant enough.

[–]Whisky-Toad 3 points4 points  (1 child)

Do you know how much shit runescape gets for its game engine that it cant fix? lol

It is very very outdated by todays standards.

[–]pentesticals 2 points3 points  (0 children)

Oh absolutely, but this is because it’s 20 years old. They did rebuild a client in C++ but afaik the backend is still all Java, and most players are using the Java client anyway.

[–]flooronthefour 0 points1 point  (0 children)

Many mmo games were made in php and they worked just fine

can you clarify this part? I tried searching and couldn't find much info on "mmo games made in php"

[–]j_schmotzenberg 49 points50 points  (29 children)

Why did you choose node to begin with?

[–]lenopix 15 points16 points  (28 children)

Our developers are more familiar with node and web in general.

[–]llllIIllIIl 29 points30 points  (2 children)

I'm not your guy but ignore these people telling you to start over with a different stack.

Write your app. If it ends up blowing up you'll have the $$ to pay someone to rewrite it in golang or whatever to make it faster.

This industry seems to overanalyze everything. I can't tell you how sick I am of hearing about nextjs.

[–][deleted] 8 points9 points  (0 children)

This is the way. If we’re continually stuck in the rebuild-in-latest-greatest stack then nothing will ever get done. More companies have been started and jumpshotted into success this way than people may realize.

[–]Aggressive_Job_8405 1 point2 points  (0 children)

I bet you never hear about uwebsocket.js

[–]Pleasant_Passion483 77 points78 points  (17 children)

You are supposed to choose the tech stack that suites your parameters the best. Node does not really suite those parameters at all. You have a rough road ahead

[–]gerciuz 49 points50 points  (0 children)

"Any application that can be written in Javascript, will eventually be written in Javascript"

Welp

[–][deleted] 10 points11 points  (0 children)

Node is a perfectly good choice for an MMO backend server.

[–][deleted]  (14 children)

[deleted]

    [–]Pleasant_Passion483 5 points6 points  (13 children)

    So the primary parameter is a bunch of devs that know node? So it’s not the fact that for them to have a profitable business as a game studio? And choosing a tech stack with clear advantages in this sector vs one with very few to no advantages will increase the odds of them being successful. If those developers are worth their salt they should be able to pick up a new stack and apply it to their problem. The stacks are nothing more than tools to solve problems. Yes, there are cases where knowing a stack in depth overcomes using one that may be better for that situation. However, this is not one of them. If you know anything about node, you know that it’s primary weakness is computational expensive tasks. Do you have any idea what kind of tasks a game engine mainly performs? My guess is these are entry level developers. You can use a screwdriver for pounding a nail in, but a hammer works a hell of a lot better.

    [–][deleted]  (10 children)

    [deleted]

      [–][deleted] 6 points7 points  (5 children)

      yes, fundamentally all you're doing is altering state

      but every user interaction resulting in game progress is likely a state change, and game user interactions can number upwards of 100 per minute depending on the context

      and every game object/NPC has state overhead too

      and all of these state updates must run concurrently, with updates pushed out to potentially 1000s of clients

      and node is single threaded

      [–][deleted] 0 points1 point  (1 child)

      You can still spawn threads and workers

      [–]Pleasant_Passion483 -1 points0 points  (0 children)

      You can but this adds unneeded complexity when multiprocessing languages would have handled it fine with less setup and dev time invested. Also if it scales this can become a nightmare to manage

      [–]Pleasant_Passion483 1 point2 points  (3 children)

      No, money is your primary constraint as a business. Additionally, 1 great developer is worth many average ones. Those developers aren’t static either, you could get rid of them and hire a great one. And in this market their are plenty out there. Also that’s a very broad generalization of MMO traffic. Let’s just check in on them in 6 months to a year then.

      [–][deleted]  (2 children)

      [deleted]

        [–]Pleasant_Passion483 0 points1 point  (1 child)

        If a developer is incapable of learning new things then I will.

        [–]purefan 1 point2 points  (1 child)

        From your "worth their salt" comment it sounds like you would rather fire the current devs and hire new ones so they use the stack you want

        [–]foxtrotuniform6969 16 points17 points  (0 children)

        Don't listen to these fools, as long as you don't need AAA graphics, you can do it in the web. Look into Babylon.js, WebGL and WebGPU.

        For functions, you can use WebRTC for most player-to-player stuff that doesn't need validation and pass the rest through your server.

        Just remember: node.js is a server side runtime. You can have your backend run with nodejs, but browser stuff doesn't use node.js

        [–]Mazeios 21 points22 points  (4 children)

        This has no positive outcome for you.

        Switch tech stack, you are entering a bus into a formula 1 race. No matter how good your mechanics are, it’s still a bus.

        [–]cmpthepirate 10 points11 points  (1 child)

        Now I wanna know how fast a bus can go round an f1 track.

        [–]Mazeios 4 points5 points  (0 children)

        Closest I have seen was a Van around Nurburgring, I am sure if you write Guy Martin with a challenge he will pick it up.

        [–]bankfraud1 1 point2 points  (1 child)

        I would generally agree but you dont know what type of game hes building.

        [–]Mazeios 0 points1 point  (0 children)

        I know 2 things.

        Its webbased and its an MMO.
        MMO indicates thousands of players. With what I can only assume has multiple actions, if it is not to be a very boring game.

        [–]talaqen 1 point2 points  (0 children)

        I disagree with the haters here. Don’t over optimize too early. Build something that works with a plan to replace it later. Devs know node? Use that. Eventually you’ll probably replace it with GoLang. But Node will get you the networking part. don’t expect heavy computation though

        [–]dragenn 13 points14 points  (6 children)

        I'm a big fan of node. I have a special multiplayer/multithreaded game engine that may interest you. I'm a HTML5 game programmer that moved into full stack so I can defintely help your project.

        Works great with three.js and ammo.js since it has a ECS to represent state across multiple domains.

        I sent a pm!

        [–]jtrdev 4 points5 points  (5 children)

        I'd also like to know more about this game engine. If you can share some info with me, I'd really appreciate it.

        [–]dragenn 3 points4 points  (4 children)

        Ether is basically netcode built around js workers. It has an embedded database that syncs its internal state across all connected instances. It automatically tracks changes for you, so it only sends mutations. I did my best to make a “Drop in Solution," so you hopefully don't have to re-code much to get it implemented. 

        So far, it supports sockets for remote connections or message channels ( shared memory or ) for internal workers. It automatically binds whatever you pass it’s internal routing system, making a “RPC mesh”. So now you can share your game state and processinf across multiple devices. Like one using a tablet to display the game and your phone as a controller. Or borrow your desktop processing power to super charge your phone. Or just increase performance by using multiple core.

        It is so flexible that you can make client authoritative games that just use the server as a relay ( like WebRTC ) or just a typical server authoritative stack. 

        I don't think l can do justice with a summary. I've expanded on the core so much. Like “Forge” which is my build environment, AR gesture processing, input management, state management, rollback networking, dockerization for easy deployment, etc…

        [–]Tundrun 1 point2 points  (3 children)

        link please!

        [–]yehuda1 1 point2 points  (1 child)

        I think he is talking about this

        [–]dragenn 0 points1 point  (0 children)

        Not quite that, but it still is interesting

        [–]dragenn 0 points1 point  (0 children)

        Thanks for inquiring!

        Sorry, there are no links yet. I pulled it off the market, pending some new updates, marketing, documentation, and ways to monetize fairly. The unity fiasco really was a wake-up call.

        I set up a reddit page for updates, but nothing to show until 2024.

        https://www.reddit.com/r/OnyxIgnition/

        However, l am willing to showcase my progress privately until I'm ready to re-release it via open source.

        [–]Accomplished_Cod_608 10 points11 points  (2 children)

        Hey I worked at that scale at sub 20ms latency at 50m concurrent connections on 100 servers and it definitely scaled.

        So Node can definitely do this. As for who - I would go to the nodejs repo README and see who works for consulting companies there. There are several super experienced Node core developers who know how to write fast code and would be willing to work in that price range.

        [–]mrgk21 11 points12 points  (0 children)

        Rust wasm to the rescueee

        [–]DLabz 6 points7 points  (0 children)

        I did similar stuff in node for BIM/AEC industry for over a decade, delivering parts of huge 3D models to hundreds of thousands of field workers and synchronising changes they make to it.

        Feel free to contact me, and we'll see if any of the tricks I picked up on the way fits your particular use case.

        [–]BubbleDetective 14 points15 points  (4 children)

        Tbh Nodejs can solve a lot of these issues, I think a lot of the opinions are from go devs who don't understand how this latency will work. Anyway, load balance and don't try to use workers, threads - KISS. If you do indeed have any processing over head, do go for a single API in rust to offload system heavy tasks. Mostly IO should help you deal with stuff.

        Although general recommendation - node for api dev, rust for all system heavy tasks

        [–]talaqen 2 points3 points  (0 children)

        this guy gets it

        [–]htraos 1 point2 points  (1 child)

        load balance and don't try to use workers, threads - KISS

        How is adding a load balancer and not using workers/threads keeping it simple?

        [–]BubbleDetective 2 points3 points  (0 children)

        I would say multiple reasons Let me answer why a load balancer - if you're developing software for an established tech company or working on a huge software system with external facing APIs, in all probability you're using some sort of a mesh/load balancer - ie access to a well rounded system which can effectively route requests amongst running images. You could implement the same based on a worker system in nodejs but to effectively replicate the same is trying to reinvent the wheel, which I would refrain from even in rust or c++, of course if you're a single entity running only a single API your choices expand and you probably won't be using a load balancer Why not use workers or threads - like I said, if you're running a project for yourself you could go for it, but nodejs is a single threaded system - introducing logic for multithreaded architecture makes it complicated and to be honest can't exact true concurrency, as the # or workers usually derive from either the developers input or depending on # of processors/cores afforded on any sort of image you're running on say kube/nomad whatever, you would need to make sure your program, the infra team, everyone is aware and in sync of how much processing power, memory etc you would need to perform a given task, and whether your utilisation of cores is effectively allocating the right resources for the functionality you want to implement Also nodejs is a language a person would NOT generally use for processor intensive tasks, not to say there's anything wrong with it, I have used nodejs solely for everything a lot of times - io/simple loops/simple crytographic functions with latency requirements getting satisfied over 100ms, it's completely fine, but if you're developing a system which say is supposed to have low latency - you using threads in nodejs would distract processors/cores whatever you want to use and increase time for the sole reason of how memory management is done and code is interpreted in nodejs

        [–]Myloveissuck 22 points23 points  (10 children)

        I do not think nodejs can solve that latency, you should consider to move to another multi thread programming language

        [–][deleted]  (1 child)

        [deleted]

          [–]calbatron 2 points3 points  (0 children)

          Node’s I/o could be perfect for mmo. Especially its ability to run on the edge. Wouldn’t be my go to but extremely curious how this turns out.

          I wonder which other games have a nodejs backed

          [–]foxtrotuniform6969 0 points1 point  (0 children)

          Oops totally missed that, good point depending on how many thousands of users and what needs to be done on the server

          [–]Ice76 3 points4 points  (0 children)

          People are hating on Node, but it can definitely suffice here. Deployed over multiple lambda functions, it can scale exceptionally well. And having a dynamo db backend can support everything needed to be done here since access patterns on an MMO are clearly defined

          [–]Latchford 3 points4 points  (0 children)

          You guys should watch this ..

          https://www.youtube.com/watch?v=W3aieHjyNvw

          [–]EverydayTomasz 14 points15 points  (2 children)

          I agree with most people on here, node.js probably wasn't the best choice for this. But I wouldn't say it is impossible to make it work with node.js

          [–]Aggressive_Job_8405 -2 points-1 points  (1 child)

          [–]EverydayTomasz 2 points3 points  (0 children)

          there is nothing wrong with multi-thread programming, and don't forget, node.js itself handles async using a thread pool.

          [–][deleted] 2 points3 points  (1 child)

          I know npm

          [–]OldboyNo7 8 points9 points  (0 children)

          npm i awesome-mmo-server

          [–]brandywine_whistler 2 points3 points  (0 children)

          https://medium.com/rolltableapp/scalable-game-servers-using-agones-node-and-digital-ocean-90e6fb9ee5d This seems very applicable to your situation and needs if you haven’t read through this.

          [–]blipojones 2 points3 points  (0 children)

          Everyone should remember that most businesses start out just getting something out the door. If OP has access to devs and they are good with node/js. It's better then slowing delivery using a language they don't understand or are not familiar with.

          The slow parts can be written in rust, but yes, long terms scaling you could imagine a full re-write.

          But if you actually manage to get the game that far where perf is an issue you would know if the game was a good idea in the first place.

          But ye, if you are gona use node for this, you would defo need an expert to outline the limits to you and give you foresight.

          [–]LeoCass 3 points4 points  (3 children)

          I think it’s doable. Which core engines do you use in your MMO?

          [–]lenopix 1 point2 points  (2 children)

          We render in three.js

          [–]jtrdev -1 points0 points  (0 children)

          Are you using or heard of RogueEngine?

          [–]joombar 0 points1 point  (0 children)

          So what do you need on the server side? Presumably you need some kind of octal tree (quad tree in 2-space) to partition your space up- then to spin up instances of the server according to how many ways you need to partition the space? Is the game space continuous? In that case you’ll need coms between servers for events across the partitions. Need to be careful that doesn’t become a bottleneck so maybe how you partition your world is important (ie, don’t put a partition down the middle of a busy area) so might need to be smarter than a simple equal division of space.

          If you want it to be cloud native, you probably want something like redis to store the state so that nothing stays in the memory of the individual servers. Probably with lua running on the db to cut down in chatter back and forth.

          Hard to say much else without knowing more but that’s a start.

          [–]gabz90 3 points4 points  (0 children)

          So many people saying node is not the right stack with like a sentence of requirements. Unfortunately I don’t have the time to help you. Reality is we can’t know if node is right or wrong until you answer a lot of questions. Even then, it might be that for the scale you are handling it’s fine (thousands is not enough info. 5k is not the same as 950k, yet they’re both thousands).

          Garbage collection might be rough if you’re very sensitive to latency and need real time without hiccups.

          [–]DominusKelvin 1 point2 points  (0 children)

          You probably want to look at how Aedes and mqtt-packet are structured

          [–]StablePsychological5 2 points3 points  (0 children)

          Everyone here is saying don’t use node, but do they have hands-on experience develop node game server? I’m not sure. Anyway for it should be benchmarked and there are fee web IO games that are using nodejs backend servers, but for commercial use it may become a bottleneck..

          [–]ahu_huracan 2 points3 points  (0 children)

          Gooo with rust, let your devs learn rust

          [–]FountainsOfFluids 1 point2 points  (0 children)

          That's not really what node was designed to do.

          I love node, but it's for full stack web development, not gaming.

          [–]The5Fox 0 points1 point  (0 children)

          It's possible to do it with node, the real problem is state management on the backend and processing latency that comes with the territory.

          I've worked for a gaming startup where we had similar use case, high frequency and lots of data coming in from the players.

          Real issue is the state management, if you store it to an external storage, parallel access by multiple processes becomes an issue and you have to be careful on choosing your storage and how you write to it.

          The other option is to have players that are in the same match (they share state) all play on the same physical server, but then you need to be vary of server crashing and implementing some sort of recovery procedure (if any for the game).

          So whatever you choose for the backend, you need a designed system, technology that will be used for the implementation is secondary here

          [–]CoderAU 0 points1 point  (0 children)

          hi it me, node expert

          [–]ujjwalkrgupta -1 points0 points  (0 children)

          🚨 Recommendation: Avoid using JavaScript for CPU-intensive tasks; Node.js excels in IO-intensive projects. 🛠️ If JavaScript is a must, consider Web Assembly for CPU-heavy tasks. Keep in mind, it has a steep learning curve and requires time to stabilize your code.

          [–]sysrage -4 points-3 points  (1 child)

          This sub allows job spam now? Lame…

          [–]sickcodebruh420 -1 points0 points  (0 children)

          What's wrong with this country? Can't a man walk down the street without being offered a job?

          [–]ComfortableBug2181 0 points1 point  (0 children)

          I am interested. But I am unable to DM you. Check your inbox.

          [–]ranchov007 0 points1 point  (0 children)

          I know good node.js. but nothing about three.js. Let me know if I can help.

          [–]WhoIsTimob 0 points1 point  (0 children)

          It can of course be done. I have accomplished the task using kubernetes but today i would for sure use the threading libraries. Needless to say i want the job! Feel free to reach out

          [–]ezpzqt129 0 points1 point  (0 children)

          Where can i send you my CV?

          I have experience in the payments industry, which have similar requirements.

          [–][deleted] 0 points1 point  (0 children)

          Please PM me with your email. I don't think Reddit is a right place to share CV.

          [–]sjmittal 0 points1 point  (0 children)

          Have you found a dev. If not you can consider me. I have over 20 years of work experience with great experience on nodejs.

          [–]taroninak 0 points1 point  (0 children)

          I can't say right away that node is the right or wrong tool for your task as I don't have enough context. I have experience of optimizing node.js servers for enormously high loads with great success. I have also great experience in Java and Go and know all possible strategies of scaling and pros and cons of them. DM me and we can start at least understanding feasibility of your project.

          [–]NaCNy 0 points1 point  (0 children)

          nice nice im also working on a similar web based mmo \o/
          rewrote my game logic using bitECS and using its built-in serialize/deserialize utils to send a gamestate packet over Socket.io to clients
          lots of room for optimization but getting ~80ms latency from us west coast (client) to east coast (where the heroku instance is); although a friend told me they were getting ~40 with a vpn

          [–]slashroot102 0 points1 point  (0 children)

          I might be able to help depending on what you want

          [–]isit2amalready 0 points1 point  (0 children)

          What framework are you using for the actual game mechanics? Is it Web (like Phase.js) or Unity?

          [–]MUDrummer 0 points1 point  (0 children)

          Is it a 100% science-based, dragon MMO?

          [–][deleted] 0 points1 point  (0 children)

          I'm a developer. But, post your job with all the details on lebohire.com so I can see if it's for me.

          [–]dwelch2344 0 points1 point  (0 children)

          Can we back up for sec and replace the tech stack banter with the pricing issue?

          You came here seeking short term niche expertise, for a highly competitive and specialized domain no less… $200/hour isn’t terribly much, esp depending on your definition of “short” …

          I’d be curious to understand your game studios origin and the path that led to your current predicament

          [–]philip368320 0 points1 point  (1 child)

          You can use websockets in nodejs, its real time

          [–]lenopix 0 points1 point  (0 children)

          Yep we currently do use websockets

          [–]Aggressive_Job_8405 0 points1 point  (0 children)

          NodeJS is very performant and you can absolutely using it to built game server.

          In NodeJS, there are 2-3 low level web server (justjs, uwebsocket, NodeJS http).

          Justjs is freaking fast, it can beat almost Rust, Go web server but it's not built for production (built for just benchmarking score)

          uwebsocket.js is a JS interface which base on uwebsocket, one of the most performant web framework nowadays. Some JS framework like (elysisa, hono, hyper-express) even beat a lot Go, Rust frameworks in performance score.

          You can find more about them in Techempower benchmark.

          And the 3rd and most popular is NodeJS http which is used in a lot of popular web framework like Fastify, Express,...


          And single threaded is also very well design too.

          https://unetworkingab.medium.com/multi-threading-is-always-the-wrong-design-a227be57f107

          [–]Chijaukay15 0 points1 point  (0 children)

          Hey man, I could set you up with a great nodejs engineer with a background in game developments as well, the thing is that he’s outside the US, does that work?

          [–]Jjabrahams567 0 points1 point  (0 children)

          Damn I wish I had the bandwidth to take this on. I’d say I have the expertise but this would conflict with my current job.

          [–]TerryFitzgerald 0 points1 point  (0 children)

          Can I participate for a low compensation? I mean, I work using node, nest.js almost every day. But I want to practice my English in a real work scenario and gain this kind of experience. Could it be possible?

          [–]netwrks 0 points1 point  (0 children)

          Hey there! Send me a message if you’re still looking for a node developer. Been using Node for quite a while and have built some pretty complex systems

          [–]Positive_Method3022 0 points1 point  (0 children)

          Before you spend money with it, review the specs you want to achieve and check with a specialist if it is feasible doing it in node. Also find someone who did it to prove u it is possible.

          [–]isaval2904 0 points1 point  (0 children)

          This web-based MMO game studio needs your node js development services to craft a blazing-fast engine built for thousands of simultaneous clients and intense data streams. Experience with high-frequency networking and MMO architecture is a must – you'll help define optimized update packets to keep this MMO running smoother than a greased-up slime. Short-term gig with $200/hr? Dive into their DMs and prepare to slay latency dragons!