feat: implement core lobby management system with Nakama integration, player state, and game settings.

This commit is contained in:
2026-03-13 03:46:04 +08:00
parent a06e04e14b
commit 74a81425c5
7 changed files with 203 additions and 18 deletions
+6 -2
View File
@@ -51,8 +51,12 @@ func connect_to_nakama_async(email: String = "", password: String = "") -> bool:
# 1. Authenticate
if email == "":
var device_id = OS.get_unique_id()
# Use a more stable ID for testing instead of randi() every call
# If you need multiple clients on one machine, consider a command line arg or config
# If running in editor or debug, append a unique suffix to allow multiple
# instances on one machine to have separate sessions.
if OS.is_debug_build():
device_id += "_" + str(Time.get_ticks_msec()) + "_" + str(randi() % 1000)
session = await client.authenticate_device_async(device_id)
else:
session = await client.authenticate_email_async(email, password)