Edyn v1.1.0
This version continues the development of networked physics, now providing better ways to handle inputs.
The concept of transient components has been eliminated in favor of marking components as dirty and including them in the next few snapshots to decrease the probability that these data changes would never reach the server due to packet loss. Input components should now be derived from edyn::network_input
and be marked as dirty whenever they change to ensure they'll be included in the next few snapshot packets.
Actions are a new feature, which are one-shot inputs that are accumulated over an update and then included into an action history that is sent to the server in every registry snapshot. This decreases the probability that inputs would be lost due to a registry snapshot packet being lost, since the next packet will contain the actions that happened in the previous. Regular components are still useful for idempotent inputs, but actions should be used for one-shot inputs (e.g. firing a gun or shifting gears in a vehicle). See the User Manual for further details.
On top of that, a few other changes and fixes were made:
- Fix glitch with soft contacts.
- Fix issues with sensors (i.e. bodies which participate in collision detection but receive no collision response).
- A custom merge function can be written to be invoked when a component moves from one registry to another.
- Serialization function not necessary for empty types.
Networked physics is something that's quite difficult to get right so the next releases should also bring more improvements to this section of the library. Enjoy! 🚀