UDP networking on Chromebook.

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
artificialallium
Prole
Posts: 9
Joined: Sun Feb 06, 2022 7:10 pm

UDP networking on Chromebook.

Post by artificialallium »

I am following the networking tutorial on

https://love2d.org/wiki/Tutorial:Networking_with_UDP

And have got to the server part.
I am currently using a love2d extension of VScode to run my code as it seems to be one of the only ways to run code on the built in debian on ChromeOS.
How would I install lua (With socket) onto my machine and run it in a seperate vsCode window?

Thanks!!
Andlac028
Party member
Posts: 174
Joined: Fri Dec 14, 2018 2:27 pm
Location: Slovakia

Re: UDP networking on Chromebook.

Post by Andlac028 »

To install lua socket, or other lua libraries for lua, try to look at luarocks.

Not sure, how you run your code (I am not VS code user), but if you have love installed, just type love . in terminal (assuming you are in directory with main.lua, else use love path/to/game)
artificialallium
Prole
Posts: 9
Joined: Sun Feb 06, 2022 7:10 pm

Re: UDP networking on Chromebook.

Post by artificialallium »

I am not talking about running the love code, I am talking about running the LUA code in a seperate window. I need to create a server program this is coded in lua, not love.
User avatar
pgimeno
Party member
Posts: 3544
Joined: Sun Oct 18, 2015 2:58 pm

Re: UDP networking on Chromebook.

Post by pgimeno »

Why not in Löve? Löve can run headless. You just have to set c.window = nil in love.conf, and disable some modules including love.graphics and love.window. It's pretty convenient to use Löve because it provides networking and threading.

This is the love.conf I use for a headless server:

Code: Select all

function love.conf(c)
  c.window = nil
  c.modules.audio = false
  c.modules.graphics = false
  c.modules.image = false
  c.modules.keyboard = false
  c.modules.mouse = false
  c.modules.sound = false
  c.modules.window = false
  c.modules.physics = false
  c.modules.joystick = false
end
Post Reply

Who is online

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