Page 1 of 1

New to this, need some help getting started

Posted: Thu Feb 21, 2013 2:04 pm
by brndnpcktt
Hello everyone. If you didn't guess from my username, my name is Brandon and I'm, well, new to the LÖVE game engine. If that isn't bad enough, I've never even heard of Lua.

Any help would be appreciated, but here's the first problem I've run into.

I tried to run the hello world app, but it gave me a packaging error message. I'm sure someone here knows the one I'm talking about.

There's not much to go into, step-by-step wise I mean. Using notepad, I put the following code into a file, named it properly and dragged it into a folder. Then I dragged the folder over a shortcut to LÖVE and it gave me the error.

Code: Select all

function love.draw()
    love.graphics.print('Hello World!', 400, 300)
end
I am coming from a background in Java, and wanted to know if this language is capable of compiling the games into a .exe file, rather than .love or .lua, so I can distribute easier if I reach that point.

Again, thank you all in advance for any help.

Re: New to this, need some help getting started

Posted: Thu Feb 21, 2013 2:22 pm
by Nixola
Hi Brandon, welcome to LÖVE! ^^

First of all, can you tell us what exactly the error is? If the error is "no code found", are you sure you called your file main.lua and not main.lua.txt? Usually Windows hides file extensions, so using the latter by mistake is pretty common; if you're using Windows 7, press "alt" in an Explorer window, select Tools in the menu bar, select Folder Options, then Visualization (I guess, my OS isn't English) and untick the "Hide known file extension" (again, it's not exactly this), then just click ok and you're ready to remove the .txt extension.

Obviously, if the problem isn't the above and I just wasted 3 rows you should tell us exactly what you did, since what you wrote shouldn't cause any error.

To 'fuse' the .love with the .exe you have to run the command prompt and use "copy /b 'path\to\the\love.exe'+'path\to\the\game.love' 'path\to\the\resulting\game.exe'" (I hate using backslashes, but I'm unsure of what Windows would do if you used normal slashes, sometimes it refuses to use a normally-slashed path here). If you want more details, check out Game Distribution on the wiki, it also explains what to do with other OSes.

Well, I hope you'll enjoy using LÖVE ^^

Re: New to this, need some help getting started

Posted: Fri Feb 22, 2013 1:09 pm
by T-Bone
Also note that you're not supposed to run main.lua in the LÖVE executable. You should either run the folder containing the main.lua file or the .love file containing main.lua. Another possible error is of course if you didn't name the script exactly "main.lua".

Re: New to this, need some help getting started

Posted: Fri Feb 22, 2013 5:56 pm
by Lafolie
Contrary to your logic, it is actually easier to distribute using a .love file. If you're planning a release proper, then it is possible to package a .love with a love binary for each platform.