Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Setting up logins and accounts

Author
Message
Inflictive
17
Years of Service
User Offline
Joined: 16th Jun 2009
Location: Altis
Posted: 14th May 2012 03:35
Hi, i'm working on a singleplayer game. The game will present you with a login screen when you first start it, and you must login to play the game(even though there is no multiplayer). There will be 2 versions of the game: a free version and a paid version. They will both be within the same exe, and whether the game runs in "free mode" or "paid mode" will be decided when you login(based on whether you login into a FREE account or a PAID account).

So to make this work I will need some sort of master server, so the clients can connect to it and send their username/password and basically recieve back 0 for failed login, 1 for free account, 2 for paid account. I'm trying to decide how to set up the master server. I'm thinking I'll use php scripts for the master server, and the php scripts will then connect to a MySQL database to search for the user. That's how you're supposed to do it, right? I also want to eventually set up a website where you can log in, edit your account, etc, so the php/sql setup is probably best.

I was thinking I'd leave my computer on all the time to host the server, running apache+php and MySQL. A problem is, when I was experimenting with web design it seemed like you couldn't connect to a localhost or lan host by typing in the outgoing ip. Basically the problem with that is... my game wouldn't work on my computer or lan network because it wouldn't be able to connect to the master server. I could do some workaround where it connects to whatismyip.com, and if if the ip returned = my ip, then it just skips the login and lets me play, but that seems kind of lame.

What would you guys do?

"This plan is so perfect... it's retarded."
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 14th May 2012 09:33
Hi there buddy...

If you need a MySQL hosted database and some web space... Just ask... You could just give me a 2 account

Yes that is the best setup and yes I have a datacentre hosted site ith Apache so you can use php and also MySQL and can give you ftp access...

But I would like to know more about your game

GreenDixy
17
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 14th May 2012 13:29
I am not sure if this will help or not its a client and server user register this was not made by me was posted on forums.




Server



======================================
My software never has bugs. It just develops random features.
Inflictive
17
Years of Service
User Offline
Joined: 16th Jun 2009
Location: Altis
Posted: 15th May 2012 04:47 Edited at: 15th May 2012 04:48
So which do you think would be better- if I hosted it myself or used a free hosting service? I don't mind leaving my computer on, and I am really leaning towards hosting it myself so that I would have better control of everything. The only problem I can see with hosting it myself that I can see is, it would be a lot harder to debug and also I would have to figure something out so that I could play it as well.

The game is a physics sandbox game called Physigons:
http://www.indiedb.com/games/physigons

"This plan is so perfect... it's retarded."
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 15th May 2012 05:43
I would say get it hosted... Any number of things could happen to your system... Broadband outtage... Electrical failure... System error... Maxed out resources... Free or lockup...

You can get a host which provides several databases so you can always have a live version and a testing version and then from your testing version move the tested changes over to the live version...

That way you have a much better up time and no delay...
Oh think about it... Whether you are uploading or downloading you could be straining your connection

Thus can be whether you are on traditional copper or fibre broadband...

GreenDixy
17
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 15th May 2012 12:18
I would say use a database also thats what i am doing i just used the codes for reference thought they might be usefull.

======================================
My software never has bugs. It just develops random features.
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 15th May 2012 12:24
cheers GreenDixy

Login to post a reply

Server time is: 2026-07-22 00:34:13
Your offset time is: 2026-07-22 00:34:13