make systems more stable by:
- fix wobbly, by doing CompSync and TimeSync in same ecs system
- dont interpolate on voxygen
- sync PhysState to the client in order to get rid of the jump snap to ground bug
- make the simulate_ahead more constant over time, as "jumps" in this number will be noticed by the client as "lag jumps"
There are still some problems
- [ ] Snap to the ground on jump isn't fixed completly, as we depend on tick n-1 and we only sync tick n to the client
- [ ] Arrows dont work properly yet with this commit, e.g. right click arrow attack
- [ ] Verify that clientcommands are actually broadcasted to all clients
- [ ] Followup: Agent needs to send clientcommands rather than commands
current problems:
- [X] time was wiggling to much
=> resolved, we state.ticked twice per client.tick
- [ ] Jump Reset to 0, see issue #1512
=> Jump z reset to 0 after 200ms (time ahead) for 1 tick, on_ground is one tick behind JumpEvent, could be disabled by modifying common/state/src/state.rs handle_jump if condition remove on_ground check
- [ ] X/Y wiggle which looks like this -/'\,/-
=> The error actually persists in the last 1 before we receive no data from server /''''*\
=> The error exist equally in X and Y regardless of direction
=> The error already exsits before we apply the state.tick or state.rewind_tick, so it maybe comes from server via sync ?
- [X] Cant look around when holding the admin staff
=> we used Dir::new() which was 0/1/0 and due to normalizing limited the final range to around 5 degree
- [X] Slower when zommed in than when zoomed out
=> fixed by the look_dir fix above :)
- make tracy experience better by adding a 0.05 to client local TIME.
- fix an error that the look_dir was wrongly predicted
- add a jump graph for testing
- update in_game code that was commented out in system
- track the simulation ahead on the debug menu
- add simulated lag with `sudo tc qdisc replace dev lo root netem delay 700ms 10ms 25%`
add basic tests for phys
This is needed (for now) in order to parallelize ingame_chat, because
one of the handled messages updates this value on the server. It turns
out that the value is not actually used on the server, only the client,
so this was mostly a matter of threading this back to the correct place.
Additionally, we took the opportunity to modify the UI to not log you
into the game until your character was confirmed to be loaded, which
was a todo item that lets us simplify some error handling logic and
remove stuff from global state.
As a side effect, this moves the initial game server sync message into
the login code, since that's the first place we can check for admin
permissions and we want to avoid sending large messages to users who are
not authenticated (especially if the player cap has been reached;
previously, the player cap check limited the damage that could be done
by unauthenticated players).
Some fallout from this is that we don't synchronize the Player component
anymore, which had some minor effects on voxygen. This update also
breaks Torvus, since Client::new now expects the username and password
to be provided from the getgo--an accompanying MR will be submitted to
fix it.
* Properly set view_distance field in Client when sending it to the
server in request_character/request_spectator.
* Removed invalid check I had included in Client::set_view_distance
* ViewDistances::clamp now clamps min to 1 for both types of view distance.