Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/h33p/unet-controller
A CharacterController based controller for Unity's new Networking system
https://github.com/h33p/unet-controller
movement multiplayer unity3d
Last synced: about 1 month ago
JSON representation
A CharacterController based controller for Unity's new Networking system
- Host: GitHub
- URL: https://github.com/h33p/unet-controller
- Owner: h33p
- License: mit
- Created: 2016-09-16T15:10:30.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-10-26T09:57:00.000Z (about 6 years ago)
- Last Synced: 2024-08-12T21:28:01.318Z (4 months ago)
- Topics: movement, multiplayer, unity3d
- Language: C#
- Size: 9.1 MB
- Stars: 94
- Watchers: 20
- Forks: 21
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# A CharacterController based controller for use in Unity's new Networking system.
## End-of-life
#### The (player movement part of the) project does not fully work with Unity 2018.2+ and is not fully programmed in data-oriented, entity component based design, which is the future of the engine. There will not be any feature improvements to the code, apart from occasional bug fixes caused by the engine updates. The code will stay as a basic logic of client-side predicted, server-side authoritative networking system. Forks are welcome.###### Features
- Client-side prediction.
- Client-side reconciliation.
- Interpolation.
- Snapping to grid in order to suppress floating point nature.
- Relatively low overhead.
- Quake-like strafing. But most likely very incomparable.
- Crouching.
- Animations.
- Network data analyzer to compare the results between the server and the client.
- First person and third person camera.
- Sliding of steep surfaces.
- Ability to set AI target (basic, moves straight towards the target).
- Recording and playing back gameplay.
- Foot IK.
- Ragdoll.
- Lag compensation (WIP).###### Performance (On 2015 MacBook Pro with quad-core i7)
- Up to 1 millisecond on server every time a network update happens.
- Up to 1 millisecond on client every time a network update happens. Sometimes it jumps a bit higher if there are a lot of inputs to replay during reconciliation. That is due to high latency.
- Very small overhead on non local clients moving.
- GC allocations 80 bytes per player. This is due to CharacterController.
- Way higher GC allocations on the server side (and while recording gameplay for that matter), due to the need of storing history of the objects for lag compensation.###### How does it run fast
- It moves character only when network update occurs and then interpolate until the next network update in LateUpdate.
- Efficiend data reusing with as least locals as possible (as they cause GC allocations).###### Current issues
- Update Once and Lerp mode does not work well with the update rates over 50hz. Use lower send rate or a higher one with Update Once mode.##### TODO
- Add jumping between updates so jumping would feel good even on small update periods.
- Complete lag compensation.
- Fix issues.