Page 1 of 1

Can't run old game

Posted: Wed Mar 10, 2010 5:16 am
by imyourhero
Hi,

I don't know if anybody else has had this happen, but I feel like there probably is. If there was already a post on this, I couldn't find it, so I'm sorry. I was working for a while on a game on an old copy of love, and got pretty close to completion. Unfortunately, I had to format my hard drive and reinstall my OS recently, so I backed up the game, and once windows was running again, I reinstalled love. Now, whenever I try to boot up my old game, it just gives a blank screen, without a title or anything for my game, just a black screen called "untitled." Is this a version problem, am I going to have to do some editing, or am I just missing something?

Thanks

Re: Can't run old game

Posted: Wed Mar 10, 2010 6:35 am
by bartbes
There was a pretty big API change between 0.5.0 and 0.6.0, thus any game made for 0.5.0 or earlier won't run on 0.6.0 or higher.

Re: Can't run old game

Posted: Wed Mar 10, 2010 10:53 am
by giniu
I'd say you should check Porting Your LÖVE to Zero Point Six Point Zero [0.6.0] topic and Automatically converting 0.5.0 games to 0.6.0 + check docs. If you are lucky (depends on your code) you could probably update your game quite quickly to 0.6.x. Good luck :)

Re: Can't run old game

Posted: Wed Mar 10, 2010 11:53 pm
by imyourhero
Hey thanks a lot, the auto-convert didn't work so I'm converting it over by hand little by little. Quick question, what are we using for include now? I'm getting errors with love.filesystem.include.

Re: Can't run old game

Posted: Thu Mar 11, 2010 1:13 am
by bmelts
Try

Code: Select all

love.filesystem.load("filename")()
The parentheses at the end are important - require returns a function to execute the loaded file. The parentheses execute it.

Re: Can't run old game

Posted: Thu Mar 11, 2010 2:07 pm
by Robin
imyourhero wrote:Hey thanks a lot, the auto-convert didn't work so I'm converting it over by hand little by little.
Could you tell me what exactly went wrong?

If you get a lot of warnings, that's ok: the whole purpose of it is showing what you need to change, so you can do it. That's the way I choose to make it, because fully automatic conversion might just ruin your project, by over-eagerly replacing things.

It is also a useful tool if you are converting your game by hand, and you want to know how much there is left to do.

EDIT: If you want to replace all the constants of type love.type_constant to "constant": running hand-holder.lua with option -a enables aggressive mode, which automatically replaces any old-style constants left.