Repository navigation
Summary
After starting with a large-scale rewrite of the internals, and an even longer period of improvements, we're excited to finally bring the next netfox release!
As it's becoming a trend, this release brings a monstrous 80 commits, of which 16 add something new, and a whopping 40 commits' worth of bugfixes.
Rollback No More, aka. FPS netcode
In addition to rollback, there were extensive community discussions around implementing something more suitable for FPS netcode, much similar to how Counter Strike works.
Thanks to @TuysuzTavsan's work, there's now an experimental branch that implements FPS netcode for netfox! The branch's current state is packaged and included in this release for use:
netfox.rnm.zipnetfox.noray.rnm.zipnetfox.extras.rnm.zipnetfox.docs.rnm.zip
Warning
This branch is still experimental. While it is usable for development, there is no documentation yet. Feedback is much appreciated! If possible, please join the discussion on the Discord thread.
Highlights
More servers for your servers
After reading more about Godot's concept of Servers and RIDs, and using its navmesh feature, it clicked instantly.
Godot implements low-level features and exposes them via servers. These are verbose and not very convenient to use by themselves. However, they provide extensive control over what happens and where.
On the other end, Godot provides Nodes, which are easy and convenient, and talk to the servers directly.
Applying the same pattern to netfox unlocked quite a few exciting opportunities, such as respecting tree-order when running _rollback_tick(). This rewrite also unlocked multiple changes that were possibly previously as well, just not as approachable. With servers present, you can now register arbitrary methods to run in rollback, not just _rollback_tick(). It also means all the rollback-related data is centralized, making it easier to access and manipulate.
Frankly, all the changes this unlocks is difficult to list. But if you see a cool new feature in this or the next releases, there's a 85% change it is possible because of the server rewrite 😄
Scheming times
The chase for bandwidth improvement continues! This release introduces schemas, which let you customize how each property is turned into bytes and back.
While Godot's default format works for generic data, it needs to include multiple bytes' worth of header per property, so it knows how to interpret the data when parsing it. For multiplayer games, you often know the type of the data in advance. Specifying the data types using schemas lets you avoid a header for each property.
And if you know you don't need full precision, you can also use smaller data types for the same data.
And with custom schemas, you can also transmit data types that were not possible before, like custom objects and resources.
Best of all, it all happens under the hood! All you need to do is register your schema, and the rest is taken care of!
Predicted future
Projectiles are usually a separate class of entity in netcode - there's often many of them, and they behave very predictably. Due to the quantity it's not always feasible to synchronize them. Thankfully, them being very predictable, they don't need to be synchronized! Each peer can predict their motion.
This is exactly what the new PredictiveSynchronizer enables! Use it the same way as a RollbackSynchronizer, with the only difference that no data is sent over the wire.
Now you see me, now you don't
With rollback, your game is doing straight up time travel to update the game with newly arrived inputs or state. However, travelling back in time means we may go back to a time where certain nodes didn't exist! Or, some nodes that don't exist currently, have existed in the past we're resimulating.
This is where liveness tracking comes in! In this new release, netfox now tracks what existed and when, and de/activates nodes as needed. It also frees nodes that have been nonexistent for long enough!
Down to the details
While the docs have included guides, it did not include exact function signatures, or even just a list of properties and methods. No more shall we endure this missing content! The online docs now include a class reference, where every single netfox class is listed, with all of their signals, methods, and properties enumerated and cross-linked.
What's Changed
- feat: Schemas by @gk98s in #535
- fix: Adjust internal tickrate on mismatch instead of project setting by @immails in #547
- deps: Upgrade vest to 1.10.4 by @elementbound in #548
- doc: Add physics query workaround by @SchnozzleCat in #546
- fix: Prevent autoload order changing on project startup by @aagrieve in #550
- fix: Prevent crash on exit in _RollbackHistoryTransmitter by @AlphaWolf69-u in #551
- feat: PredictiveSynchronizer by @albertok in #533
- feat: Network Commands by @elementbound in #565
- feat: NetworkIdentifiers by @elementbound in #566
- doc: Fix docs link in netfox.noray README by @elementbound in #569
- doc: Nitro Turtles by @elementbound in #568
- feat: Implement synchronizer logic as servers by @elementbound in #549
- fix: Prevent dirty read when server restart by @PolygonT in #572
- chore: Update Rapier physics drivers for v0.8.26 by @Andicraft in #552
- feat(game): Integrate nohub by @elementbound in #520
- chore: Linting by @elementbound in #575
- chore: Remove the Rollback Debugger example by @elementbound in #577
- feat: Rollback liveness by @elementbound in #574
- feat: Merge schema by @elementbound in #579
- doc: Generated class reference by @elementbound in #580
- fix: Handle StateSynchronizer freeing by @elementbound in #581
- fix: Flush network IDs by @elementbound in #583
- fix: Avoid failed to ensure snapshot errors by @elementbound in #584
- doc: Remove ?si suffix from external tutorial links by @elementbound in #585
- doc: Clarify RewindableStateMachine sibling status by @TuysuzTavsan in #587
- feat: Support nested RollbackSynchronizers by @TuysuzTavsan in #586
- fix: Restore prediction flag by @elementbound in #590
- fix: Remove redundant register from PredictiveSynchronizer by @elementbound in #592
- fix: Use correct RRNG state by @elementbound in #593
- fix: Use correct hex constant for flag bit in VariableBitsetSerializer by @domsl in #596
- doc: Kick and Hide by @elementbound in #598
- doc: FAQ by @elementbound in #599
- fix: Prevent crash on free when RBS is not last node by @elementbound in #600
- fix:window tiling edge cases by @albertok in #603
- fix: Keep local Network Identities on connect by @elementbound in #604
- feat: Packet size limit by @elementbound in #605
- chore: Cleanup peer identity data on disconnect by @elementbound in #606
- perf: Don't re-sort simulated nodes on every loop by @elementbound in #607
- feat: Null-terminated string serializer by @elementbound in #608
- chore: Add VS and VSCode to directories to .gitignore by @HanifNaOH in #609
- doc: Changelogs by @elementbound in #611
- feat: InterpolationServer by @albertok in #602
- fix: varuint serializer overflow by @aromancev in #615
- fix: Merge incoming state on top of existing by @aromancev in #616
- fix: Safer deregister on rollback-predictive-synchronizers by @TuysuzTavsan in #623
- docs(faq): Determinism and cheating by @elementbound in #625
- fix: Record inputs after gathering in
after_tickby @TuysuzTavsan in #614 - feat: Durable spawn tick for synchronizer nodes by @aromancev in #620
- fix: Fix per-physics-step tick jitter under sync_to_physics by @sk0pega in #626
- fix: Use transfer mode in command server by @aromancev in #628
- feat: Global toggle for InterpolationServer by @TuysuzTavsan in #627
- fix: More accurate diff states by @aromancev in #618
- feat(game): Dedicated server bootstrap by @orcist in #635
- fix: Call
_physics_rollback_tick()with correct tick by @jburdecki in #633 - fix: Avoid extra simulation on spawn by @aromancev in #634
- fix: Finish physics driver touchup by @comminux in #639
- fix(game): Don't update brawler material if not available by @elementbound in #642
- fix(game): Don't spawn for server on listen by @elementbound in #650
- perf: Improve snapshot performance restore by @albertok in #641
- refactor: Use physics server for NetworkRigidBody state by @realpoke in #651
- fix: Emit synchronization state only after merging into history by @realpoke in #649
- feat: Add per-tick callback to NetworkRigidBody by @realpoke in #646
- doc: Edgegap by @elementbound in #652
- fix: Interpolate clock stretch factor in log space by @realpoke in #644
- fix(game): Use the logger
warningmethod by @elementbound in #653 - fix: Reset tick-indexed state on NetworkTime.stop() by @louisbels in #654
- fix:
_Snapshot.sanitize()to erase correct subject by @GlenshC in #655 - fix: Look up rapier physics states by cached tick tag by @realpoke in #647
- chore: Add missing types by @Orcolom in #664
- chore(ci): Run tests on multiple Godot versions by @elementbound in #673
- fix: Default interpolator was an empty Callable by @louisbels in #658
- fix: Handle error replies to noray connect command by @armadavalor in #666
- fix: Prevent resimulating physics ticks before bodies existed by @realpoke in #645
- fix: Re-anchor the whole clock after a stall, not just the tick by @louisbels in #657
- fix: recover rollback after main-thread stalls by @upalvstavai in #662
- perf: Improve save and restore hotpaths by @albertok in #660
- doc: More Special Thanks contributors by @elementbound in #679
- chore: Remove @experimental tag from RewindableActions by @elementbound in #680
New Contributors
- @immails made their first contribution in #547
- @SchnozzleCat made their first contribution in #546
- @aagrieve made their first contribution in #550
- @AlphaWolf69-u made their first contribution in #551
- @PolygonT made their first contribution in #572
- @Andicraft made their first contribution in #552
- @domsl made their first contribution in #596
- @HanifNaOH made their first contribution in #609
- @aromancev made their first contribution in #615
- @sk0pega made their first contribution in #626
- @orcist made their first contribution in #635
- @jburdecki made their first contribution in #633
- @comminux made their first contribution in #639
- @realpoke made their first contribution in #651
- @louisbels made their first contribution in #654
- @GlenshC made their first contribution in #655
- @Orcolom made their first contribution in #664
- @armadavalor made their first contribution in #666
- @upalvstavai made their first contribution in #662
Full Changelog: v1.35.3...v1.49.12