diff --git a/tests/test_net_lands.gd b/tests/test_net_lands.gd index 676e8c5..e636559 100644 --- a/tests/test_net_lands.gd +++ b/tests/test_net_lands.gd @@ -53,8 +53,11 @@ func _run() -> void: Net.arrived.connect(func(l): _arrived = l) for d in [SRV, BOBS]: _rm_tree(d) - _spawn(["--server", "--port", str(PORT), "--config", SRV + "/server.json", - "--server-name", "Lands Test", "--seed", str(SEED), "--debug-cheats", "--no-creatures"]) + # (EMBERWILD_SERVER_BIN=: the hub, and the land servers + # it starts, are that build: checks a release does it too.) + _spawn(["--server", "--port", str(PORT), "--config", ProjectSettings.globalize_path(SRV + "/server.json"), + "--server-name", "Lands Test", "--seed", str(SEED), "--debug-cheats", "--no-creatures"], "", + OS.get_environment("EMBERWILD_SERVER_BIN")) await _sleep(4.0) await _body() if world != null and is_instance_valid(world): @@ -370,15 +373,17 @@ func _bob_result(n: int, limit: float) -> Dictionary: var d: Variant = JSON.parse_string(FileAccess.get_file_as_string(path)) if FileAccess.file_exists(path) else null return d if d is Dictionary else {"error": "Bob gave no answer to command %d" % n} -func _spawn(user_args: Array, script: String = "") -> int: - var args := PackedStringArray(["--headless", "--path", ProjectSettings.globalize_path("res://")]) +func _spawn(user_args: Array, script: String = "", bin: String = "") -> int: + var args := PackedStringArray(["--headless"]) + if bin.is_empty(): + args.append_array(["--path", ProjectSettings.globalize_path("res://")]) if not script.is_empty(): args.append_array(["--script", script]) args.append("--") for x in user_args: args.append(str(x)) args.append_array(["--exit-with", str(OS.get_process_id())]) - var pid := OS.create_process(OS.get_executable_path(), args) + var pid := OS.create_process(OS.get_executable_path() if bin.is_empty() else bin, args) _pids.append(pid) return pid diff --git a/tools/site/index.html b/tools/site/index.html index 9d5bb9c..2b23f65 100644 --- a/tools/site/index.html +++ b/tools/site/index.html @@ -101,9 +101,13 @@

Playing with friends

Choose Host Game on the title screen, and friends choose Join Game - with your address (UDP port 24242). Everyone needs the same version. A spare - computer can run a dedicated server from the same download: - Emberwild --headless -- --server.

+ with your address (UDP port 24242). Everyone needs the same version. On the same + network, or over Tailscale, that's all. For friends over the internet, forward + UDP 24242 and 24243 on your router: the Cove runs as its own server on the + next port, started when someone first goes there. A spare computer can run a + dedicated server from the same download: + Emberwild --headless -- --server. + More in the guide.