[SOLVED] Batch file to quick start game

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
Ximici
Prole
Posts: 13
Joined: Sun Apr 21, 2013 5:55 pm

[SOLVED] Batch file to quick start game

Post by Ximici »

Hello,

When I want to start my project, I usually make a batch file to start the main.lua . I got the instructions from here: https://love2d.org/wiki/Batch_Start. I always used this methode but it doesn't seem to work since I use Windows 10.
Can I do something similar to 'debug' my game without building a .love file? I use Sublime Text 2. I don't like ZeroBraneStudio.

When I build a .love file, it works. When I use the .bat , I get the standart 'no game found'.

I use love 0.9.2 .

Thanks in advance,

--Ximici
Last edited by Ximici on Wed Dec 09, 2015 7:42 am, edited 1 time in total.
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: Batch file to quick start game

Post by davisdude »

It needs a period at the end.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
User avatar
Beelz
Party member
Posts: 234
Joined: Thu Sep 24, 2015 1:05 pm
Location: New York, USA
Contact:

Re: Batch file to quick start game

Post by Beelz »

Code: Select all

"c:\Program Files\LOVE\love.exe" "%cd%"
Just change the path to where ever your love.exe is and save as something like 'run.bat'.

Code: Select all

if self:hasBeer() then self:drink()
else self:getBeer() end
GitHub -- Website
Ximici
Prole
Posts: 13
Joined: Sun Apr 21, 2013 5:55 pm

Re: [SOLVED] Batch file to quick start game

Post by Ximici »

Thank you very much!

The code worked with the %cd% .

--Ximici
User avatar
_j0sh
Prole
Posts: 1
Joined: Fri Dec 04, 2015 4:16 am

Re: [SOLVED] Batch file to quick start game

Post by _j0sh »

If you're using Linux, you can open a terminal in the folder that contains your "main.lua" file and run love .. I'm not too sure about Windows, however.
Hello, i'm _j0sh! I like to program and play video games. I also host a MineCraft server! play.pink-craft.net:28367
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest