Is that possible?

P

Phemus

Guest
Is that possible to make a login system similiar with this. I want to make 2 types of account:
-Guest Account (like GrowID= Guest Password= Guest)
-Developers

If it's possible, how? I didn't hear it's possible to make textbot on to the scene.
 
C

Christian

Guest
Absolutely. If it's just two names, a simple string check would work.
Code:
///Call to this to get a username from typing on the screen
username = keyboard_string; //Sets the username to whatever is being typed.
Code:
//Call this when a user submits their account info
if (username == "Guest") && (password == "CrazyDoodler127"){
     //Sign-in code.
     //room_goto(rm_account)
}
else
{
     //Throw error so the user knows to try again.
}
If you're having a bunch of accounts, you can use a 2D array, or DS_List(s). jo-thijs, answered your question about text-boxes.
 

jo-thijs

Member
Actually, that second code would be done on the server side and doesn't necessarilly need to be done in GML.
I would personally use PHP for that.
 

FrostyCat

Redemption Seeker
If you want to make a local game then use GM:S: DB as a database or if you're making an online game then use MySQL fo databasing :D (Don't ask me how to do it, I barely use this method)
Damned right he shouldn't be asking you for advice about the online part.

Anyone dumb enough to recommend giving a client raw query-level access to a public database shouldn't be giving advice about online stuff.
 

jo-thijs

Member
giving a client raw query-level access to a public database
If you want to make a local game then use GM:S: DB as a database or if you're making an online game then use MySQL fo databasing :D (Don't ask me how to do it, I barely use this method)
And where did he say the client should be given raw query-level access to a public database?
He only suggested to use MySQL, not to have the GameMaker application directly send the MySQL commands to the server.
Of course you would use MySQL in combination with PHP in such a way that only very specific and safe transactions can occur.
 

Freddy Jones

Your Main Detective
Is that possible to make a login system similiar with this. I want to make 2 types of account:
-Guest Account (like GrowID= Guest Password= Guest)
-Developers

If it's possible, how? I didn't hear it's possible to make textbot on to the scene.
What you're asking is quite vague. Are you asking how to do "guest" and "developer" validation? Or are you asking how to have more than one input boxe? Or both?

To answer input boxes: depends on what you're doing/using for your text-boxes. If it's a well-supported gui library you're using there shouldn't be any problems with having more than 1 text box and retrieving its values. Otherwise you'd have to find another library yourself, or someone here could help you find a solution.
To answer validation: This takes some time to implement with or without adding security. Even without adding some extra security to the process it can be slightly tricky to add this in, but by making it more secure, you'll have a fun time realizing it's next to impractical/impossible to fully prevent (especially if you're using a module that makes it trivial to decipher source code).
The number one rule in making multiplayer games is, "don't trust the client." So whatever you need to do that's important, do it serverside. A simple yes-no check at the login isn't a valid approach. If someone is sending dev-like commands to the server and your server wasn't the one to validate being a dev then it'd be incredibly easy to spoof.
Otherwise, to make it as simple as possible, just ignore that the player might be malicious and use the most straightforward approach you can.
client: sends - name, password
server: checks it against your favorite data-base of usernames and encrypted passwords. If it is a guest account, do simple verification. If it's a real account, logout(if logged in)/login and verify. If dev account do the same as a real account accept add somewhere on the client or server(preferably) you're a dev.
 
P

Phemus

Guest
I just asked for login part "-_- and I wanted to who can tell me codes and tell where I should put them. I'm not making a client or multiplayer game. That's why I said "similiar".
 
Top