[SOLVED] Running LOVE in just terminal

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
User avatar
Pebsie
Party member
Posts: 144
Joined: Mon Nov 11, 2013 12:35 am
Location: Lincoln, United Kingdom
Contact:

[SOLVED] Running LOVE in just terminal

Post by Pebsie »

As I've coded the server for my current project I've had to use Love2D's functions to, say, find the width of an enemy for collision detection. This means that I need to run love to run the server and I'm having a little trouble. Where it's worked before, it doesn't seem to work any longer. Running the server "game" gives me this error:

Code: Select all

 Could not initialize SDL video subsystem (No available video device)
I thought this might be solved by running it with xorg on a VNC server, but I'm then given this error:

Image

This hasn't ever happened when I've coded servers needing to use Love's functions before. Anyone know of a way around it?
Last edited by Pebsie on Thu Sep 28, 2017 1:32 pm, edited 1 time in total.
Website: http://peb.si
Twitter: @Pebsiee http://twitter.com/pebsiee
Steam: pebsie
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Running LOVE in just terminal

Post by zorg »

Last i tried (with both 0.10.2 and an older 0.11 nightly) with setting t.window to false in conf.lua, it worked for me.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

Re: Running LOVE in just terminal

Post by grump »

What functions do you use?

Try to disable the window in your game's conf.lua:

Code: Select all

function love.conf(t)
	t.window = false
end
If that doesn't work, you could try to add love as a dependency and run the code with luajit instead of love.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Running LOVE in just terminal

Post by bartbes »

It may also be necessary to disable the graphics and window modules in conf.lua:

Code: Select all

function love.conf(t)
    t.modules.graphics = false
    t.modules.window = false
end
User avatar
Pebsie
Party member
Posts: 144
Joined: Mon Nov 11, 2013 12:35 am
Location: Lincoln, United Kingdom
Contact:

Re: Running LOVE in just terminal

Post by Pebsie »

Managed to get it working with the conf file above, both graphics and window set to false. Unfortunately means that I can't use graphics functions like getWidth() / getHeight() for server side collision checking but ah well.
Website: http://peb.si
Twitter: @Pebsiee http://twitter.com/pebsiee
Steam: pebsie
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

Re: [SOLVED] Running LOVE in just terminal

Post by grump »

You could also try to keep the window and force software rendering instead:

Code: Select all

LIBGL_ALWAYS_SOFTWARE=1 love game.love
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: [SOLVED] Running LOVE in just terminal

Post by zorg »

I mean, most games allow you to have the clients have whatever resolution they prefer (multiplayer games), and even then, the world dimensions should not be connected to the window dimensions at all. They should be separate.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Post Reply

Who is online

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