On itch.io, the game works fine. However, when I embed it onto anything, it gives the same error as you get when trying to run a game in the browser.
Is there something I missed? when I run it on the itch.io website, it works fine, so why shouldn't it when it's embedded?
What's the procedure for embedding an itch.io game on another web site?
Odontoblast
You copy paste an embed code, like so:
<iframe frameborder="0" src="https://itch.io/embed-upload/9298398?color=333333" allowfullscreen="" width="1280" height="740"><a href="https://mr-null1.itch.io/polished">Play Polished. Teaser on itch.io</a></iframe>
The hosting server's environment probably needs to be configured for SharedArrayBuffer, etc. I wouldn't think that itch.io's server configuration would override that in an iframe.
For an HTML5 Godot export (not itch.io embedded), I was able to do that with an .htaccess file. I still had another problem because my web account didn't support HTTPS.
Header set Cross-Origin-Opener-Policy "same-origin"
Header set Cross-Origin-Embedder-Policy "require-corp"
Odontoblast
sorry to sound like a newbie but how would I use the .htaccess file, like where would I put it, how would I make it, how to use the code, and all of that stuff.
First, it only applies to a web server that's running Apache. Second, the server configuration has to allow per-directory configuration files, which by default are named "htaccess".
If those conditions are true, create a text file named ".htaccess" with the contents in my previous post, and placed it in the server's file system directory that contains the web page with the iframe.
Whether you can do that depends on how much access you have to your server.
There are other ways of dealing with that error you received. See this for more information:
https://github.com/godotengine/godot/issues/69020
An alternative is to use Godot 3.
Is there a way to downgrade a 4.1 project to 3?
Only by doing it manually.
Odontoblast wdym by manually?
Presentational actually nvm because of something else that won't work
Presentational wdym by manually?
Make a backup of the project, then try to open it in Godot 3. Fix any errors that appear. It could require rebuilding scenes, making changes to scripts, etc. There's no documented procedure for doing this.
This is an Itch-specific problem. You could try bugging guy who runs it to fix it. His twitter handle is... nevermind, he moved over to the fediverse, he still posts occasionally at https://mastodon.social/@leafo
Odontoblast
Okay, switching directions, how would I add these headers in a GitHub pages site?
I don't know. I'm working on my own GutHub problem. Solve that one, and I'll look into yours. 🙂
https://github.com/orgs/community/discussions/78998
Did you read the github issues link I posted above?
Odontoblast I did it earlier but that was before I decided to switch to github pages. it would be easiest that way.
Presentational so let me read it again
© 2022 - 2024 — McMap. All rights reserved.