Hello! I'm relatively new to Love's engine (but EXCELLENT at Lua), and I have noted a problem with my program:
I have a Lua file - Game.lua - that I am requiring within the Main.lua. After I run the Game, I can wait a little while (around 15 seconds), then love will exit. It's not crashing to what I know, because there's no evidence that it is (My mac won't say "Love exited unexpectedly" and there's no Lua error)
Any ideas on what might be happening?
If you want to see the code that I have so far, here it is:
https://github.com/XanthicDragon/L-ve-- ... ree/master
Löve exiting randomly
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- XanthicDragon
- Prole
- Posts: 7
- Joined: Fri Feb 13, 2015 7:30 pm
Löve exiting randomly
"rawr ecksdee" --Xan the Dragon
Baby Inspector is best inspector. No exceptions.
Baby Inspector is best inspector. No exceptions.
Re: Löve exiting randomly
Well, a lot of your logic is incorrect:
- First of all, you have two love.draw functions: here and here.
- You shouldn't define love.mousepressed or any of the other callbacks inside of love.draw, let alone every frame. (here and here).
- This is could be why it's quitting, but probably not.
- You don't need to clear ever frame- that's automatically done.
- I don't know how you even got it to run, since you aren't using love.update...
- love.draw is not passed any arguments (here and here).
I think your problem is because you're calling love.draw, then overwriting it every frame, but I'm not sure. I don't have any of the graphics or sounds, and don't really feel like removing those lines.
- First of all, you have two love.draw functions: here and here.
- You shouldn't define love.mousepressed or any of the other callbacks inside of love.draw, let alone every frame. (here and here).
- This is could be why it's quitting, but probably not.
- You don't need to clear ever frame- that's automatically done.
- I don't know how you even got it to run, since you aren't using love.update...
- love.draw is not passed any arguments (here and here).
I think your problem is because you're calling love.draw, then overwriting it every frame, but I'm not sure. I don't have any of the graphics or sounds, and don't really feel like removing those lines.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Re: Löve exiting randomly
Are you running from terminal? Because you should do that. Then out some debug print's somewhere (especially where that quit call is) and do stuff until it exits.
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Löve exiting randomly
I'd love to help you but as davisdude said, without the graphics and sounds it's very hard. What he said is probably right. There's a lot of awkwardness. It sounds like you're filling up memory rapidly. Use the Terminal like mentioned above. It'll hopefully print an error for you.
- XanthicDragon
- Prole
- Posts: 7
- Joined: Fri Feb 13, 2015 7:30 pm
Re: Löve exiting randomly
Alright - as I said I am new to Love.
Other than that, I REALLY goofed then, didn't I? Thanks for those notices. I'll have those problems fixed up
Other than that, I REALLY goofed then, didn't I? Thanks for those notices. I'll have those problems fixed up
"rawr ecksdee" --Xan the Dragon
Baby Inspector is best inspector. No exceptions.
Baby Inspector is best inspector. No exceptions.
- XanthicDragon
- Prole
- Posts: 7
- Joined: Fri Feb 13, 2015 7:30 pm
Re: Löve exiting randomly
OK - After organizing my code, I haven't had any crashes. Thanks for helping me with those mistakes.
"rawr ecksdee" --Xan the Dragon
Baby Inspector is best inspector. No exceptions.
Baby Inspector is best inspector. No exceptions.
Re: Löve exiting randomly
Let us know if you need any more help!
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Who is online
Users browsing this forum: Semrush [Bot] and 7 guests