Hello community Dave here
So I have decided to make a game and love2d seems like a good place to start. My OS is linuxMint, my text editor is zerobrane studio and I have installed love2d through the repository.
I run a main.lua file by typing "love /folder/name/main.lua" in the terminal, but I just get a screen that says "no game".
Am I missing something?
Running love programs (linux)
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Running love programs (linux)
Yes, love doesn't run files, it runs games, and those games can either be a directory, or a zipped directory (.love).
Try "love /folder/name" instead.
That also explains why the file needs to be named main.lua to be found .
Try "love /folder/name" instead.
That also explains why the file needs to be named main.lua to be found .
Re: Running love programs (linux)
Works like a charm, thanks buddy
Re: Running love programs (linux)
I prefer running via scripts. But I'm going to be easily sold if you can provide some benefits of running via Terminal.
Re: Running love programs (linux)
I might have jumped to conclusions a bit early.
I have been following a short tutorial from the wiki(see link at the bottom) and everything worked just fine until I finished the tutorial. For some reason it stopped working and I now get the following error when I try to run the game.
Error
boot.lua:364: No code to run
Your game might be packaged incorrectly
Make sure main.lua is at the top level of the zip
Traceback
[C]: in function 'error'
[C]: in function 'xpcall'
One moment it was working just fine and the next, not so much. In between all I did was make a todo list in another program and create another main.lua file in another directory. For some reason the new game files is also not accepted since I get the "no game" screen. I am truely clueless since I did absolutely no actions on my computer that should have anything to do with the tutorial game.
@spyrth
I have only been using linux for a few weeks so I'm not saying that using the terminal is better. It's just what I looked up on the web.
http://osmstudios.com/tutorials/your-fi ... art-1-of-3
I have been following a short tutorial from the wiki(see link at the bottom) and everything worked just fine until I finished the tutorial. For some reason it stopped working and I now get the following error when I try to run the game.
Error
boot.lua:364: No code to run
Your game might be packaged incorrectly
Make sure main.lua is at the top level of the zip
Traceback
[C]: in function 'error'
[C]: in function 'xpcall'
One moment it was working just fine and the next, not so much. In between all I did was make a todo list in another program and create another main.lua file in another directory. For some reason the new game files is also not accepted since I get the "no game" screen. I am truely clueless since I did absolutely no actions on my computer that should have anything to do with the tutorial game.
@spyrth
I have only been using linux for a few weeks so I'm not saying that using the terminal is better. It's just what I looked up on the web.
http://osmstudios.com/tutorials/your-fi ... art-1-of-3
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Running love programs (linux)
If you're sure the path you're passing contains main.lua (and not in a subdirectory, and it is readable), there is a bug in older versions where the wrong directory is run if your current working directory contains a directory named 'love'. This bug was fixed in 0.10.0 though.
Re: Running love programs (linux)
I was having the files like this:
/gamedirectory/assets/pictures
/gamedirectory/bin/main.lua
I just played around creating a .love file and by rearranging the files like this:
/gamedirectory/assets/pictures
/gamedirectory/main.lua
I got the love file working and I can now run the game from the terminal just like before.
I am using the love 0.9.1 version since that was the one linux gave me from the repository so maybe the issue was caused by the bug you mention. I should properly update.
/gamedirectory/assets/pictures
/gamedirectory/bin/main.lua
I just played around creating a .love file and by rearranging the files like this:
/gamedirectory/assets/pictures
/gamedirectory/main.lua
I got the love file working and I can now run the game from the terminal just like before.
I am using the love 0.9.1 version since that was the one linux gave me from the repository so maybe the issue was caused by the bug you mention. I should properly update.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 8 guests