Thin client

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
Zeex00
Prole
Posts: 2
Joined: Thu Dec 22, 2016 7:33 am

Thin client

Post by Zeex00 »

Would it be feasible to create a sort of "Thin client" using love2ds current setup?
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Thin client

Post by Nixola »

What would a "thin client" be?
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
peterrust
Prole
Posts: 42
Joined: Thu Dec 29, 2016 8:49 pm
Location: Bellingham, WA, USA
Contact:

Re: Thin client

Post by peterrust »

Zeex00,

Do you mean something like a browser that downloads and executes assets and code Just-In-Time from various addresses via HTTP? One problem would be sandboxing -- you would want to add guards to love2d to keep downloaded code from reading/writing arbitrary files on your hard drive, etc. I'm not sure if love2d provides much sandboxing, but if it does, I doubt that it provides as much as browsers do.
Germanunkol
Party member
Posts: 712
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: Thin client

Post by Germanunkol »

peterrust wrote:Zeex00,

Do you mean something like a browser that downloads and executes assets and code Just-In-Time from various addresses via HTTP? One problem would be sandboxing -- you would want to add guards to love2d to keep downloaded code from reading/writing arbitrary files on your hard drive, etc. I'm not sure if love2d provides much sandboxing, but if it does, I doubt that it provides as much as browsers do.
I don't know what a thin client is, either, but just wanted to add that sandboxing is quite a thing in Lua, and thus, in Löve.
One of Lua's original purposes was to provide scripting extensions to programs (modding etc.) and such extensions should always be sandboxed, so it was engineered into Lua from the beginning (AFAIK).
I used it quite a lot for trAInsported as well, since users run their own Lua code within my game, so I needed to make sure that the code can't read files etc.
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
User avatar
peterrust
Prole
Posts: 42
Joined: Thu Dec 29, 2016 8:49 pm
Location: Bellingham, WA, USA
Contact:

Re: Thin client

Post by peterrust »

Germanunkol wrote:sandboxing is quite a thing in Lua, and thus, in Löve.
One of Lua's original purposes was to provide scripting extensions to programs (modding etc.) and such extensions should always be sandboxed, so it was engineered into Lua from the beginning (AFAIK).
I used it quite a lot for trAInsported as well, since users run their own Lua code within my game, so I needed to make sure that the code can't read files etc.
Thanks for the correction Germanunkol! I come from a Javascript background & was guessing (wrongly, it seems) about Lua's sandboxing capabilities in comparison to JS. Looks like it's actually fairly easy to set the environment that you run the untrusted code in via `setfenv()` (see http://stackoverflow.com/questions/1224 ... ua-sandbox).
Zeex00
Prole
Posts: 2
Joined: Thu Dec 22, 2016 7:33 am

Re: Thin client

Post by Zeex00 »

I was referring to a client/server relationship where the client just sends key presses,and basic vars across the network to the server.While the server handles all gamelogic
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Thin client

Post by zorg »

It's completely possible to implement an authoritative server model, and that's what it's called. :3
It is a bit involved though, if you want to do it right, see this very nice article about it: http://gabrielgambetta.com/fpm1.html
This is also neat, as a supplementary for the above: http://gafferongames.com/networking-for ... etworking/
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 227 guests