Godot Version
4.5.1-stable
4.6-stable
System Context
Systems = Linux Mint 22 / macOS 26.2
Emsdk ver = 5.0.0 (latest)
scons ver = SCons: v4.10.1.055b… (latest)
$PATH = omitting irrelevant directories (…/Web/emsdk: …/Web/emsdk/upstream/emscripten: …/Web/emsdk/node/22.16.0_64bit/bin:)
The Issue
Encrypted / Non-Encrypted Web Templates are not loading correctly via itch.io or my own local web servers. Both will show the Godot splash screen, load to 100%, and then hang there indefinitely… And what really confuses me, is that It does this on ALL the web templates that I build - regardless of whether I set an encryption key at all, and regardless of whether I use Linux or Mac to build it. I’ve been trying to figure this out for Two weeks straight and it’s driving me up a wall.
This is an exact rip of my last two build attempts (non-encrypted) from terminal on macOS:
cd ( Godot 4.6 stable’s directory )
running: scons platform=web target=template_release
Previous Build
[ 72%] Compiling thirdparty/msdfgen/core/shape-description.cpp ...
[ 72%] Creating 'bin/godot.web.template_release.wasm32.engine.js'
[ 99%] Linking Program bin/godot.web.template_release.wasm32.js ...
[ 99%] em++: warning: -pthread + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271 [-Wpthreads-mem-growth]
warning: user library symbol '$GodotWebXR' depends on internal symbol '$MainLoop'
em++: warning: warnings in JS library compilation [-Wjs-compiler]
[ 99%] Install file: "bin/godot.web.template_release.wasm32.wasm" as "bin/.web_zip/godot.wasm"
[ 99%] Creating 'bin/godot.web.template_release.wasm32.wrapped.js'
[ 99%] Install file: "bin/godot.web.template_release.wasm32.wrapped.js" as "bin/.web_zip/godot.js"
[ 99%] Archiving bin/godot.web.template_release.wasm32.zip ...
[100%] scons: done building targets.
INFO: Time elapsed: 00:06:19.72
(base) user@MacBookPro godot-4.6-stable %
Most Recent Build
scons: done reading SConscript files.
scons: Building targets ...
[ 72%] Linking Program **bin/godot.web.template_release.wasm32.js** ...
[ 72%] Creating 'bin/godot.web.template_release.wasm32.engine.js'
[ 94%] em++: **warning:** **-pthread + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271 [-Wpthreads-mem-growth]**
[ 99%] warning: user library symbol '$GodotWebXR' depends on internal symbol '$MainLoop'
em++: **warning:** **warnings in JS library compilation [-Wjs-compiler]**
[ 99%] Creating 'bin/godot.web.template_release.wasm32.wrapped.js'
[ 99%] Archiving **bin/godot.web.template_release.wasm32.zip** ...
[100%] scons: done building targets.
INFO: Time elapsed: 00:01:03.17
(base) user@MacBookPro godot-4.6-stable %
I don’t know if these warnings are critical or not???
I’ve been following the instructions on this page to a T, as well as the official emsdk documentation… Only thing is that I’m not seeing ‘emcc’ specifically in my PATH, which is something the Godot docs mention… But emsdk directories ARE in there, as I have ran what the emsdk and Godot docs say to run before compiling ~
./emsdk install latest
# after making sure everything is up to date...
./emsdk activate latest
# then, i would run
source ./emsdk_env.sh
# to add all the stuff to the PATH for that terminal session
# and emsdk and it's parts are it's reflected when I run
echo $PATH
# Which is what I shared at the top of this post after omitting personal directories
so I don’t know if there should be a literal ‘emcc’ path, but I can’t find anything in the documentation saying that because i’m literally doing what the docs say to do. I assume that’s what the ‘emsdk’ stuff is? And if not, I would love a bit of guidance on what / how to add ‘emcc’ to my PATH specifically.
Any guidance would be appreciated…
I understand that encryption is not always a great option for protection as it’s trivial for someone who has true intentions to steal your game… All they need to do is scrape your game’s memory and boom there’s the key. I guess it’s the virtual equivalent of the door being locked and the thief finding the key under the doormat.
Regardless, I am trying to protect my web game before I launch it through the best means possible, and I’m struggling to get this to work. I’ve got some big titles planned that have made me consider just modifying the engine so that I don’t have to worry about tools like GDRE or script kiddies, at least that’s as far as I understand it. I know that people are smart enough to reverse engineer my games, but I would love it if I could do anything to prevent it.
Thanks in advance for the help!
EDIT : It is worth noting that I can use the Export Templates that Godot provides via download to create a totally working web build, it’s only when I try to use my own that I get issues.