jonathaneeckhout / jdungeon

An opensource 2d morpg game based on the Godot engine in a medieval inspired fantasy world
https://jdungeon.org
BSD 2-Clause "Simplified" License
124 stars 21 forks source link

1,024 to 33,554,432+ scale player server stress testing needed #245

Closed WithinAmnesia closed 5 months ago

WithinAmnesia commented 5 months ago

1,024 to 2,048 to 4,096 to 8,192 to 16,384 to 32,768 to 65,536 to 131,072 to 262,144 to 524,288 to 1,048,576 to 2,097,152 to 4,194,304 to 8,388,608 to 16,777,216 to 33,554,432+ player stress test needed also.

Server Stress Testing

Players may be bots so its good to known and run these numbers. Probably just aim for 1 to 16,384 or 131,072 players for in the 90s there were servers that had 2-4k players each. So it being the 2020's and with new massive server tech I'll just get you the video like Linus tech tips this is coming soon like a server room in personal computers so like there are already 10k+ bot farms. So the 2020's-2030's will have massive player counts if people are okay with bots or if a person looks at classic or retail wow or runescape its lots of bots. So a big server would be good so that the botters don't wreck the servers for the players and also big servers are big fun like 16-65k servers would be amazing its 2D. So I played on kronos for classic wow and it was 1 global server with like 2-10+k players in the 2010's with 2000's technology so hopefully with 2D and 2020's and 2030's we can manage 16-65+k servers. https://www.youtube.com/watch?v=It9D08W8Z7o these will get to the market so the mid to late 2020's will see consumer mini server rooms but on a pc with many cores. What this means is that big player counts and more power per person for running games should be expected in the mid to late 2020's and early 2030's. This is 2D and less demanding but staying future proof is important and if 2D runs great then 2.5D and 3D should run good as well. Lots to consider.

jonathaneeckhout commented 5 months ago

"Aim for the moon" is in it's place here I guess XD. But realistically if we manage to get 100 concurrent players on a server this game would be a massive success already. Rome wasn't built in one day. So let start small and grow if needed.

Closing this ticket as it is a bit out of reach of becoming a reality in a near future.

WithinAmnesia commented 5 months ago

"Aim for the moon" is in it's place here I guess XD. But realistically if we manage to get 100 concurrent players on a server this game would be a massive success already. Rome wasn't built in one day. So let start small and grow if needed.

Closing this ticket as it is a bit out of reach of becoming a reality in a near future.

I agree its a bit wild for sure.

Fare warning this is a text dump for later use considerations, my memory gets fuzzy so don't worry about replying its an archive work.

Myself, yourself and Nancok had a really good conversion on discord with the networking design section.

I will share a summery for everyone to see. I had one too many discord servers or forums shut down so back up back up back up what was said shared is really important even for archive reasons. "Matthew — Today at 00:06 Can we get 16k players on 1 server and have under 99ms lag if right beside the server? that would be like super amazing and if you can get 16k on there with reasonable latency (I helped raid raid lead the best guild in the world in Naxxramas (Kronos)) on 600+ ms / 1+ second lag as melee but I was the only one in like 100+ of the best players / world's best raiders to do that and most people called 300 ms 'unplayable' even if in the back healing or just doing ranged combat. So 99ms or under is great. ~300 ms is doable and 600-900 ms is 4D chess matrix like see stuff before it happens and 1 second is just not like doable for like 1999/2000+ players. So if you can do a ~1/3 or 1/4 a second / 300 ish ms or under ~250 ms lag to start for playing beside the server with ~16k players that would a massive success. Nancok — Today at 11:18 idk if there's a PC on earth that can support 16000 simultaneous connections. Not CPU wise, but just in terms of data volume. What MMOs usually do is spread the load among servers, which Mawakajaka already got covered with the gateway instances. Mawakajaka — Today at 12:08 multiplayer is all about tricking players into thinking they are playing together with others in a real time world Cablefish — Today at 12:22 True dat And sometimes have systems to simulate greater connections like Eve Onlines market systems Mawakajaka — Today at 12:24 btw @Nancok I am now investigating a path you actually proposed a while ago I watched this video about halo 3:

https://www.youtube.com/watch?v=h47zZrqjgLc&t=1s

(really nice if your interested in game networking)

