Possible to run LOVE2D entirely from TTY? (console)

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
Substance12
Prole
Posts: 19
Joined: Fri Dec 11, 2015 7:01 pm

Possible to run LOVE2D entirely from TTY? (console)

Post 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?
User avatar
pgimeno
Party member
Posts: 3550
Joined: Sun Oct 18, 2015 2:58 pm

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

Post 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.
Substance12
Prole
Posts: 19
Joined: Fri Dec 11, 2015 7:01 pm

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

Post 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
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 206 guests