Game Launcher / Storing Passwords?

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
parallax7d
Citizen
Posts: 82
Joined: Wed Jul 02, 2014 11:44 pm

Game Launcher / Storing Passwords?

Post by parallax7d »

I'm considering making a minecraft-type launcher for my game. Something that supports multiple profiles, and stores the current user's name & password locally for easier authentication.

At this point I'm just exploring ideas, would prefer to keep it in Lua so it's fairly portable. Have any of you integrated authentication into your love project? Security is a tricky business, and I would rather follow in someone else's footsteps instead of doing it myself and screwing things up royally. :monocle:
User avatar
I~=Spam
Party member
Posts: 206
Joined: Fri Dec 14, 2012 11:59 pm

Re: Game Launcher / Storing Passwords?

Post by I~=Spam »

Well whatever you do you should not store the values as plain text. ;) I don't have any experience with this kind of thing sorry but this might help you: viewtopic.php?t=79331&p=177712 You might be able to find something that is (mostly) unique to every computer and use that to make the encryption key...
My Tox ID: 0F1FB9170B94694A90FBCF6C4DDBDB9F58A9E4CDD0B4267E50BF9CDD62A0F947E376C5482610
Zleub
Prole
Posts: 9
Joined: Mon Nov 03, 2014 2:24 am
Location: France
Contact:

Re: Game Launcher / Storing Passwords?

Post by Zleub »

Hi !

It seems to be multiple questions in such innocent section, i'll try to provide answers, as i'm working such things too.
Before everything, we have to agree on authentification purposes. IMHO, it has no sense to provide authentification in solo gaming other than a save-file name, so i'm assuming your plans for your game are multiplayer persistants states (such as MMO, if i'm quitting at 127, 255, i'm loggin at 127, 255) which implies data protection.

As pointed out by I~=Spam and links, every Lua code given to the client can be read so, it's not a option to put your authentification code in the client-side application. You don't want anyone to be able to access common database and having a client modifying data of another, that's how we come to speak about server-side application. Technically, your server can be HTTP or some custom build, it depends on data you have to move around and how often. Here's my process to get a client to send movement to a server, LÖVE compliant both sides but unworking.

A first introduction to socket would be Google and more specifically because it's ship with LÖVE, LuaSocket.

Code: Select all

-- Client.lua

function init()
	udp = socket.udp()
	udp:setpeername(arg[2], arg[3])
end

function move(direction)
	local tmp;

	if direction == 'up' then
		tmp = "0 -1"
	elseif direction == 'down' then
		tmp = "0 1"
	elseif direction == 'left' then
		tmp = "-1 0"
	elseif direction == 'right' then
		tmp = "1 0"
	end
	self.udp:send(tmp)
end
By having

Code: Select all

 -- Conf.lua
t.modules.window = false
it's possible to launch love without window.

Code: Select all

-- Server.lua

function init()
	udp = socket.udp()
	udp:setsockname(arg[2], arg[3])
	udp:settimeout(0)
end

function update(dt)
	local data, msg_or_ip, port_or_nil = udp:receivefrom()
	if not data then return end

	parse(data, msg_or_ip, port_or_nil)
end
It's hard to elaborate on such large thematic. One of the finest read i had is from GafferonGames.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests