From 58be256f8aaa6273329f0f63aa5c8b20a7fd9029 Mon Sep 17 00:00:00 2001 From: Dorian Pula Date: Thu, 17 Dec 2020 14:02:51 -0500 Subject: [PATCH] Fix issues with starting up the game. --- README.md | 4 ++++ fixed-size.html | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9699e07..ffd46f6 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,10 @@ Godot devs) can be found between the `` and * [Calling JS from the HTML5 Export][js-from-godot] * [Using a Custom HTML Shell][custom-html-shell] * [Custom Fixed Size Shell template][custom-fixed-size-template] +* Some minor tweaks are needed to work the custom shell with Godot 3.2: + * Remove the line: `const EXTRA_ARGS = JSON.parse('$GODOT_ARGS');` + * Update the starting of game engine by removing `EXTRA_ARGS` from `engine.startGame(EXECUTABLE_NAME, MAIN_PACK, EXTRA_ARGS).then(() => {` making it + `engine.startGame(EXECUTABLE_NAME, MAIN_PACK).then(() => { [demo]: https://games.birch-tree.net/godot-html-js-integration-demo/ [js-from-godot]: https://docs.godotengine.org/en/stable/getting_started/workflow/export/exporting_for_web.html#calling-javascript-from-script diff --git a/fixed-size.html b/fixed-size.html index 4957d19..8d190c6 100644 --- a/fixed-size.html +++ b/fixed-size.html @@ -234,7 +234,6 @@ $GODOT_HEAD_INCLUDE (function() { const EXECUTABLE_NAME = '$GODOT_BASENAME'; const MAIN_PACK = '$GODOT_BASENAME.pck'; - const EXTRA_ARGS = JSON.parse('$GODOT_ARGS'); const DEBUG_ENABLED = $GODOT_DEBUG_ENABLED; const INDETERMINATE_STATUS_STEP_MS = 100; @@ -381,7 +380,7 @@ $GODOT_HEAD_INCLUDE } else { setStatusMode('indeterminate'); engine.setCanvas(canvas); - engine.startGame(EXECUTABLE_NAME, MAIN_PACK, EXTRA_ARGS).then(() => { + engine.startGame(EXECUTABLE_NAME, MAIN_PACK).then(() => { setStatusMode('hidden'); initializing = false; }, displayFailureNotice);