 When you're ready to share your Godot game with the world, you want to create an export for all the various platforms you want your players to be able to play it on. I've got this simple game called High Score Tracker from a previous screencast where you click a button and press it as many times as you can, keep track of your high score. Pretty basic and simplistic. I want to make it so that this game can be exported and distributed to my friends who are obsessed with clicking. And we're going to go ahead and export it for as many platforms as possible. Let's go. So you go to Project and you go to Export. This presents you with an empty screen that isn't very intuitive in my opinion. What you do is you want to go to Presets and you'll see all the different operating systems your game can be exported for. It needs to be exported for a given platform so that it works on that computer. Games on Mac don't work on Windows operating systems. Linux games don't work on Windows operating systems. You have to export it for that platform. And some platforms require certain setup and configuration. Notably iOS and Android require a bit more configuration. The web's usually pretty simple. Okay, so we'll start with the web. You click that and you'll see right away you're greeted with some information prefilled over here. And then all this red text about export templates missing. What we need to do is first install the export templates. Export templates are basically shells of runnable executables for a given platform that match your Godot version. So I'm using Godot 4.0.1.stable. I have other installed versions but I need the ones for my specific Godot version. So whenever you upgrade Godot you'll have to go and download new templates. You just leave it as best available mirror and download and install. And it'll go and download 756 megabytes of data. This is a bunch of files for Mac, iOS, Android, web, Linux, et cetera, that Godot takes and puts your game content into when it builds your export. So that's one of the reasons why the Godot editor is so small is because it doesn't include all of these packages that you need and then you have to go and download them. And it takes a little time but once you have them and you're not updating the Godot version very much then it downloads this. So yeah, it takes a little time. So it's a good time to go have a sip of coffee or go ahead and wait. But I'll talk more about exports while this downloads. So the basic gist of what we'll do is create an export for all our main platforms and adjust some configuration settings and then export them. Then we can take those files, upload them to itch.io or wherever you want to share your game. Certain platforms can't export games for other platforms. Like if you're on Windows or if you're on Linux you can't export your Mac OS game. But Godot does some neat things that lets you go ahead and export for other platforms if possible. Like on Linux you can export for Windows and Linux and web. On Mac OS weirdly enough you can export for all of the platforms. Like I wouldn't recommend necessarily using Mac OS for game development cause the hardware is like really costly and whatever but I have Macs for work and because of that I can export my game for all the platforms which is kind of nice. Also just a shout out, if you're making a game and you want a Mac build and you're okay with sharing your source with me which I won't do anything with I'd happily export your game for Mac so that Mac players can use it. It doesn't take very long and I'd be happy to help you there. But anyway, we've got the export templates downloaded. You see it's changed, they're installed and ready to be used, you just click close. You have to go back up to project, project settings, oops, project export. And now we're back at this screen. This screen is a little bit overwhelming at first but don't worry, I'm gonna explain it the best I can. So web, that's just the name of what this is called. If we change this to foo, that's fine. You might, it's important to be able to name them because you might have builds that vary based upon the builds needs. Runnable says, this is a special thing for one click deploy where you can like test mobile builds and web builds up here using this button in the editor. We're not gonna worry about that right now. That could make a good future video. But export path is the main thing we want. So if we click this button and we go to the root of our game, I'm gonna delete this. I created it previously while trying to prepare for this video. Well, it's not letting me. So what you're gonna do is I like to create a folder called exports. And then for web, I create one called web and you're gonna name the file that Godot is gonna primarily put your game into. I call it index.html because itch.io wants it to be called that in order for it to work. The needs for where you're deploying your web game may vary. So just a heads up there. You click save and it knows, okay, we're gonna export our game there. Then there's a bunch of tabs and settings which might be a little overwhelming. But for the most part, you don't need to do anything with most of them. So you can just leave all these as is. If you hover over them, you'll get more details if there's a description. Like I said, the defaults work. Resources just says what comes out when you export it. Features, I just leave it as be. And then here's some interesting parts which is encrypting your PCK. And I wanna just talk a little bit about what PCKs are. I don't know what that stands for. I usually think of it as a package because it's kind of close to that. And what the PCK is, is your game files. So you have the template that we downloaded and then we have your game files in the PCK. The PCK is your SVG and your labels and your nodes and all that information that's easily distributable separate from the binary or whatever the export. And you can actually embed it if you want it to be. But there's also cases to be made for not embedding it and instead sending a zip to your players. So a nice thing is you can encrypt it which means that people can't go and inspect the files and they become obfuscated. I'm not gonna explain how to set that up but just know it's possible and I wouldn't worry too much about it if you're just getting started out. So let's go ahead and export our project. It opens up to that folder recreated and there's this checkbox export with debug. If you were sending this build to someone and you wanted the debug functionality to be present which I talk about in a different video, you would leave this checked. But for sharing your game with the public, I uncheck export with debug. That removes debug functionality from it. Okay, that happened. Right? That's the sort of experience here that's a little challenging is it doesn't give you much feedback as you're doing it. So let's go ahead and we'll open in file manager our project file. We'll go to exports, we'll go to web and you'll see here are all the files needed for our web export including index.pck. That's our game file. There's some JavaScript and some various files here. Now you're not gonna be able to just click index.html and have it run because there are certain settings that need to happen. We'll get into that in a second. So that's the web export. Let's actually go ahead and put that on itch. I'd like to go or what you need to do is select all your files and compress it. That creates a zip file. That should be possible on every operating system to easily do that. And I'm gonna rename this to high score. Web. And that just says here's this file compressed for the web. I'm gonna go to itch.io dashboard and I'm gonna create a new project. So this is exactly what you would do if you were creating a project for your good dough. I'm gonna call it high score. I'm gonna call it high score clicker and it automatically sets your project URL. Fill out your details. The type of project we're gonna have is HTML. That lets our HTML web build be played but you can also do downloadable if it's only for PCs. And then release status. We'll just make this a prototype. You could do released if it's ready in development if you're working on it, that kind of thing. And then you go down to uploads. Take your file and upload it. You have to navigate to it. And then you just click upload. It uploads your game and you click into here. Let's leave it as executable. You'll say this will be played in the browser. So itch knows to use that. Then we've got dimensions. You can find that in project settings. And if you go to display, I wanna say it is, with, window, display, window, viewport with, I'm gonna get rid of this filtering. So it's 1152 by 648. You generally want that to match. Otherwise it might look a little scaled and funky. There's settings like mobile friendly which Godot 4's web experts have some issues. So it won't work on Safari, but it might not have enjoyed. You can start it on page load or you can display a button. The button's kind of nice. You can make it so people can make it full screen. That can be nice. And then for Godot 4 projects, you wanna check shared array buffer support. This is the fundamental part to making Godot 4 projects that are exported for the web work on itch. Then I'm gonna go here, click save and view page and itch will go and load our game for the first time. I have my resolution really high so I'm gonna zoom out a little. Click this button load game and it's gonna go ahead and load our game. This takes a little time on Mac OS. There's like a known issue with Mac and Godot 4 and how this works. So I'm gonna tab away for a second and just so we're not watching that load. And we'll go back here to project. We'll go to export. And if you needed to somehow, like maybe you had a web build that was for GitHub, you could go and add another web build and you can even duplicate the existing one and you could say like, web, GitHub. And maybe then you configure your expert path as needed. But for our case, web and itch is fine. We're still loading here. Firebox isn't happy. We're gonna let it keep going now. Okay, there we go. It finally came up. And if we click start game and press me, you see our game works in the web. There's some weirdness with the layout and resolution here. So that's a little funky, but we'll, you know, that's okay. That's something else to figure out, kind of unrelated to exporting. Then what you wanna do is go and add the other platform exports. You set the export path. I don't wanna put it in exports web though. I wanna put it in exports. And then it says here all recognized files for it kind of gives you a hint of what you wanna name it. You can make your Linux exports a zip or you can make it .x86 underscore 64. Let's just go ahead and call it high score Linux and we'll give it the file type of x8664. That's an executable file on Linux. Save it. There's settings here that are different. Again, the defaults generally work. If you needed to provide certain architecture builds, you could do that here. You can embed the PCK, but again, if you don't embed it, itch.io, if you use their command line tool to upload and other places aren't able to create better patches by not embedding the PCK. So it's up to you and I'll show you during the export what happens there. But again, we've got more config settings. Some are similar to the web. Some aren't. We'll click export project and we'll export Linux. Go back to the finder and you see these two files. So if you don't embed the PCK, this is separate. You could then take it, compress it. That way it uploads faster and your users download it faster. We'll call it high score Linux. I'm gonna make this sort by name. So now we've got our high score for Linux. I'm gonna delete these and show you the difference with embed PCK. So if we embed the PCK file and export the project, Godot takes it and puts it just in here and it's one file. And then your players don't have to worry about putting things in certain places. So it's tough. Sometimes itch encourages you to not do that basically, but it's pretty friendly for your player to just have it embedded. So use your best judgment. I'd say probably check it because then it's there. And then you can just compress this one file and there you go. It's compressed. And all we would do then here is to take it, go edit our game, upload files, select the zip file. And then when that uploads, we can check the Linux checkbox. We'll go ahead while that runs. We'll add Mac OS. When you do add Mac OS, if you're on Mac, you just need to set the bundle identifier. It just jumped away from me. We'll set it to com. That virtual loop, wow. It's getting away on me. There we go. Some weird bug meeting this there. You can set some versions and you can set up code signing and all the stuff that you might wanna do. But just setting the bundle gets us far enough. I'm also going to, you don't need to embed the PCK because Mac exports have a special way that you do that. And you can actually export it as a DMG, but I'm gonna export it as an app so that I can just click that and run it. So now here, if I click that and run it, it goes ahead and runs our game. And then we could go and compress that and say, that's, oh, but it named it High Score Linux. But really what I want that to be is High Score Mac. You could even just make it High Score. You know, name it what you want and then compress it. And you'll see, we didn't set the export path and it went ahead and prompted us and asked us what we want. So that is, you know, you don't have to set that, but if you do set it and we change it to be High Score Mac.app, save it, when we do export all, which I'll show you in a second, this is getting unwieldy with how big this is. Let me try to fix this. Sorry. Oh my God, like fighting low resolution issues right now. What if I click Wet or Linux? Just to, yeah, this normally wouldn't be a problem. I have my resolution set to really high so that everything's big and readable, right? And then we'll add Windows desktop. Universal Windows platform, it's not supported in good dough for yet, so you can't do that, but we'll do Windows desktop. I'll just call it Windows and that export path, we'll just call it High Score Windows. We'll set it to be an EXE and we'll embed the PCK. Click export project just to test it. It warns you for something, but you wanna install something for certain icon renaming, but I didn't do that. Then you could take it and you could compress it and setting it to export to a .zip directly from the Katoa export. I found it doesn't work with Windows on Mac. There's like some weirdness, so I always just export it to the file like that it needs to be and then I do the zip separately. All right, let's go ahead and delete these, even though we just made them all. So what you can then do is go ahead and click export all and let's delete web. You can say I wanna export all in release mode. This will go through all of the exports that we just configured. Web failed for some reason. Oh, it's because we deleted the web folder, so let's go ahead and restart, delete those, export all, release. Don't delete the folder if you have it set to go to a certain folder. Now it completed, Windows had an issue. It wants the RC edit executable, which I don't have, but it still works. And now we go here and we have all of our exports for Windows, Mac, and Linux and web. So then what I would do, right, I would go, I would compress this, I would take it, put it up here just so it's easier to see. Whoops, I'm dragging it to the wrong spot. Right, go back into exports. We name this to be high score web. Compress these so that they're smaller. You know, you don't have to compress them, but it's kind of like out of respective network usage that I generally do. Then now we can go and upload these files and we can upload them all at once. I already uploaded the Linux version, so I'm just gonna grab the web ones. And then here you can, in itch, set the platform. And they're all executable, so they'll just be there. This is a convoluted experience. That's why I'm making this video because it takes a little time to set it up. But then the basic gist of what happens is you're working on your game some more, you go to project, you go to export, you click export all, you re-export them, and then you upload them. And that's not too bad of a process. And then you can upload them here. That's like the simplest way to do it. And then you can categorize your uploads accordingly. And people can download your game and play it. I know there's also the ability to download a plugin for Godot to automatically push your builds to itch. I have written command line scripts and part of Godot skeleton is this template I've made. There's a little script, it requires a Ruby, but it handles all that for you, the pushing and building and zipping and stuff. So that's the basics of exports with Godot. I hope that helps you kind of get things working. It takes a little bit of time. It might be a little overwhelming, but you'll get there eventually and have your game be able to be played by other people. All right, thanks for watching and catch you later. Bye.