And they talk about a flow controller for network packets YouTube GDC I Shot You First: Networking the Gameplay of Halo: Reach Image So I want to see if I can implement a flow controller which gives a certain "priority" to packets and decides which packets should be sent but first we need to have better eyes they basically said: we spent 6 weeks (which is peanuts for such a big project) in implement a descent network profiler and showcase what they actually fixed with it reducing network load by 80% Nancok — Today at 12:28 Gotta watch it later Mawakajaka — Today at 12:29 the video is 1hr 40 but the real content is like 1 hr Mawakajaka — Today at 13:54 So I am diving deep in the network code of godot Image what I currently see is that for a simple text message there are actually 4 messages being sent over the network.

_client.get_peer(1).send_text("test") Normally in tcp i'd expect only 1 send from the client and 1 ack from the server for tcp So now I am checking if I can reduce this by using the native tcpserver and websockerpeer stuff Mawakajaka — Today at 14:08 nope, exactly the same: Image Nancok — Today at 14:50 Is this using the lower level functions from the other time you where looking for manual polling? Matthew — Today at 17:06 there is like they are coming soon to teh comerical consumer market. I just want to be ahead of the curve, make sure the future is good and grow into 16k and makes sure the foundation supports that trajectory. https://www.youtube.com/watch?v=It9D08W8Z7o + https://www.youtube.com/watch?v=0EIwhvqCX1c nvidia and amd https://www.youtube.com/watch?v=wnCQ4ICBIfc

So with a factional war type of game like an rts but big 'zoomed in' you get these logical server size needs of ~16k+ each in order to run proper cities and host proper wars and conflicts an diplomacy with big stakes too.

