LÖVE2D help

Xen0

Well-Known Member
OP
Member
Joined
Oct 8, 2015
Messages
532
Trophies
0
Age
25
XP
1,967
Country
Germany
So I´m learning lua atm but there´s one thing that keeps annoying me. Everytime I want to test the project I have to drag the complete folder over the love.exe. I know you can avoid that by inserting a .bat in the projects diretory, but for me it somehow don´t work.
My .bat contains
Code:
@ECHO OFF

start "" "%PROGRAMFILES(x86)%\LOVE\love.exe"
And when executing the .bat it even opens the love.exe but it´s just the default screen when there´s no game.

any suggestions?
 

Veiva

Member
Newcomer
Joined
Dec 22, 2011
Messages
19
Trophies
0
XP
105
Country
United States
You need to specify the path to the game as an argument.

I'd suggest:

Code:
@echo off

"C:\Program Files (x86)\LOVE\love.exe" --console "C:\path\to\game"

This would work if "C:\path\to\game" contains main.lua (i.e., the directory containing your Love game).

(You'll be able to see the result of print calls with the --console flag, since it seems possible you're not using an editor that supports debugging Lua programs. I suppose this is why you used "START"?)
 
Last edited by Veiva,
  • Like
Reactions: migles and Xen0

Xen0

Well-Known Member
OP
Member
Joined
Oct 8, 2015
Messages
532
Trophies
0
Age
25
XP
1,967
Country
Germany
I'll test this tomorrow :)
I just used start because it was made so at the tutorial I'm watching (there it works for whatever reason) and also on the official love2d wiki.

Edit: Actually I tryed ASAP, at it works, thank you :)
 
Last edited by Xen0,

Xen0

Well-Known Member
OP
Member
Joined
Oct 8, 2015
Messages
532
Trophies
0
Age
25
XP
1,967
Country
Germany
Well have anither problm actually: I want a ball get bounced off another rectagle, so a little pong-game, how do I that? Both objects are dynamic and when they collide the rectangle get bounced by the ball too. I tried to give the rectangle more weight, but that didn´t really solve it.
 

Xen0

Well-Known Member
OP
Member
Joined
Oct 8, 2015
Messages
532
Trophies
0
Age
25
XP
1,967
Country
Germany
How can I make a dynamic Object with a picture? I only manage to show a image up and move it and stuff, but it can go though walls because it´s no object :x
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Veho @ Veho: Imagine putting your butt near it :tpi: