M2.2: player bodies, name tags, shared island and checked movement
- Joining loads the server's island (seed, spawn, clock); the server generates the same terrain from its seed and keeps a world clock that pauses when empty - Other players are procedural low-poly characters in their chosen colours with name tags (hidden by walls, fading with distance), walk/run/swim animation and held items - Movement: local and instant, sent at 20 Hz stamped with the sender's clock; the server refuses impossible moves (speed, rising, leaving the island, underground) and sends the player back; flagged respawns allowed - Avatars drawn 100 ms behind and interpolated, with brief extrapolation - Online: no pausing, player list in the Esc menu, Disconnect back to the title (with the reason); animals off and world changes local-only until M2.3-M2.5, shown on the HUD - test_net_world: real server + walking and cheating bots at 100 ms +/- 30 ms simulated latency (27 checks)
This commit is contained in:
@@ -69,9 +69,13 @@ var _heights := PackedFloat32Array()
|
||||
var _normals := PackedVector3Array()
|
||||
|
||||
func _ready() -> void:
|
||||
# A saved world brings its own seed; otherwise keep the exported default.
|
||||
# On a server, its seed; in a saved world, that world's seed; otherwise
|
||||
# keep the exported default.
|
||||
var net := get_node_or_null("/root/Net")
|
||||
var saves := get_node_or_null("/root/Saves")
|
||||
if saves != null and saves.has_world():
|
||||
if net != null and net.state == "connected" and net.world_info.has("seed"):
|
||||
noise_seed = int(net.world_info.seed)
|
||||
elif saves != null and saves.has_world():
|
||||
noise_seed = saves.world_seed()
|
||||
_build()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user