Say you have 32+ major cities. Each has to have ~1.5k-5k people running the economy to function like a proper city, if we go 1.5k+5k/2=3.25k people for an 'average small city' and you have say 32+ of these things in a world map you get like 1.5x32=48k to 5x32=160 k (or ~104k avergae people running the cities and if ~half is urba and ~half is naturally rural you get 48kx2=96k + 160x2=320 /2 = ~208k server needed to run a small mini earth that has proper geopolitics with a conservative estimate. Of you add bot farms to the mix it will be well over 1-2 million unless you get some over loaded servers with nothing but bot wars and you can see that on osrs and lots fo wow servers as it is and new and old player cant find real player cus the server pop too low and they quit. So with high server pop you can wade through the bots and find real players more easily. Also bigger battles are more epic like a 10k player battle I have been trying to find / figure out how to do properly for ever lol. lets do the math again with 4 major cities at 1.5+5/2=3.25k pop x 2 for urban and rural split., 3.25k x 4 = 13k x2 = 26 k hmm interesting. Nancok — Today at 17:42 I rephrase, there is probably a CPU that can, but there's not a connection that can Matthew — Today at 17:42 that makes sense. Nancok — Today at 17:42 Even assuming you're using IPv6, idk if you can assign that many connections to a single server ik that ipv4 allows like 96? Matthew — Today at 17:43 I'm trying to stuff 10k battles into the mmorpg and have like rts economy so oits good balance of combat and logistics so like the game is not just endless war but a happy balance of conflict and cooperation. Nancok — Today at 17:44 Social aspects are always teh hardest to get right. Matthew — Today at 17:44 so like right now in my mind I'm fine with small numbers but in my heart I want the big support even if it takes like 2-4 years of growth. Nancok — Today at 17:45 Keep in mind that i am saying 96 per server, but with more servers, you could house more. atm this game is capable of running among any number of servers So it can probably grow to 16K players with enough servers Matthew — Today at 17:47 mhmm so like I'm trying so hard to like not sound too crazy but also like future proof things at the start so we can like grow big and have the happy big servers with ~16k pop and hopefully if we have big goals at the start it will help the project grow to support epic content if we do it bit by bit responsibly. and avoid retrofit hell / capped potential / 'tech debt' I really hope to avoid the 'tech debt' lol. Matthew — Today at 17:47 can we get 10k players fighting in the same battle? not now but can it grow into that? Nancok — Today at 17:48 i doubt it, most PCs would give up before 1000 Not even talking about the server either, but the clients themselves (who have a WAY lower load) would be unlikely to withstand that Matthew — Today at 17:49 if say in like 4-6 years when those crazy cpu's from big data server rooms hit like 500 bucks with 70-100+ cpus / cores like we can handle it but it might take 2-6 years to build a proper mmorpg so I hope we can match these things so in like ~3-4 years ish we can be ready for the big pc upgrades. Nancok — Today at 17:50 oh yeah, in some years it would probably be possible. This game is coded in a high level anyway, so swapping the low level stuff would require little work on our end. Matthew — Today at 17:52 okay I just hope to avoid like tech debt / retro fit hell so sorry if I sound hella weird asking for 16k pop servers when it like far off but like I know if we aim too low we might miss out big time in 3-4 years when the big pc upgrade happens. I worry that if we can only do like 90's tech 2k pop severs the games get stunted and no 10k battles and also no 'feels alive' small cities for the good good feeling social aspect / need better way of saying that lol. theres a funny tech debt picture Image Nancok — Today at 17:55 Just keep in mind that the kind of functions we are using are things like "draw" or "connect"

The engine is the one that is actually doing the heavy lifting, shifting memory around and giving orders to the CPU. In a future where tech changes and becomes more efficient, these functions will remain the same for us, but the inner workings (which we don't have to worry about) will improve.

We basically are the ones giving the orders, but the actual work is out of our hands. Matthew — Today at 17:56 okay so like how do you feel about this path to grow into future 16k servers? is it there already or does it require some careful planning right now to be able to sustainably grow bit by bit year after year kind of thing? I wonder about not being able to to grow and reach fuller potential and miss the epic 10k battles and really cool big cities and social aspects Nancok — Today at 17:59 It's not AAA level efficiency. But Mawajakaja has been working hard to make all data transfers as efficient as possible (which are the main bottle neck rn)

The code side COULD be more efficient with maybe a structured-code approach, but it would entail sacrificing accessibility, which is a key part of the project. (And would make future changes way more difficult, stalling the growth of the game)

The current component approach has the most growth potential that i know of. Matthew — Today at 18:01 I super super support the current way things are done but i worry about be being dumb and I cant see how big the servers can be if we had all the money and all the resources. i feel blind where i cnat see how big these servers could be thus i get worried about if i can or cannot build a certain scale of game world from the start you see better than i do here i feel very hazy and not about to see far into the dark Nancok — Today at 18:03 In terms of size, thanks to the gateways, it is essentially infinitely big in terms of potential growth. Idk about the cost of such a thing. But it is certainly possible. Matthew — Today at 18:04 Okay I remeber in wow there was cap to server size because of early server size choices and i hope to have big growth like 16k servers when the cost for the cpus are there that the servers can healthily support that. my plan is to build a almost 1 to 1 scale of cities in feeling and less like 'mini cities' of wow and osrs and more like rts but zoomed in feeling so the worry is if i make these massive game world features that only really buzz at ~16k to 32k+ server size that if i learn like 2 years later that the game only supports 1 to 2k servers that would messes up the social aspect and the game would have a huge issues. like think of a small real life city that needs ~3-5k people to function properly and then you say 1-2 k people can be there at one time, the thing would not work right and the player big flash back of worm and dead mmorpgs ya like ghost cities are super not fun lol. if there is confidence in even a 8k server that can grow to 16k server size and bigger I can start work on world building a world that scale and have people trickle in like dwarf fortress and over 2-4 years it would grow to reach its potential that was planned day 1. Matthew — Today at 18:13 It maybe takes 3-6 years to fully build out a proper large ~16k server pop game world but if I know that game can eventually handle it then i can effectively jump generations and make a 2030's MMORPG in the 2020's and come late 2020's it should have at least 1 server that is buzzing with ~16k people and with multiple major cities and proper social aspects and economics with massive conflicts and diplomacy and player made history. Matthew — Today at 18:24 Its tricky to balance. I want to make the 2030's MMORPG right now but our older style of server tech is coming to an end so I want to just jump ahead and best use my 3-6 years so when the game is fully built out its up to the 2030's standards of what severs and pcs can manage. WoW was started in like ~1999 if it used 90's tech classic wow would be an everquest clone but it looked a head into the future and another generation of server technology and the gamble paid off and as WoW launched in 2004 it was able to grow with the new pc big upgrade. In mid to late 2020's we are getting another big pc upgrade. the tech is going down in price for ~100cpu mini server room cpu's from ~200k each in 2023-2024 then ~100k in 2024-2025 then ~50k in 2025-2026 then ~20k in 2026-2027 then ~10k in 2027-2028 then ~5k in 2028-2029 then ~1k in 2029-2030 then ~500 in 2030-2031 (bucks of 2024 usd before 2030's inflation) if not sooner. Thank you for your insight too Matthew — Today at 18:31 I will go ahead making the 16k pop server scaled game world bit by bit."