Love window doesn't open when building in Sublime Text 2

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
DelishusCake
Prole
Posts: 8
Joined: Sat Mar 10, 2012 8:31 pm

Love window doesn't open when building in Sublime Text 2

Post by DelishusCake »

I cannot seem to get Sublime Text 2 to play nicely with love 0.9.0. My previous love build file, which worked perfectly for love 0.8.0 doesn't appear to work for 0.9.0:

Code: Select all

{
	"path": "/apps/SDKs/love",
	"cmd": ["love", "${project_path:${folder:${file_path}}}"],
	"selector": "source.lua.love"
}
When i run the build, even for the simple hello world project:

Code: Select all

function love.draw()
	love.graphics.print("Hello World!")
end
All I get for my efforts is a blank console, no errors, no "no code to run", no "no game" screen:
Image
Checking my task manager out of suspicion rewards me with this:
Image
love.exe is running, just not opening a window for some reason :? .
User avatar
MadByte
Party member
Posts: 533
Joined: Fri May 03, 2013 6:42 pm
Location: Braunschweig, Germany

Re: Love window doesn't open when building in Sublime Text 2

Post by MadByte »

Did you created a conf.lua file ?
If so, check if "t.window.display" is present and set to 1.
If not add it to the conf file.

https://www.love2d.org/wiki/Config_Files

Maybe that's the problem.
DelishusCake
Prole
Posts: 8
Joined: Sat Mar 10, 2012 8:31 pm

Re: Love window doesn't open when building in Sublime Text 2

Post by DelishusCake »

MadByte wrote:Did you created a conf.lua file ?
If so, check if "t.window.display" is present and set to 1.
If not add it to the conf file.

https://www.love2d.org/wiki/Config_Files

Maybe that's the problem.
I didn't have a conf.lua before, but adding one doesn't seem to remedy the situation :( Thanks for the input though :)

Code: Select all

io.stdout:setvbuf("no")
function love.conf(i)
	i.window.width = 800
	i.window.height = 600
	i.window.resizable = false
	i.window.display = 1
end
Ravey
Prole
Posts: 2
Joined: Sat Jun 08, 2013 1:14 pm

Re: Love window doesn't open when building in Sublime Text 2

Post by Ravey »

Setting the window to 'borderless' still seems to work.

edit: thanks urraka! The console also opens properly with shell=true
Last edited by Ravey on Sun Dec 15, 2013 12:22 am, edited 2 times in total.
urraka
Prole
Posts: 1
Joined: Sat Dec 14, 2013 10:41 pm

Re: Love window doesn't open when building in Sublime Text 2

Post by urraka »

Try adding this to your ST2 build config:

Code: Select all

"shell": true
If that doesn't work you can also try changing the command to this:

Code: Select all

cmd: ["start", "love", "${project_path:${folder:${file_path}}}"]
DelishusCake
Prole
Posts: 8
Joined: Sat Mar 10, 2012 8:31 pm

Re: Love window doesn't open when building in Sublime Text 2

Post by DelishusCake »

Thank you both! :awesome:
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 192 guests