Page 1 of 1

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

Posted: Sat Dec 14, 2013 5:36 pm
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 :? .

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

Posted: Sat Dec 14, 2013 5:40 pm
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.

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

Posted: Sat Dec 14, 2013 5:44 pm
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

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

Posted: Sat Dec 14, 2013 8:39 pm
by Ravey
Setting the window to 'borderless' still seems to work.

edit: thanks urraka! The console also opens properly with shell=true

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

Posted: Sat Dec 14, 2013 10:47 pm
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}}}"]

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

Posted: Sun Dec 15, 2013 4:47 am
by DelishusCake
Thank you both! :awesome: