My game works perfectly fine in godot and as a widows executable but when exported to html5, I can't move my character.
The game is publicly available at https://ashir-rashid.itch.io/export-experiment
There is something fishy going on in the web console(chrome).
I exported a gui app made in goodt on itch.io which worked absolutely fine. I think the problem is in taking the keyboard input.
I've been stuck here for too long. Any help will be highly appreciated. Thanks in advance.
The console log:
[Intervention] Slow network is detected. See https://www.chromestatus.com/feature/5636954674692096 for more details. Fallback font will be used while loading: https://static.itch.io/fonts/lato-v14-latin-700.woff2
export-experiment:1 [Intervention] Slow network is detected. See https://www.chromestatus.com/feature/5636954674692096 for more details. Fallback font will be used while loading: https://static.itch.io/fonts/lato-v14-latin-regular.woff2
export-experiment:1 [Intervention] Slow network is detected. See https://www.chromestatus.com/feature/5636954674692096 for more details. Fallback font will be used while loading: https://static.itch.io/icons/fonts/icomoon.ttf?4ibnvg
export-experiment:1 [Intervention] Slow network is detected. See https://www.chromestatus.com/feature/5636954674692096 for more details. Fallback font will be used while loading: https://static.itch.io/fonts/lato-v14-latin-900.woff2
lib.js?1600863858:3 Allow attribute will take precedence over 'allowfullscreen'.
ca @ lib.js?1600863858:3
index.js:7 Godot Engine v3.2.2.stable.official - https://godotengine.org
index.js:7 OpenGL ES 2.0 Renderer: WebKit WebGL
index.js:7 OpenGL ES 2.0 Batching: ON
index.js:7
index.js:7 **WARNING**: Font oversampling only works with the resize modes 'Keep Width', 'Keep Height', and 'Expand'.
put_char @ index.js:7
index.js:7 At: scene/main/scene_tree.cpp:1153:_update_root_rect() - Font oversampling only works with the resize modes 'Keep Width', 'Keep Height', and 'Expand'.
put_char @ index.js:7
index.js:7 **ERROR**: Condition "err" is true. Returned: err
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:829:load_source_code() - Condition "err" is true. Returned: err
put_char @ index.js:7
index.js:7 **ERROR**: Cannot load source code from file 'res://Scripts//player.gd'.
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:2285:load() - Condition "err != OK" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Failed loading resource: res://Scripts//player.gd.
put_char @ index.js:7
index.js:7 At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **SCRIPT ERROR**: Parse Error: Couldn't load the base class: res://Scripts//player.gd
put_char @ index.js:7
index.js:7 At: res://Scripts/p1.gdc:1:GDScript::load_byte_code() - Parse Error: Couldn't load the base class: res://Scripts//player.gd
put_char @ index.js:7
index.js:7 **ERROR**: Method failed. Returning: ERR_PARSE_ERROR
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:801:load_byte_code() - Method failed. Returning: ERR_PARSE_ERROR
put_char @ index.js:7
index.js:7 **ERROR**: Cannot load byte code from file 'res://Scripts/p1.gdc'.
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:2281:load() - Condition "err != OK" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Failed loading resource: res://Scripts/p1.gdc.
put_char @ index.js:7
index.js:7 At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Condition "err" is true. Returned: err
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:829:load_source_code() - Condition "err" is true. Returned: err
put_char @ index.js:7
index.js:7 **ERROR**: Cannot load source code from file 'res://Scripts//player.gd'.
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:2285:load() - Condition "err != OK" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Failed loading resource: res://Scripts//player.gd.
put_char @ index.js:7
index.js:7 At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **SCRIPT ERROR**: Parse Error: Couldn't load the base class: res://Scripts//player.gd
put_char @ index.js:7
index.js:7 At: res://Scripts/p1.gdc:1:GDScript::load_byte_code() - Parse Error: Couldn't load the base class: res://Scripts//player.gd
put_char @ index.js:7
index.js:7 **ERROR**: Method failed. Returning: ERR_PARSE_ERROR
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:801:load_byte_code() - Method failed. Returning: ERR_PARSE_ERROR
put_char @ index.js:7
index.js:7 **ERROR**: Cannot load byte code from file 'res://Scripts/p1.gdc'.
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:2281:load() - Condition "err != OK" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Failed loading resource: res://Scripts/p1.gdc.
put_char @ index.js:7
index.js:7 At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **WARNING**: Couldn't load external resource: res://Scripts/p1.gd
put_char @ index.js:7
index.js:7 At: scene/resources/resource_format_text.cpp:175:_parse_ext_resource() - Couldn't load external resource: res://Scripts/p1.gd
put_char @ index.js:7
index.js:7 **ERROR**: Condition "err" is true. Returned: err
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:829:load_source_code() - Condition "err" is true. Returned: err
put_char @ index.js:7
index.js:7 **ERROR**: Cannot load source code from file 'res://Scripts//player.gd'.
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:2285:load() - Condition "err != OK" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Failed loading resource: res://Scripts//player.gd.
put_char @ index.js:7
index.js:7 At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **SCRIPT ERROR**: Parse Error: Couldn't load the base class: res://Scripts//player.gd
put_char @ index.js:7
index.js:7 At: res://Scripts/p2.gdc:1:GDScript::load_byte_code() - Parse Error: Couldn't load the base class: res://Scripts//player.gd
put_char @ index.js:7
index.js:7 **ERROR**: Method failed. Returning: ERR_PARSE_ERROR
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:801:load_byte_code() - Method failed. Returning: ERR_PARSE_ERROR
put_char @ index.js:7
index.js:7 **ERROR**: Cannot load byte code from file 'res://Scripts/p2.gdc'.
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:2281:load() - Condition "err != OK" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Failed loading resource: res://Scripts/p2.gdc.
put_char @ index.js:7
index.js:7 At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Condition "err" is true. Returned: err
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:829:load_source_code() - Condition "err" is true. Returned: err
put_char @ index.js:7
index.js:7 **ERROR**: Cannot load source code from file 'res://Scripts//player.gd'.
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:2285:load() - Condition "err != OK" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Failed loading resource: res://Scripts//player.gd.
put_char @ index.js:7
index.js:7 At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **SCRIPT ERROR**: Parse Error: Couldn't load the base class: res://Scripts//player.gd
put_char @ index.js:7
index.js:7 At: res://Scripts/p2.gdc:1:GDScript::load_byte_code() - Parse Error: Couldn't load the base class: res://Scripts//player.gd
put_char @ index.js:7
index.js:7 **ERROR**: Method failed. Returning: ERR_PARSE_ERROR
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:801:load_byte_code() - Method failed. Returning: ERR_PARSE_ERROR
put_char @ index.js:7
index.js:7 **ERROR**: Cannot load byte code from file 'res://Scripts/p2.gdc'.
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:2281:load() - Condition "err != OK" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Failed loading resource: res://Scripts/p2.gdc.
put_char @ index.js:7
index.js:7 At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **WARNING**: Couldn't load external resource: res://Scripts/p2.gd
put_char @ index.js:7
index.js:7 At: scene/resources/resource_format_text.cpp:175:_parse_ext_resource() - Couldn't load external resource: res://Scripts/p2.gd
put_char @ index.js:7
index.js:7 **SCRIPT ERROR**: Parse Error: Indented block expected after declaration of "_process" function.
put_char @ index.js:7
index.js:7 At: res://Scripts/Boss.gdc:8:GDScript::load_byte_code() - Parse Error: Indented block expected after declaration of "_process" function.
put_char @ index.js:7
index.js:7 **ERROR**: Method failed. Returning: ERR_PARSE_ERROR
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:801:load_byte_code() - Method failed. Returning: ERR_PARSE_ERROR
put_char @ index.js:7
index.js:7 **ERROR**: Cannot load byte code from file 'res://Scripts/Boss.gdc'.
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:2281:load() - Condition "err != OK" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Failed loading resource: res://Scripts/Boss.gdc.
put_char @ index.js:7
index.js:7 At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **SCRIPT ERROR**: Parse Error: Indented block expected after declaration of "_process" function.
put_char @ index.js:7
index.js:7 At: res://Scripts/Boss.gdc:8:GDScript::load_byte_code() - Parse Error: Indented block expected after declaration of "_process" function.
put_char @ index.js:7
index.js:7 **ERROR**: Method failed. Returning: ERR_PARSE_ERROR
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:801:load_byte_code() - Method failed. Returning: ERR_PARSE_ERROR
put_char @ index.js:7
index.js:7 **ERROR**: Cannot load byte code from file 'res://Scripts/Boss.gdc'.
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:2281:load() - Condition "err != OK" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Failed loading resource: res://Scripts/Boss.gdc.
put_char @ index.js:7
index.js:7 At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **WARNING**: Couldn't load external resource: res://Scripts/Boss.gd
put_char @ index.js:7
index.js:7 At: scene/resources/resource_format_text.cpp:175:_parse_ext_resource() - Couldn't load external resource: res://Scripts/Boss.gd
put_char @ index.js:7
export-experiment:1 Uncaught (in promise) DOMException: screen.orientation.lock() is not available on this device.
index.js:7 **WARNING**: Font oversampling only works with the resize modes 'Keep Width', 'Keep Height', and 'Expand'.
put_char @ index.js:7
index.js:7 At: scene/main/scene_tree.cpp:1153:_update_root_rect() - Font oversampling only works with the resize modes 'Keep Width', 'Keep Height', and 'Expand'.
put_char @ index.js:7
index.js:7 **ERROR**: Condition "err" is true. Returned: err
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:829:load_source_code() - Condition "err" is true. Returned: err
put_char @ index.js:7
index.js:7 **ERROR**: Cannot load source code from file 'res://Scripts//player.gd'.
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:2285:load() - Condition "err != OK" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Failed loading resource: res://Scripts//player.gd.
put_char @ index.js:7
index.js:7 At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **SCRIPT ERROR**: Parse Error: Couldn't load the base class: res://Scripts//player.gd
put_char @ index.js:7
index.js:7 At: res://Scripts/p1.gdc:1:GDScript::load_byte_code() - Parse Error: Couldn't load the base class: res://Scripts//player.gd
put_char @ index.js:7
index.js:7 **ERROR**: Method failed. Returning: ERR_PARSE_ERROR
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:801:load_byte_code() - Method failed. Returning: ERR_PARSE_ERROR
put_char @ index.js:7
index.js:7 **ERROR**: Cannot load byte code from file 'res://Scripts/p1.gdc'.
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:2281:load() - Condition "err != OK" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Failed loading resource: res://Scripts/p1.gdc.
put_char @ index.js:7
index.js:7 At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Condition "err" is true. Returned: err
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:829:load_source_code() - Condition "err" is true. Returned: err
put_char @ index.js:7
index.js:7 **ERROR**: Cannot load source code from file 'res://Scripts//player.gd'.
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:2285:load() - Condition "err != OK" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Failed loading resource: res://Scripts//player.gd.
put_char @ index.js:7
index.js:7 At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **SCRIPT ERROR**: Parse Error: Couldn't load the base class: res://Scripts//player.gd
put_char @ index.js:7
index.js:7 At: res://Scripts/p1.gdc:1:GDScript::load_byte_code() - Parse Error: Couldn't load the base class: res://Scripts//player.gd
put_char @ index.js:7
index.js:7 **ERROR**: Method failed. Returning: ERR_PARSE_ERROR
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:801:load_byte_code() - Method failed. Returning: ERR_PARSE_ERROR
put_char @ index.js:7
index.js:7 **ERROR**: Cannot load byte code from file 'res://Scripts/p1.gdc'.
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:2281:load() - Condition "err != OK" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Failed loading resource: res://Scripts/p1.gdc.
put_char @ index.js:7
index.js:7 At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **WARNING**: Couldn't load external resource: res://Scripts/p1.gd
put_char @ index.js:7
index.js:7 At: scene/resources/resource_format_text.cpp:175:_parse_ext_resource() - Couldn't load external resource: res://Scripts/p1.gd
put_char @ index.js:7
index.js:7 **ERROR**: Condition "err" is true. Returned: err
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:829:load_source_code() - Condition "err" is true. Returned: err
put_char @ index.js:7
index.js:7 **ERROR**: Cannot load source code from file 'res://Scripts//player.gd'.
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:2285:load() - Condition "err != OK" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Failed loading resource: res://Scripts//player.gd.
put_char @ index.js:7
index.js:7 At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **SCRIPT ERROR**: Parse Error: Couldn't load the base class: res://Scripts//player.gd
put_char @ index.js:7
index.js:7 At: res://Scripts/p2.gdc:1:GDScript::load_byte_code() - Parse Error: Couldn't load the base class: res://Scripts//player.gd
put_char @ index.js:7
index.js:7 **ERROR**: Method failed. Returning: ERR_PARSE_ERROR
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:801:load_byte_code() - Method failed. Returning: ERR_PARSE_ERROR
put_char @ index.js:7
index.js:7 **ERROR**: Cannot load byte code from file 'res://Scripts/p2.gdc'.
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:2281:load() - Condition "err != OK" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Failed loading resource: res://Scripts/p2.gdc.
put_char @ index.js:7
index.js:7 At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Condition "err" is true. Returned: err
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:829:load_source_code() - Condition "err" is true. Returned: err
put_char @ index.js:7
index.js:7 **ERROR**: Cannot load source code from file 'res://Scripts//player.gd'.
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:2285:load() - Condition "err != OK" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Failed loading resource: res://Scripts//player.gd.
put_char @ index.js:7
index.js:7 At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **SCRIPT ERROR**: Parse Error: Couldn't load the base class: res://Scripts//player.gd
put_char @ index.js:7
index.js:7 At: res://Scripts/p2.gdc:1:GDScript::load_byte_code() - Parse Error: Couldn't load the base class: res://Scripts//player.gd
put_char @ index.js:7
index.js:7 **ERROR**: Method failed. Returning: ERR_PARSE_ERROR
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:801:load_byte_code() - Method failed. Returning: ERR_PARSE_ERROR
put_char @ index.js:7
index.js:7 **ERROR**: Cannot load byte code from file 'res://Scripts/p2.gdc'.
put_char @ index.js:7
index.js:7 At: modules/gdscript/gdscript.cpp:2281:load() - Condition "err != OK" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **ERROR**: Failed loading resource: res://Scripts/p2.gdc.
put_char @ index.js:7
index.js:7 At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
put_char @ index.js:7
index.js:7 **WARNING**: Couldn't load external resource: res://Scripts/p2.gd
put_char @ index.js:7
index.js:7 At: scene/resources/resource_format_text.cpp:175:_parse_ext_resource() - Couldn't load external resource: res://Scripts/p2.gd
put_char @ index.js:7
index.js:7 **WARNING**: Font oversampling only works with the resize modes 'Keep Width', 'Keep Height', and 'Expand'.
put_char @ index.js:7
index.js:7 At: scene/main/scene_tree.cpp:1153:_update_root_rect() - Font oversampling only works with the resize modes 'Keep Width', 'Keep Height', and 'Expand'.
put_char @ index.js:7