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
- What won’t be tested
- Missing inputs / snapshots
- State deserialization and ValueChanged
- How to set ParrelSync
- Lag settings
- Test players data
- Connection options
- Connecting flow with logs and possible errors
1 - Common problems
Common problems that might occur during development
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 only way for a player to modify the game state is through Player Inputs, sent and received via
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
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:
- This object doesn’t have an ElympicsBehaviour component
- This object has an ElympicsBehaviour component, but doesn’t have position synchronisation turned on
- 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”)
- You instantiated an object without using ElympicsInstantiate
- You tried to add the ElympicsBehaviour component dynamically to an existing object - this is not supported
- You created a new ElympicsVar instance after scene initialization - this is not supported