Coi-serviceworker doesn'nt work, probably my fault

Godot Version

4.1.1

Question

Okay, so I have uploaded an HTML5 game to GitHub pages. I have tried numerous ways to get around the shared array buffer error, and the one that seemed to be the best was Coi-serviceworker. To install it, one would put a .js file into their project, and then reference it in an HTML script, which was not specific. I assumed it was index.html, and I put it at the end, here:

				} else {
					setStatusMode('indeterminate');
				}
			},
		}).then(() => {
			setStatusMode('hidden');
			initializing = false;
		}, displayFailureNotice);
	}
}());
		</script>
#this is the line:
		<script src="coi-serviceworker.js"></script>
	</body>
</html>

That’s a very difficult thing you’re trying to do, and I don’t know if anyone has done it successfully. My advice is to just put your game on itch.io or somewhere else more amenable to web games. Add a link from the itch page to your repo, and add a link to your game on itch to your readme.

Ok the problem is that I can’t do itch.io due to software issues (think school laptops with admin passwords on absolutely everything)
There was an GitHub issue that seemed to have some good ideas:
Use an HTML-based solution to the SharedArrayBuffers problem · Issue #6616 · godotengine/godot-proposals · GitHub

also, I found something that doesn’t quite use this method but it does use something to circumvent it:

here is the final project:
https://itsas-taldea.github.io/moon/play/

I actually figured it out. There is a plugin on the godot asset library that does it automatically.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.