Trying to launch an image and it doesn't work

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
angry
Prole
Posts: 2
Joined: Tue Feb 23, 2016 8:46 pm

Trying to launch an image and it doesn't work

Post by angry »

So as a test run, I've been trying to load an image on this software and all I keep seeing is the toast image.

I've been trying to do this https://github.com/kikito/love-tile-tut ... c-concepts under main.lua and the directions are unclear: Like what do you name the folder? and where does it go? It doesn't go where the love application is, I've tried it don't work there or anywhere else. Plus how do you excuete it anyways? Simply clicking on it does nothing except bring up the toast image.

:x
User avatar
rougan
Citizen
Posts: 58
Joined: Wed Aug 12, 2015 10:30 am

Re: Trying to launch an image and it doesn't work

Post by rougan »

Welcome to Löve :) So firstly , you want to create a folder which will contain all your scripts which in this case is main.lua. It doesn't matter where this folder is created initially, but you may want to move it as noted in step 1. Copy and paste the code from the website into your main.lua within that folder.
Now, to run the game you basically have two options - either create a .love or open the game folder with love.exe.

1) Running the game by opening the game folder with love.exe is the easiest and fastest way. To do this, you have to make sure that your main.lua script is in the top level of your folder (ie not in any subfolders). To run your game you simply drag and drop the game folder onto the love.exe. The default filepath of the Love.exe on windows is C:\Program Files\LOVE\love.exe, so you may want to move your game folder into there to be able to drag and drop. Alternatively you can create a shortcut to love.exe in the same location of your game folder if you choose not to move it, and the drag/drop works in the same way.

2)Secondly, you can create a .love file which doesn't need to be opened with the love.exe but is slower to make. This is usually used to distribute your game on the forums and stuff. To do this, you simply move the contents of your game folder into a .zip archive and make sure that again main.lua is in the top level of the .zip. Then, simply rename the file extension from '.zip' to '.love' and then just double click and it'll run!

There are alternate ways to run the game such as with cmd or writing a batch file but they're not really neccessary at the start. Hope this helped!
angry
Prole
Posts: 2
Joined: Tue Feb 23, 2016 8:46 pm

Re: Trying to launch an image and it doesn't work

Post by angry »

Oh my god, finally got it. I didn't understand that you have to move the folder with main.lua inside to the application not just main.lua to the application itself.

Thanks for the help, I appreciate it.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Amazon [Bot] and 11 guests