Game closes immediately when started after export. How to fix?

Hi there.
So im working on a 2D game that has quite a few scenes, sprites and scripts. It is working fine in the editor when i play it but when I export it as a Windows Desktop app and start it, it shows the Godot logo and then just closes a few seconds later. No warning, nothing. I am fairly new to Godot so it might be a rookie mistake. Nothing I do is fixing the problem so it would be greatly appreciated if i could get some help.
Thanks.

Answers

  • MegalomaniakMegalomaniak Posts: 4,034Admin

    First question that comes to my mind is if you remembered to set a startup scene in project settings, but if thats not it then maybe running your game from the cmd might give you some useful info to post here.

  • WafflegoatzWafflegoatz Posts: 4Member

    Is a start up scene the main scene?

  • MegalomaniakMegalomaniak Posts: 4,034Admin

    Yes it is.

  • WafflegoatzWafflegoatz Posts: 4Member

    Well yes then. I would try to do the command line thing but i want to make a game that you can just download and play no other setup needed. If you would like i could post some screen shots about the export settings.

  • MegalomaniakMegalomaniak Posts: 4,034Admin
    edited September 2019

    No, I mean, you as the developer can run it from cmd to see if some error or warning gets shown there to help you(and the rest of us here) debug the problem.

    But yes to the screenshots, why not. The more info you can supply the higher the chances the rest of us can help. :)

  • WafflegoatzWafflegoatz Posts: 4Member

    Ok so i tried to do that but i kept getting blocked (I don't have admin on this) so i decided to see if it was anything in my project. Apparently a piece of music wasn't loading so i had to fix it. After that everything worked. It's all good now. Thanks for helping out.

  • MegalomaniakMegalomaniak Posts: 4,034Admin

    strange, I don't think admin rights should be necessary to run from the cmd, unless you are running from a protected directory, I guess? Well, glad to hear you managed to resolve it.

  • toivocattoivocat Posts: 1Member

    For me it works fine in the editor but then after I export it the debug console pops up for a few seconds and once I read part of it and it said:
    Fail to load scene "TitleScreen.tscn" . Do you have any idea on how to fix this?

  • cyberealitycybereality Posts: 2,089Moderator

    Check that the scene is named exactly that (it is case sensitive, so that could be an issue).

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file