Releases: xaroth8088/NetworkStateManager
Releases · xaroth8088/NetworkStateManager
0.0.8
0.0.7
Breaking Changes
- Several variable cases have changed
- Random number functionality is now found via
NetworkStateManager.Randominstead of being directly accessed fromNetworkStateManager
Changed
- Splits NSM into several smaller managers
- Lays the groundwork for introducing unit tests to the core functionality
- General code style and style consistency improvements
- Fixes bug where the server receives inputs, but doesn't replay to incorporate them in all cases
Added
- Adds null checks in several places
Removed
- Removes unnecessary duplicate IsHost check
- Moves many TODO's into GitHub issues
0.0.6
Breaking Changes
- Package installation now happens via git URL and manual prerequisite installation, because I couldn't get OpenUPM to work smoothly
Changed
- Updated to use Networking for GameObjects v 1.8.1
- Updated to use MemoryPack 1.10.0
Added
None
Removed
None
0.0.5
Breaking Changes
- Package installation now happens via OpenUPM, not installing a .unitypackage
- The package name has been updated, to allow compatibility with OpenUPM. If you were using a previous version of this library, you'll need to remove it before installing the new version.
Changed
- Substantial refactoring of how game state is stored and transmitted. This includes using MemoryPack to do binary serialization of all NSM-related game state.
- Network traffic is reduced by ~84% in my testing, courtesy of more efficient serialization, binary diffing, and compression
- Inputs are now managed outside the gamestate frames, because it was proving more trouble than it's worth to manage those things together
- Moved NetworkID-related logging to use NSM's verbose logger
- Moved NetworkID initialization into
NetworkIdManager - Take full control over random number generation, as external sources kept interfering with Unity's Random
- This means that you MUST use NSM for synchronization on anything random
- If it's not important for synchronization (e.g. "randomly shake the camera"), then you should probably still use Unity's RNG
- When state inconsistency is detected, the client will request a full state frame from the server, which greatly improves network reliability on spotty connections
- The
RollbackEventsevent now also passes theIGameStateobject for the frame after the rolled back state, in case it's needed to properly roll back an event - Internal simulation functions are named more descriptively, hopefully making it easier to understand what the library actually does.
- Verbose logging now includes some stack trace info, to make it easier to understand what's happening from only the log messages
Added
- Interface requirements for IGameState have changed to now require
GetBinaryRepresentation()andRestoreFromBinaryRepresentation()functions.- On the upside, you no longer have to implement
INetworkSerializable, so there's that.
- On the upside, you no longer have to implement
- Optionally send full state frames periodically
RemoveEventAtTick(), for de-scheduling an event. Usually this only really comes up when rolling back an event that itself schedules a future event.PredictInputForPlayer()function, which will predict anIPlayerInputfor a given player id.- This is needed right now to handle the case where not all inputs are present for a frame. In the future, the plan is to change things to make this unnecessary.
Removed
- Debug rollback options. These were really only intended to be used when debugging NSM itself, and are no longer needed.
0.0.4
Changed
- Major refactoring of how game events work internally. They should be substantially more reliable and predictable now.
- NetworkID management moved to
NetworkIdManagerclass, accessible throughnetworkStateManager.networkIdManager - Refactored allocation of network id's, so that they can be more easily reused (and play nicer with rollback scenarios)
- Fixed some bugs in state DTOs where
getaccessors could return an object that wasn't actually used internally - Rigidbody sleep/wake state are now sync'd (note: this may be removed later, as it's unclear if it's strictly required)
- When StateBuffer is asked for a non-existent frame, it returns the last known state before that frame instead of a blank frame
- Some event delgates have changed their signatures
- Lifecycle events asking NSM for
gameTickwill get the tick associated with the frame in progress, which may be different from the "real" game tick - Misc code cleanup and organization improvements
Added
Hello, NetworkStateManagerdemo project added.OnRollbackEventslifecycle event- Unity's Random number generator is now determistically synchronized
- Various toggles for debugging more complex rollback scenarios
networkStateManager.isReplayingcan be used to determine whether a lifecycle event is happening during normal playback or a replay scenario- Truly verbose verbose logging. Truly.
0.0.3
Fixes a problem with IGameEvent and RPCs
v0.0.2
See CHANGELOG.md for changes.