Improbable Icon

Scaling users



Hi all.

I am getting started using Spatial OS and going though the tutorials so far. I have a question.

If I want to have multiple users in a small space, is that possible, using the worker threads ?
Such that if there are too many users in a small space, then SpatialOS will spawn more workers ?

Will this scaling also handle multiple VR users ?



Hi @kasper.jensen,

So the short answer to most of your questions is yes, but it’s actually a lot more complicated than that. Multiple users is a small space is definitely something you can do. Obviously the point where problems may arise is when you try to pack more and more users in there. There are a few different places that this kind of scaling could run into issues. The more players there are, the more entities there are in a small area that all of the players (and server workers authoritative over that space) need to check out. This could create more demand on the graphics side (drawing all the players), the memory side, and/or network side if there are lots of updates that need to be sent.

Some of that is going to be the same even for many clients connecting across the expanses of your world, so I’ll try to be a bit more specific to smaller spaces. The first thing to keep in mind is that while we can scale the server side with many workers dividing up the load, the same cannot be done for clients. So you always need to keep in mind that the total amount of stuff happening within any one area that a player can see can never exceed the processing/network capabilities of any one user.

The next bit touches on “can SpatialOS spawn more workers”. So currently the answer for this is no. However, instead the way we handle this (depending on which load balancing method you choose) is to have a fixed number of workers, but the regions they are authoritative over will shift depending on the load they experience. So functionally this will solve the same problem, as if there is a greater density of players in one area, the workers’ positions and boundaries can shift to account for that. You can read more load balancing here.

All of this said, it is worth mentioning that from a distributed computing perspective, the perfect distribution of players and other load is just uniform across the board. SpatialOS essentially is stitching together multiple instances of game engines on the back end, and while we’ve done a lot to make this as seamless as possible, those boundaries will be one of the places you might notice when you push density to the limits.

I can’t really give you a figure for how many entities or players to expect, it really depends a lot on what you are trying to do. The best way to figure it out is to try it out, and see if what you are getting makes sense. And we can help along the way when it comes to making design decisions that will improve the scale-ability of your game.

As for VR, there is no technical reason that VR would be any less able to work with SpatialOS than any other form of game development. Generally good practices for other multiplayer VR games should apply equally here as well.


Hi @Kevin

Thanks a lot for the good explanation. I appreciate the more in depth explanation about how SpatialOS works.

I am dealing with VR so happy to hear that its the same issues, and yes makes sense that clients have a limit as well, which I forgot to think about :).

I am sure I have more questions following this as I continue, and thanks again



Hi @Kevin

I have another question. Let me know if it should be in another thread.

Do you have any file size limit on the upload file size ?



Hi @kasper.jensen,

There is not a specific limit on the file upload size, for whatever ideas you have in mind this probably won’t be the issue. You’ll probably need to be more worried about load times from your asset sizes etc. getting too big.