6 ms·
Upload a Godot HTML5 Game to Itch.io with GitHub Actions
- seba_dos1 3y agoIt's pretty much just two commands: godot --export-release HTML5 web/index.html butler push web <itch_account>/<project_name>:<channel> Used those with GitLab CI for ages:)
- dulvui 3y agoYes you are right, its that simple. I just made a Github Action wrapper around this 2 commands, that download and then caches the godot/butler files, so the next tun gets the files from the cache.
- jokoon 3y agoA godot dev said html5 games are difficult to do because of multithreading.
- hu3 3y agosource? I'd like to learn more about the intrinsics of web games.
- Kiro 3y agoThere are a lot of restrictions when using multiple threads in the browser. You need to spawn workers and they can only share certain things in memory between the threads (transferable objects and SharedArrayBuffer for generic data). For everything else you need to pass messages back and forth between the workers. Another problem is that SharedArrayBuffer was disabled by default after Spectre and in order to enable it you need to send certain headers from the server (Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy). I don't know if itch.io has support for that, but maybe. I haven't used Godot but I'm thinking that the multithreaded models game engines are using don't convert very well to SharedArrayBuffers. It's a very crippled form if you're used to say C#.
- a1o 3y agoI think this is also not available in either iPhone or iPad Safari.
- aezart 3y agoItch does support the headers for SharedArrayBuffer, but it causes problems if you want to have both a web player and a downloadable version of the game. It was recently fixed for Chrome, but in Firefox trying to download a game from a page with SharedArrayBuffer results in the browser blocking the download from the CDN.
- omoikane 3y agoSharedArrayBuffer can be enabled on itch.io with one checkbox. https://itch.io/t/2025776/experimental-sharedarraybuffer-support https://itch.io/t/2025776/experimental-sharedarraybuffer-sup...
- a1o 3y agoCan you do that and still ping a server outside of itch.io? Say for analytics or for online gaming.
- omoikane 3y agoI haven't tried accessing any external network resources, but the article above suggest it wouldn't work: If your game accesses resources on other domains then those requests will fail by default.
- nightowl_games 3y agoThat's specific to the refactoring of godots internals in 4.0. specifically the performance will suffer in single threaded systems. Note that we are running a multithreaded Godot 3 game on the web. It only uses threads when sharedarraybuffer is available, otherwise uses single threaded mode. Mostly just affects the latency of audio.
- sovietmudkipz 3y agoHey not bad. 3 years ago now (ugghh wow) I chose what engine to go all in on as a hobbyist. At the time only Unity supported producing web based games and I wanted to make games for the web so I went all in on Unity. Unity is great. Unity is also horrible, especially on devx. It takes anywhere from 10-30 seconds to recompile code or changes on each save. Making a unity html game takes 5-30 minutes. There are things that can be done to reduce these times but requires knowing a bunch of info (usage of asset database, dividing code into assemblies, etc). Writing a container image to run Unity CLI commands requires you deal with license. Ugghh I wish Unity was just better to use. I may scope out godot again. I’m working on a multiplayer game and it’d be interesting to evaluate how I’d plug a godot game into AWS gamelift.
- nonethewiser 3y agoYou described how Unity fares with web games. How does Godot compare?
- nightowl_games 3y agoWe made this in Godot, and it deploys to k8s on digital ocean via GitHub actions; https://rocketbotroyale.winterpixel.io/ https://rocketbotroyale.winterpixel.io/
- tester457 3y agoDo you have a blog where you talk about the deploy?
- a1o 3y agoHey that looks very good. Do you mind walking through a bit on how the graphics work? Are they vector or raster? Or are they 3D? In what format the artist sends the assets that get into the game? Is there any trick you had to do to make the graphics look this sharp? Does adapting to different viewport size required a lot of work?
- 3y ago
- DoItToMe81 3y agoI wish Godot allowed for smaller file sizes. The very lowest I've seen someone get a project down to is 10 MB. It's a little disappointing when your files work out to barely a few megabytes.
- dulvui 3y agoYou can disable dome features of Godot by using a custom build of the engine. I did that for my F-Droid builds, since a F-Droid build recipe builds all dependencies from source. But I don't know how many MB I saved.
- gradiustheguide 3y agoAfter a week of faffing I managed to fork the three repos Simon made and upgrade them from 3.x to 4.x . Very untested and maybe there's stuff there you don't need. But by gum it works! I'll slim it down in the future, and remove echo messages. Big thanks Simon for your work! Parent action: https://github.com/North-Street-Games/nutshells/blob/main/.github/workflows/main.yml https://github.com/North-Street-Games/nutshells/blob/main/.g... (attach this as a main.yml file in your GitHub actions workflow folder, and change the in-file variables and your secret itch.io butler key as needed!) Child Godot export action: (for ref) https://github.com/Kwpa/godot-html-export/tree/main https://github.com/Kwpa/godot-html-export/tree/main Child itch upload action: (for ref - no different to original) https://github.com/Kwpa/itchio-butler-upload https://github.com/Kwpa/itchio-butler-upload Note that 4.x Web builds currently do not run well on MacOS browser apps :/ See this: https://github.com/godotengine/godot/issues/70691 https://github.com/godotengine/godot/issues/70691
- dulvui 3y agoCool to see that my work was useful for you! Yeah, I have to update the default version to 4.x now, but you could have use the `godot-version` parameter to set it to 4.x like this - name: Godot HTML5 export uses: dulvui/godot-html-export@v0.0.2 with: godot-version: 4.1 Probably I also need to improve the documentation.
- gradiustheguide 3y agoDid you test that with 4.x? Because when I did I got toooooonnnnnessss of errors. Godot changed path names on a lot of things - and there's no headless download binary, you have to use headless as a command option in the bash file settings.
- dulvui 3y agoOh thanks good to know, I saw that the headless build was gone but didn't try it yet. This weekend I'll take a closer look to it and see what changed.