This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Testing & Troubleshooting

How to test and find bugs?
  • Menu -> gameplay vs gameplay and ElympicsConfig.DevelopmentMode

Local Server With Bots

  • How to turn on
  • Fast testing - 1 editor to check gameplay
  • Special IElympics values
  • IClientHandler.OnClientsOnServerInit
  • What won’t be tested
    • Lag
    • Missing inputs / snapshots
    • State deserialization and ValueChanged
    • etc.

Half Remote

  • How to set ParrelSync
  • Lag settings
  • Test players data
  • Connection options

Full online

  • DebugOnlinePlayer
  • ElympicsLobbyClient
  • Connecting flow with logs and possible errors

1 - Common problems

Common problems that might occur during development

Common problems

My inputs seem to work for a split second, but then they are reversed

Example: you press a spacebar, the player jumps for a few miliseconds but then teleports back to the ground.

This usually happens when you modify the game state immediately on player input, instead of sending your input through the IInputHandler. This causes the server to overwrite your local changes on the next tick.

The input is jittery and feels unresponsive

Example: you press a spacebar and sometimes the player jumps, but sometimes this input is ignored.

Inputs are collected in IInputHandler during Elympics Update, which happens during FixedUpdate, not every frame! This means that you should avoid using methods like GetKeyDown or GetKeyUp.

Reconciliation happens every frame and kills my framerate

Example: the game starts and the framerate immediately drops and in the console window I see a lot of “Reconcilation” warnings

Your client is probably trying to predict something that is not predictable for them, like other player movements. Only use prediction on objects you control, or objects no one controls.

My input is visible in my game, but not for other players

Example: I press a spacebar and I see myself jump, but other players don’t see this.

Either you don’t send your input through IInputHandler or you don’t synchronize its effects. Every input has to be sent using IInputHandler, and the code that applies it in IInputHandler must modify a custom ElympicsVar or a synchronised component on a ElympicsBehaviour, like rigidbody or transform.

The same object has different positions on connected clients

Example: two players ale playing football and the ball has a different position for everyone

This basically means that the position of this object is not synchronised. This can happen for a couple of reasons:

  1. This object doesn’t have an ElympicsBehaviour component
  2. This object has an ElympicsBehaviour component, but doesn’t have position synchronisation turned on
  3. You have some custom logic that moves the object that is not a synchronised input (see “My input is visible in my game, but not for other players”)
  4. You instantiated an object without using ElympicsInstantiate
  5. You tried to add the ElympicsBehaviour component dynamically to an existing object - this is not supported
  6. You created a new ElympicsVar instance after scene initialization - this is not supported