MessagingService: Creating an 'infinite player server'

Firstly, wow! This is incredible! I’m already thinking about ways this can be used and ways to reduce lag even further.

2 Likes

Additional thought: an infinite player server Bloxys

Obviously sophisticated filters would have to be in place with modifications to the current model in order to cope with potentially 5000+ players instead 300… but if pulled off could add that extra ‘wow factor’ to the event?

9 Likes

I wonder how will a server look with 1k people in it :thinking:

2 Likes

17 Likes

I made this before without taking it from anyone else, this would’ve been impossible if the 10,000 subscriber limit was not removed! Impressive job, I may use your version instead of mine I made a while back to maybe mess around and see what I could make.

My version when making one of these was anchoring the HumanoidRootPart of the “fake character” and making it tween the CFrames of the position of them to the position they were in, as well as getting what animation id they had.

8 Likes

So the messaging service can pass on any value at all? I thought it could only pass strings! This is interesting…

1 Like

Nice idea, I’ll give that a shot!

@ancant64 You can only publish UTF-8 character with MessagingService: strings, integers and tables are acceptable, whereas Color3 values and CFrames are not.

If you wanted to transfer a Vector3 value, you would have to record its X, Y and Z values in a table then convert back to its original form on the receiving end.

2 Likes

Even if the Cframe is in a table, it can’t be published?

1 Like

Yep, if it’s not a UTF-8 character, even in a table, you will receive an error. Instead, do:

local position = part.Position
local table = {X = position.X, Y = position.Y, Z = position.Z}
publish(table)

function receiveTable(table)
	local position = Vector3.new(table.X, table.Y, table.Z)
end
1 Like

How about JSON encoding and decoding the table?

EDIT: Woops, sorry I forgot that you can only JSON encode strings, numbers, tables, and booleans.

1 Like

Just made a PvP infinite player server on my own version of this, it isn’t the best since it doesn’t replicate health, no death body parts breaking effect, superball gear equipping not replicating, etc. but it is sure worth checking out!
(So far you can use a sword and a superball!)
https://www.roblox.com/games/2982617349/PvP-Infinite-Player-Crossroads

3 Likes

Could you walk through the code in a little more detail sometime?

1 Like

The future is now. This is quite impressive!

I mean seriously. This opens so many doors, even on the development-side of things. I’d love to see players interacting with my game in real-time via studio. I never would have imagined using MessagingService for this, so huge props to you!

4 Likes

How do you Handle the resource usage of Humanoids in large quantities impacting Performance?

1 Like

As explained in the main post, literally hiding NPCs (character.Parent = nil) when their position exceeds the filter limit and blocking all information about them. By doing this, you hardly have to worry about the cost large amounts of humanoids pose in the first place.

If you were looking to handle lots of humanoids however, a good method is as Rawblocky proposed, anchoring the HRP and using TweenService instead of humanoid:MoveTo().

You’ll find a great deal of developers create their own character rigs without humanoid because of the cost it has on performance in large quantities.

5 Likes
Didn't see that in Search

I am currently working on a game featuring a large amount of NPCs after researching and testing I found that Disabling HumanoidStates and Collision isn’t enough to handle 200+ NPCs (for my laptop).

I thought Character.Parent is locked last time I messed with it

I’ll take note of anchoring the HRP and using TweenService instead of humanoid:MoveTo() and creating a Custom Humanoid or maybe look into using Luanoid.



Thank you for the Response.

4 Likes

Wow i never thought the service could be used for something like this. How creative!

3 Likes

This is simply amazing! Great job on this! Also, maybe perhaps start working on reducing the delay?

WOW! This helps game developers to reduce the lag on a server, it’s incredible :star_struck:

1 Like

I’ve been meaning to include this since I first made the post; here’s the footage of @Alvin_Blox hitting 200+ players for the first time:

5 Likes