Page 1 of 1

Possible to run LOVE2D entirely from TTY? (console)

Posted: Mon Jun 25, 2018 1:32 am
by Substance12
A while ago I asked if there was a way to run LOVE2D without a window and I was told that it's possible, and I tried and it can indeed be done :awesome: However, as I was developing a server for a multiplayer game, I tried to run it on a Linux server and I got an SDL error saying that it required a graphical server in order to run. I had a different host that ran a desktop, and when I tried to run it in there, it worked perfectly. Is there a way to run a game completely from command-line, without having the need for a graphical server?

Re: Possible to run LOVE2D entirely from TTY? (console)

Posted: Mon Jun 25, 2018 2:15 am
by pgimeno
In conf.lua, disable the window module:

Code: Select all

function love.conf(c)
  c.modules.window = false
end
Note that's different from disabling automatic creation of the window. For the latter, you instead do c.window = nil, but if you don't disable the window module too, it still needs graphics.

Works for me with 0.10 and 11.x. In LÖVE 0.9, you have to disable the graphics module as well. In 0.8, disabling the graphics module suffices. I didn't try earlier versions.

I tried by unsetting my DISPLAY variable, so YMMV.

Re: Possible to run LOVE2D entirely from TTY? (console)

Posted: Mon Jun 25, 2018 4:25 am
by Substance12
I've tried disabling both modules and setting t.window to nil, but it still gives me an error asking for a graphical server