Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Nudge Time Process #314

Merged
merged 31 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
84095b5
gather samples
elementbound Oct 18, 2024
c368cf5
discipline clock
elementbound Oct 19, 2024
cabb22d
refactor clock
elementbound Oct 19, 2024
58ab728
move to network time sync
elementbound Oct 19, 2024
cc07c4a
track rtt and jitter
elementbound Oct 19, 2024
58b6e2c
signals and variables
elementbound Oct 20, 2024
8d7ca4e
project settings
elementbound Oct 22, 2024
0583907
fxs
elementbound Oct 22, 2024
8b52646
update sync_to_physics
elementbound Oct 22, 2024
30509ca
configurable clock stretch
elementbound Oct 22, 2024
dd2532c
detect pauses in editor
elementbound Oct 22, 2024
8f9406e
add docs
elementbound Oct 22, 2024
e72a926
improve docs
elementbound Oct 22, 2024
4f0fcd0
fxs
elementbound Oct 22, 2024
a5d94c0
bv
elementbound Oct 22, 2024
b7dcb1d
fix initial adjust wrongly treated as stall
elementbound Oct 23, 2024
8e2bf24
adjust logs
elementbound Oct 23, 2024
4f29d07
update nts docs
elementbound Oct 23, 2024
47636a0
adjust doc wording
elementbound Oct 23, 2024
17e46d4
update network time docs
elementbound Oct 23, 2024
5eed981
add deprecate docs
elementbound Oct 23, 2024
98c4119
restore scene tree pause detection
elementbound Oct 23, 2024
1ed1528
restore trace logs
elementbound Oct 23, 2024
86881c4
log initial timestamp times
elementbound Oct 23, 2024
2911615
more logging
elementbound Oct 30, 2024
f7a0954
clamp sync interval
elementbound Oct 30, 2024
e895c8e
adjust offset weight function
elementbound Oct 31, 2024
39fb7e5
move to ring buffer and add logs
elementbound Nov 2, 2024
6426fd0
adjust weight function
elementbound Nov 2, 2024
243a2ce
drop in-flight samples on panic
elementbound Nov 2, 2024
4cb5cc6
fxs
elementbound Nov 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/netfox.extras/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="netfox.extras"
description="Game-specific utilities for Netfox"
author="Tamas Galffy"
version="1.9.2"
version="1.10.0"
script="netfox-extras.gd"
2 changes: 1 addition & 1 deletion addons/netfox.internals/logger.gd
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static func for_extras(p_name: String) -> _NetfoxLogger:
static func make_setting(name: String) -> Dictionary:
return {
"name": name,
"value": LOG_MIN,
"value": LOG_DEBUG,
"type": TYPE_INT,
"hint": PROPERTY_HINT_ENUM,
"hint_string": "All,Trace,Debug,Info,Warning,Error,None"
Expand Down
2 changes: 1 addition & 1 deletion addons/netfox.internals/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="netfox.internals"
description="Shared internals for netfox addons"
author="Tamas Galffy"
version="1.9.2"
version="1.10.0"
script="plugin.gd"
34 changes: 34 additions & 0 deletions addons/netfox.internals/ring-buffer.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
extends RefCounted
class_name _RingBuffer

var _data: Array
var _capacity: int
var _size: int = 0
var _head: int = 0

func _init(p_capacity: int):
_capacity = p_capacity
_data = []
_data.resize(p_capacity)

func push(item):
_data[_head] = item

_size += 1
_head = (_head + 1) % _capacity

func get_data() -> Array:
if _size < _capacity:
return _data.slice(0, _size)
else:
return _data

func size() -> int:
return _size

func is_empty() -> bool:
return _size == 0

func clear():
_size = 0
_head = 0
2 changes: 1 addition & 1 deletion addons/netfox.noray/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="netfox.noray"
description="Bulletproof your connectivity with noray integration for netfox"
author="Tamas Galffy"
version="1.9.2"
version="1.10.0"
script="netfox-noray.gd"
19 changes: 17 additions & 2 deletions addons/netfox/netfox.gd
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,23 @@ var SETTINGS = [
{
# Time to wait between time syncs
"name": "netfox/time/sync_interval",
"value": 1.0,
"type": TYPE_FLOAT
"value": 0.25,
"type": TYPE_FLOAT,
"hint": PROPERTY_HINT_RANGE,
"hint_string": "%s,2,or_greater" % [_NetworkTimeSynchronizer.MIN_SYNC_INTERVAL]
},
{
"name": "netfox/time/sync_samples",
"value": 8,
"type": TYPE_INT
},
{
"name": "netfox/time/sync_adjust_steps",
"value": 8,
"type": TYPE_INT
},
{
# !! Deprecated
# Time to wait between time sync samples
"name": "netfox/time/sync_sample_interval",
"value": 0.1,
Expand All @@ -50,6 +58,13 @@ var SETTINGS = [
"value": false,
"type": TYPE_BOOL
},
{
"name": "netfox/time/max_time_stretch",
"value": 1.25,
"type": TYPE_FLOAT,
"hint": PROPERTY_HINT_RANGE,
"hint_string": "1,2,0.05,or_greater"
},
# Rollback settings
{
"name": "netfox/rollback/enabled",
Expand Down
Loading