100 Player Server Optimisation

I have been working on a 100 player game recently (50v50). But the more I learned about networking and Roblox’s limits, I soon realized this task would be impossible. But I just came up with the idea of having way less real players and replace them by AI’s. Before I start coding them, I was curious if you guys had an idea of how much would turning players into AI would affect performance. I was curious if well-designed humanoids are better for the server than real players.

If anyone already tried this method of (fake-players), I would like to have feedback on what problems you encountered.

1 Like

I’m not sure, but because you are not:
Waiting for input by the player
Not needing to do checks for the Player
Basically not have anything for the Player
It may work, but in this case you also have:
An AI, which can affect performance but I don’t know how much
Need a lot of Pathfinding, which I’m not sure if affects performance
Have to add everything to damage and find out everything to attack

Last time I’ve put 25 Drooling Zombies in my Game it ran fine, even though there wasn’t anything in the Game, if you want to know if it will affect performance I suggest you test

Yes but mine would be way more compact. I would have a hybrid chase system that would use Pathfinding & MoveTo, bind attacks to my weapon system when they see a player. The major plus with AIs is that there is no latency and no hack-checks. Latency will make the game much more fun to play since bullet hits will be more precise and the server will have twice as less checks to do for scripters.

But I am still wondering if those AIs would be better for perfomance for the server because all of them would have collisions managed by the server, unlike player characters.

1 Like

Mmmh, I’m not sure, I suggest you try creating a raw version, and try putting 200 of them (the double because if it works than you know for sure) and see if it works

1 Like

Alright good idea, I’ll start with that. I will leave the thread open if anyone wants to add anything about the subject.

1 Like

Also please tell us if it works

100 players connected is a lot, but for the server it’s going to be cheaper than the AIs in terms of server compute. However, this is because the server would have to pick up a lot of the work that is naturally done on the client or offloaded onto client in normal circumstances. And AI can get rather complex, so simple should be trivial to implement and not have performance issues, but advanced AIs can have a lot of problems that they all need to solve with good time to run well. (Though I guess I’m ignoring some things like initializing new characters and stuff in this response)

However, 100 players can be a lot for networking. With this it will be best to try figuring out ways to reduce or compress the data you have to send from clients to server and server to client. I’m not actually sure how many players can be realistically handled by a server but I would guess 100 to be possible with a well optimized network.

2 Likes

From what I know Minecraft has 40vs40 Bedwars, a total of 80 Players, he may also research how they do that

Maybe you could try make the players have an extremely optimised player model. and less than 3 parts.

Games like natural disasters survival even struggled to have their server run 80 mostly R15 characters. Thats 15 x 80 (1200) moving parts and joints which put stress on the server.

So reducing player part count in theory should improve performance by heaps

3 Likes

Today I was trying to find a way to fix the lag caused when I put 50 mobs simultaneously in my game.
Firstly I thought it was because of the amount of tris or bad perfomatic AI script,
but no, that was not the cause.
I had a +30ms delay with those 50 mobs and a heavy FPS drop as well.
So I tried leaving those 50 mobs with just the HumanoidRootPart and all scripts disabled and still laggy.
Then I found the real culprit for my lag and fps drop, the “Humanoid”.
I just reworked my AIs to work with AnimationController instead of humanoid and it fixed my lag and FPS drop.

Problems with this method: If you need to use a Humanoid “Classes” (I don’t know if that’s what it’s called).
You need to script them yourself.
Like Humanoid:MoveTo()
Humanoid:EquipTool(), etc

2 Likes

Yeah I did a lot of research on the forums on Humanoid. And the general outcome of all of those posts was that if you need a lot of humanoids, creating your own is the best way. I would consider myself average at coding, but I wouldn’t know where to start If I wanted to reprogram Humanoids for players to use. On the other hand, If I were to completely program AIs, I would recreate my own version of humanoid.

Quick question: Why does Roblox keep this version of Humanoids if everybody hates them so much?

Well,to recreate Humanoids, it’s not that hard (well… not THAT hard) you only need:
Humanoid States
Health System
Walkspeed System

Whatever a Humanoid has

But those 3 things are the most important, the rest sign used taht much, meaning you only need those 3 basically

To answer your question:
I’m not sure why, but Roblox may be keeping them because:
A) They are the best they could get, the rest lagged too much
B) They are still trying to make them better
C) I still didn’t see a #feature-requests for that
D) They are working on other updates and completely ignoring the Community (probably)

1 Like

And how would I link all of those Systems to the player?
Do I just put plenty of UserInputService and then use vectorForces to move the model when keys are pressed?

Thanks for the answers btw :slight_smile:

That’s why I said

I’m no expert in this, but yes, you would need something g like that, I’m no expert here, that’s too advanced for me :sweat_smile:

2 Likes

Hahaha no worries, thanks for the ideas tho :wink:

2 Likes