Improbable Icon

Multiple workers

Could someone nice explain me how do you use Workers?
I mean… I have GameLogicWorker, ClientWorker, MobileWorker…

but SpatialOS is created for making a lot of workers.
Should I make more workers as I Develop my game? Such as:

  • EnemyWorker
  • AnimalsWorker
  • GuildWorker
  • InstanceWorker
  • ChatWorker

or my thinking is wrong? xD

Hi @Wader,

I suggest you have a look at our documentation to better understand the concept of workers

But basically you would not need a worker for enemies and animals, these would be entities and any processing related to those (movement, hit detection, AI…) would be performed by the client and/or server workers

Guild information seems to be more related to either a database or as components of the player/enemy entities (e.g.: what guild is the player part of, what guilds am I a rival of, etc…)

Let me know if that made it clerer. Thanks!

I read this documentation, but it is not so obvious for me.

Still I’m not able to imagine what kind of workers should I have in my game.

I know that I need ClientWorker and server worker like UnityGameLogic to have my authoritative server.

I know that with this two workers I can make my whole game with enemies, animals, movement, etc…

but according to this documentation it seems to be wrong. Should I split my logic into other server workers?
Are you able to provice me some abstract examples?

“I know that with this two workers I can make my whole game with enemies, animals, movement, etc…”

You can. What part of the documentation made you think otherwise?

Think of the client worker as your player computer and the UnityGameLogic worker as a server, keep in mind that this are very broad generalizations though, but they’ll serve for now.

So the UnityGameLogic is responsible for all the processing server-side, things like player movement validation and synchronization, hit detection, health validation and updates, power up enabling/disabling, spawning/respawning, etc…

If the scale of your game is too big, you may hit a processing bottleneck on your UnityGameLogic. This is when you split your login between two or move UnityGameLogic workers. However, when you first start developing your game one single UnityGameLogic worker should be more than enough.