Improbable Icon

SpatialOS Discourse Forums

Issue: Transform synchronization

Hi,

i am trying the set up the blank starter project with the feature module for transform synchronization. But i can’t get it to work.

Based on the documentation i tried the following steps:

  • Adding TransformSynchronizationHelper.AddClientSystems(Worker.World); in my UnityClientConnector class within the HandleWorkerConnectionEstablished method.
  • Adding TransformSynchronizationHelper.AddServerSystems(Worker.World); in my UnityGameLogicConnector class within the HandleWorkerConnectionEstablished method.
  • Adding TransformSynchronizationHelper.AddTransformSynchronizationComponents(template, serverAttribute); to my CreatePlayerEntityTemplate method for player creation.
  • Create following transform strategies

ReceiveSendStrategies

DirectReceiveStrategy

InterpolationReceiveStrategy

RateLimitedSendStrategy

RateLimitedSendStrategyGameLogic

  • Adding the transform synchronization script to the following player prefabs (capsule)

Authoritative Player

None Authoritative Player

GameLogicPlayer

At the moment i can see other player capsules and can walk with the individual players (development scene + additional client through standalone client), but the transform synchronization not working.

Any suggetions to get this to work?

Thanks in advance!

Hello Michael, how are you?

First of all, thank you for sending so many details about your setup, it really helps us to help you!

Let me ask you one more piece of information, though: Can you run your game and send a screenshot of the Transform Synchronization component both for the authoritative player and GameLogic player, also make sure to expand the info below SpatialOS by clicking on the arrow next to it? This is mine for my authoritative player while the game runs

image

I want to ensure that the Transform Synchronization component is enabled.

Hey Jay!

I’m feeling good so far. I hope you as well!

If i run my development scene, the following details are displayed:

Authorative player:

GameLogic player

I hope I haven’t missed anything totally obvious somewhere. Have really tried a lot in the meantime.

The bug was in my PlayerCreatorPipeline class. As a result, the transform was not executed correctly. Now it is working as intended. I’m sorry for the time invested!

But i have still some overall questions regarding the transform synchronization module:

  • The fps starter project does not use the module. Is there a special reason for this?
  • What is the best way to add movement validation on server side?
  • Or should you rather not use the module if you need any kind of server side validation?

Thanks!

Hey @michael.joehnke,

Apologies for the delay in a response, I was offline yesterday.

Glad to hear you got it sorted out! Can you expand what was missing on your PlayerCreatorPipeline?

Regarding your questions

  • The FPS project came before the Player Synchronization module was created

  • There are different ways of doing the server side movement validation, if you want to know more a good starting point is Gabriel Gambetta’s article on the topic of server conciliation - https://www.gabrielgambetta.com/client-server-game-architecture.html

  • Since you can read the content of the Transform Synchronization components you can definitely use it along server side validation, it is entirely up to you.

Let me know if I can help further!