summaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
Diffstat (limited to 'game')
-rw-r--r--game/script.rpy13
1 files changed, 5 insertions, 8 deletions
diff --git a/game/script.rpy b/game/script.rpy
index c479932..63c7071 100644
--- a/game/script.rpy
+++ b/game/script.rpy
@@ -32,27 +32,24 @@ label start:
# Initial configuration
call prestart
- #"We shall now begin testing a websocket"
+ # Run updater
+ $ renpy.invoke_in_thread(GAME_UPDATER)
+
+ # Estabilish the connection to server
python:
try:
- # server, sock, address
- # on_open=None, on_message=None, on_error=None,
- # on_close=None, on_ping=None, on_pong=None,
- # on_data=None):
renpy.invoke_in_thread(supervisor, persistent.ssl_enabled)
except:
# Enter in infinite loop, this will never resolve
stdout("Unrecoverable error, the program is dead.")
tr_load=False
+ # Block the main thread until the socket connection is done
while not tr_load:
sdelay()
$ stdout("Connection established!")
- # Run updater
- $ renpy.invoke_in_thread(GAME_UPDATER)
-
# Open game
scene bg town with Dissolve(0.3)
pause 0.1