Game Development Community

User login info/password/server

by Zeph · in Game Design and Creative Issues · 09/07/2011 (6:38 am) · 8 replies

I was messing around with the Gui editor, and I managed to change the background, and mess around with the default start options exit buttons... I attempted to created a username password field, and I couldnt find one in the list..

The default client host selection in the gui sample is not what Im looking for to connect to a game.. Im trying to make a dedicated server where the player logs into the server, and creates a character, then loads the level to play... Id like to learn how to make a server with a player username password login screen that connects to the server.. Are there any Torque 3d tutorials that can teach me this?


#1
09/07/2011 (7:04 am)
http://www.garagegames.com/community/resources/view/7605

not t3d but it should give you a starting point
#2
09/07/2011 (11:46 am)
Awesome starting point!! Thanks Bloodknight...

That really gave me a better mental image of its flow chart in execution, and how to work the gui as far as text inputs.. Code looks like it might work, even with some minor edits... One thing that always confused me was what came first sql/php server or the login screen ect... Ive never took on the challenge of doing a log in screen before, and this is great stuff...

If there anymore info out there on topic, I would like to absorb it like a sponge, and learn... May it be advice, books, demos, code snips ect... I mean anything....
#3
09/07/2011 (12:57 pm)
I came across this tutorial from Torque, and Im a little confused... http://www.garagegames.com/products/torque-3d/tutorials

What Im comprehending is Torque already comes with server script setup, and I can host a dedicated server on my Comp, with a my own client for updating, and creating levels.... But the default has a "Hosted Server" connection type, which the gui is set up for...

Im attempting to change this, and get a basic dedicated server up as stated below:

I would like to make a demo world with a login feature that saves character information type database, that myself, and friends can log into to test code, and play around in the world in a ((sandbox test environment)) from my own computer.. Which one day I hope to expand on on a more professional level with other types of dedicated servers, hopefully on a massive level when I have the understanding, and bare bone structures in place, when I fully know, and comprehend what Im doing...

What confuses me is the Login process... Would I need an external web site for php/sql script to save login info, character data or items ect, or can I use my own server for the login info,character data or items ect, and would Torque handle all this from the server script on my dedicated server being ran from my own computer??
#4
09/11/2011 (8:06 pm)
There are a few different complexity levels to this. The built-in functionality allows you to require clients to provide a password to connect to your dedicated server. This is not hard to set up - you just have to find the fields in the preferences files.

To have character data or other persistent information stored on the server you will need to do quite a bit of additional work. You will have to decide on a storage strategy (SQL database, flat file data storage, other), connection method (handled through Torque's built-in networking, secondary PHP/DHTML/other server) and then you will have to build this system into your game. There are some articles in the Resources section on related topics.
#5
09/21/2011 (3:23 pm)
There is a client pref for player name, you could use this as the "login" i suppose?
#6
03/03/2013 (8:14 pm)
I finally have a working Master Server, Mysql working data base, and tables on an external website. I have a website that has a user sign up form. The information in the form fields goes to my database, and its user table after an email validation is confirmed. The information stored is. ID, Fullname, gamename, and password..

Im at the point of attempting to connect the game login screen to that external Mysql database, to pull gamename, and password for authentication to log into the game server by client..

I checked out all the tutorial that T3d offers in the resource section. Ive read 200 pages of resources and non of them work after weeks of testing, and wasting countless hours of my life.. This is pretty crazy...

Does anyone know any actual working resources, tutorial, or working scripts, or scripts that they could share that would get me a basic working connection to my Mysql data base from in game .cs files?
#7
03/11/2013 (10:19 am)
when it comes to mysql, i recall i was using a php based frontend to the database and used... i think it was an httpobject to send my login/pw.

Game server -> php/apache -> mysql
#8
03/15/2013 (10:32 pm)
Yea Im trying to do the HttpObject send via another tutorial.. Im just lost atm on where to include the engine source edit to the code.

Im not even sure if that will work, because from what Im reading, PHP5 has changed from earlier versions, and all older tutorials might not work as intended. My web server uses PHP5.. Since the MYSQL code calls have changed I saw a difference in different tutorials over time as the versions changed.

Also I believe Mysql is changing the way it works with server databases, and retrieving that information in the next year... Unless Im reading wrong on other sites...

This pretty much puts me into a state of void if true until updated resources are released...

Would it be easier to maybe make my web site sign up form store the information in two databases. Meaning any game related information on the signup website connect to a database on my computer, and then retrieve that information from my computer instead of going external.. Not sure if this would make a huge difference.. Or.. Maybe make the game client provide a sign up form that connects to the database on my computer for username, and password.