So I made my first game but it doesn't run

Godot Version

4.5

Question


When i try to run the .exe this is what shows up, and I’ve already checked that both the .exe and .pck are named the same thing. I asked AI so I could get a quick response on what is causing the problem, but it told me that the aseprite importer plugin i was using was the problem. I don’t trust AI enough to let it tell me to redo all my art files (im afraid of breaking the game). Does anyone know what I should do? (I’ve also tried embedding the .pck in the .exe but got the dame error when running the .exe)

When you export the game, it exports all of the resources in a .pck file, and that file needs to be at the same path as the executable, with a matching name. You get the message above if it can’t find that .pck file.

I think you also get that message if you’ve tried to encrypt and messed things up somehow, but if you haven’t tried to encrypt it, that shouldn’t be the problem.

Have a look in the directory with the executable and see if the pack file is there.

Embedding should have fixed this (I’m using embedding in Stahldrache, which makes me wonder if something odd is going on. What platform are you on, and is there anything unusual in the path or filenames you’re using? Are all of your resources loaded through "res://" paths?

The .pck is there, all that’s there is the .exe and the .pck. The only thing unusual about my files that I can think of is that all my art files are .ase not .png. This works in the editor, but only with the aseprite importer plugin I’m using. As for the “res//:” do you just mean everything needs to be in that folder?

What I mean by "res://" is, Godot strongly prefers to load resources from the resource directory, which is essentially the game directory. When it exports, it bundles all (more or less) the files in the game directory into the pack file, and the exported game looks for resources inside that pack file.

The dialog you’re seeing implies that the exported game isn’t finding the pack file; if the problem was the .ase file, I’d expect instead you’d get errors about missing resources or somesuch, but the dialog you have says it can’t find the pack file.

What OS are you using?

I’m using Windows 11 and all my files are in “res://”

Also I just turned off encryption and the game runs but crashes only showing the splash screen

1 Like

Can you tell me how you did the encryption? I feel like I know what the issue is.

1 Like

Alright so I did some testing, and I’m almost 99% sure I know what the issue is.

I noticed you said you “turned off encryption” and the game ran.
I will assume you didn’t really know how encrypting a godot game works. You have to manually build the export template from source and include your encryption key in there, otherwise it will not work, and if you ticked “Encrypt Index (File Names and Info)”, which you likely did, godot will crash your game on startup with that exact message, since it cannot decrypt the filenames, since it doesn’t have the actual keys.

It’s not enough to simply enable “Encrypt Exported PCK”, you have to build the release template from source. There’s a link at the bottom of the Export dialogue about this, see: Compiling with PCK encryption key — Godot Engine (4.5) documentation in English

If you want to have your game assets encrypted, I’ve made a tutorial for windows, see: Easy to follow tutorial for encrypting your PCK file

1 Like

Thanks, i might not worry about encryption this time but I will definitely come back to your tutorial when I need to. I fixed the crash after the splash screen (apparently I accidentally disabled a plugin) Now my only problem is that the exported version of the game freezes frequently if I embed the .pck

Maybe you should avoid doing special things with the export, keep it plain and simple, make sure your game works like that and ship it!

1 Like

Yeah, I figured that out

Thanks to everyone who helped, here is the link to the game Mighty Missile Man by Mighty Missile Games! There are some glitches in the web version that are detailed on the page and help with those would be greatly appreciated