New to this, need some help getting started

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
brndnpcktt
Prole
Posts: 1
Joined: Thu Feb 21, 2013 1:23 pm

New to this, need some help getting started

Post 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.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: New to this, need some help getting started

Post 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 ^^
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: New to this, need some help getting started

Post 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".
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: New to this, need some help getting started

Post 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.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 3 guests