Solarus-Games English Forum

Solarus => Development => Topic started by: spilkerg on March 05, 2016, 05:37:05 AM

Title: Window Freezes, No Logo
Post by: spilkerg on March 05, 2016, 05:37:05 AM
I'm new to Solarus and I've been following the video tutorials. I stopped halfway through the second one and made a few small maps. I continued and watched the rest of it and then edited the main.lua script accordingly so my game could run. Every time I try to run it, the new window pops up but it's just black. Nothing happens at all, not even the logo. I'm tearing out my hair trying to figure out what is wrong. Any suggestions? Help?
Title: Re: Window Freezes, No Logo
Post by: Christopho on March 05, 2016, 08:56:52 AM
Is there an error message or an error.txt file?
Title: Re: Window Freezes, No Logo
Post by: spilkerg on March 05, 2016, 03:07:13 PM
No. I looked everywhere for one and none showed up.
Title: Re: Window Freezes, No Logo
Post by: Diarandor on March 05, 2016, 09:13:32 PM
Could you post a copy of your main.lua script? So we can help you find if there is something wrong.
Title: Re: Window Freezes, No Logo
Post by: spilkerg on March 05, 2016, 09:38:20 PM

function sol.main:on_started()
  print("This is a sample quest for Solarus.")

  sol.language.set_language("en")

  local solarus_logo = require("menus/solarus_logo")

  sol.menu.start(self, solarus_logo)
  solarus_logo.on_finished = function()
    local exists = sol.game.exists("save1.dat")
    local game = sol.game.load("save1.dat")
    if not exists then
      game:set_starting_location("Start")
    game:start()
    end
  end
end
Title: Re: Window Freezes, No Logo
Post by: Diarandor on March 05, 2016, 09:57:42 PM
In your code, if the savegame aready exists, the command game:start() is not being called. That might be the problem, but I am not sure if there is some more problem in your logo script.
Title: Re: Window Freezes, No Logo
Post by: spilkerg on March 06, 2016, 05:51:44 AM
So, I fixed my original problem. I didn't transfer the resource pack data correctly. That's my bad. But now, I can't get my character to move. The video tutorial shows the hero moving according to keys once a game has started. Mine stays still and does not move. This is also the case for the sample quest that I start up. Is it me again? Am I missing some code?
Title: Re: Window Freezes, No Logo
Post by: Diarandor on March 06, 2016, 07:14:53 PM
The problem is surely from your code, since no one has reported that kind of bug (and I never had that problem with all the versions of Solarus). Try to find the problem in the code in the initial scripts: the one of the logo, the game manager, the script of the first map, and maybe others). If you still cannot find it, then you will need to post some of the initial scripts here so someone might help you to find the problem.

By the way, when you try to move the hero, are you using a keyboard or a joystick?
Title: Re: Window Freezes, No Logo
Post by: spilkerg on March 06, 2016, 09:22:01 PM
I use my keyboard. I did a bit of research and it seems like Mac users have had this problem in the past.
Title: Re: Window Freezes, No Logo
Post by: Diarandor on March 07, 2016, 08:47:06 AM
Then maybe it could be a bug. Which version of Solarus are you using?
Title: Re: Window Freezes, No Logo
Post by: spilkerg on March 07, 2016, 07:58:10 PM
1.4.5
Title: Re: Window Freezes, No Logo
Post by: Diarandor on March 07, 2016, 08:08:38 PM
Ok. I guess from your previous comments that you are using a Mac.
If someone can confirm that there is no such a bug in version 1.4.5 for Mac, that would mean that there is something wrong in your scripts (and I will try to help you to find it).

I did not have that problem for the Windows version, but since I do not have a Mac I cannot check if there is such a bug in the version you are using.

Anyway, you could also share your data temporarily (maybe using dropbox or something), so we can help you find some problem in your scripts, if there is any.
Title: Re: Window Freezes, No Logo
Post by: MetalZelda on March 07, 2016, 11:00:05 PM
Maybe this issue is related to this thread ?
Looks similar to me, both are Mac users.

http://forum.solarus-games.org/index.php/topic,548.0.html

You should try this to see if that fix the thing

http://forum.solarus-games.org/index.php/topic,548.msg2726.html#msg2726