Help needed for a local "multiplayer" game

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
Kulbeans
Prole
Posts: 3
Joined: Thu Sep 05, 2019 1:32 pm

Help needed for a local "multiplayer" game

Post by Kulbeans »

Hi everyone,

First of all, I'm fairly new to game development in general and Love2d in specific so I apologise for any noob question I might have. I would like to a have a quick brainstorm with you regarding my project and how can I approach it with Love2d.

Right now I have a Nodejs application (the game backend) that's running on a Raspberry Pi. There are a couple controllers connect via USB (next step is having them wirelessly). The game frontend/GUI is a simple thing I'm developing in React as a Web app. That way I could open it in a browser locally, show it on a TV through HDMI while people use their controllers. I also need to have someone connected through a different interface (let's call it an admin panel) to control some things of the game while it's running through a smartphone. I would like to use Love2d to spice up the main GUI, without being limited by a Web framework (also make the development quicker).

My questions are:
a) is this a good use case to use Love2d?
b) can I run Love2d on a Raspberry Pi? If so, how?
c) can I use the same Nodejs backend?
d) Are sockets supported?
e) how can I do with the admin panel?

Thanks!
User avatar
ivan
Party member
Posts: 1911
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Help needed for a local "multiplayer" game

Post by ivan »

Just to clarify, is this a split/shared screen game? If "yes" then why do you need a backend at all?
Love2D supports multiple controllers which is enough for a couch multiplayer game - no need for a server/backend at all.
LuaSocket is included with Love2D and it works quite well (no support for HTTPS though).
Kulbeans
Prole
Posts: 3
Joined: Thu Sep 05, 2019 1:32 pm

Re: Help needed for a local "multiplayer" game

Post by Kulbeans »

ivan wrote: Fri Sep 06, 2019 6:17 am Just to clarify, is this a split/shared screen game? If "yes" then why do you need a backend at all?
Love2D supports multiple controllers which is enough for a couch multiplayer game - no need for a server/backend at all.
LuaSocket is included with Love2D and it works quite well (no support for HTTPS though).

Everyone should be playing in the same screen (it's a trivia game). The backend would be so we can connect to the admin panel via a mobile phone, but I am open to other ideas.
What kind of controllers are we talking about? Because these are not traditional ones...
Thanks for all the info!
User avatar
ivan
Party member
Posts: 1911
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Help needed for a local "multiplayer" game

Post by ivan »

developing in React as a Web app
Ok so I think I understand now.
For your Love2D client I would recommend downloading the trivia data/content when booting and then running the game session locally.
As mentioned before, LuaSocket could be used to make HTTP requests.
It doesn't really matter how the backend works since it would communicate with Love2D using HTTP.
I think administering the game "while in progress" would make things considerably more difficult for both your backend and Love2d client.
Kulbeans
Prole
Posts: 3
Joined: Thu Sep 05, 2019 1:32 pm

Re: Help needed for a local "multiplayer" game

Post by Kulbeans »

ivan wrote: Wed Sep 11, 2019 7:03 am
developing in React as a Web app
Ok so I think I understand now.
For your Love2D client I would recommend downloading the trivia data/content when booting and then running the game session locally.
As mentioned before, LuaSocket could be used to make HTTP requests.
It doesn't really matter how the backend works since it would communicate with Love2D using HTTP.
I think administering the game "while in progress" would make things considerably more difficult for both your backend and Love2d client.
Got it, seems OK to me.
Having the admin panel is a must for what I want to do... As far as I could understand from the docs, LuaSocket doesn't work like a socket, right? Is there a way I can use sockets with Love2d?
Thanks again!
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Help needed for a local "multiplayer" game

Post by raidho36 »

LuaSocket is just a Lua interface for standard OS sockets library. It's a Lua-specific program so you just load it from Lua.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 52 guests