Rithy58 Posted January 11, 2012 Author Share Posted January 11, 2012 A while a go, I made something called "Authentication Server" ~~stolen from~~ guided by Robin.It is pretty much the same thing that Crystalshire and I believe also OTLR have.Please note that this is the "base" or unfinished version. It is meant to give you an idea on how to do it or integrated it into your project, etc.Instead of having the Server handling Client's login, why not have a different Authentication Server that do that? This open up lots of possibilities such as MySQL(Forums) Account integration, Multi-Servers, and lots of other features.So how does this work exactly?Well, everything is the same except the Client have a dedicated WinSocket called AuthSocket that connect to the Authentication Server. There is also the modAuth.In this version, I put in the base code enough for you to get started and ~~a very dumb login check~~ it doesn't even check, just let you go through. So when you open the Client, not only did you connect to the Server, but you also connect to the Authentication Server. When you login, the Client send the login data to the Authentication Server. The Authentication Server then check the login and response back to the Client(in this version, it just send the LoginOk packet). If the client receive an AuthSLoginOk packet, it simply tell the Client to SendLogin to Game Server and the Game Server do what it usually do(you should probably remove the Login Check).As you can see, the Authentication Server is used only during the login using its own dedicated Socket. For the rest of the time, the Client and Server use their own Socket like they usually do.Possible things you can do with this:Make Authentication Server check the Login Data against a remote MySQL database(like Crystalshire)With ^ that, you can also dump character info to the MySQL DatabaseMulti-Server Selection: After login with Authentication Server, select which server to login then flagged the user as logged in with the Authentication ServerThere are so many possibilities you can do with thisOh and if you ask why not just let the Server access the MySQL database. It's because I've been told that doing so would really decrease the Server performance. The Server should be game related only while the Authentication should be for well…authenticating.Download:Sorry, no download. Just read the text and make one yourself. It shouldn't be hard once you understand how it work.Sincerely,Rithy Link to comment Share on other sites More sharing options...
Joyce Posted January 11, 2012 Share Posted January 11, 2012 Damn you for beating me to finishing it! But that means I get to copy this. ;]Nicely done though. :]And MySQL queries from VB6 are horribly slow. So letting your main server do this is indeed, a terrible idea. Link to comment Share on other sites More sharing options...
Rithy58 Posted January 11, 2012 Author Share Posted January 11, 2012 @Yami:> Damn you for beating me to finishing it! But that means I get to copy this. ;]> > Nicely done though. :]> > And MySQL queries from VB6 are horribly slow. So letting your main server do this is indeed, a terrible idea.This was done like months ago LOL. I just never got to release it. Actually, I have a better version done with MySQL coded in and the Authentication Server also connect to the Server and stay connected. I just thought releasing this basic version would be better. I just hope there isn't anything stupid in there cause I didn't check it thoroughly.And thank you, do whatever you want with it. And enlightened me with anything you find a better way of doing or any mistake I made.Sincerely,Rithy Link to comment Share on other sites More sharing options...
Joyce Posted January 11, 2012 Share Posted January 11, 2012 Interesting, I started mine a few days ago. But put it in the back of my mind and wanted to finish it later :P Mine was only keeping track of server status so far though. :] So might modify this one to include that <3 Link to comment Share on other sites More sharing options...
cheatking Posted January 11, 2012 Share Posted January 11, 2012 Wait, the client contacts the authentication server? Link to comment Share on other sites More sharing options...
Rithy58 Posted January 12, 2012 Author Share Posted January 12, 2012 @Mr.:> Wait, the client contacts the authentication server?Yep. During Login(Main Menu), Client is connected to Authentication Server. So with that, you can do all kind of stuff. I just choose to modify the Login to send the data to Authentication Server with SendAuthLogin intead of SendLogin. However, in modAuth, there is HandleAuthLoginOk, which basically triggered by the Authentication Server sending a AuthSLoginOk packet. HandleAuthLoginOk basically call SendLogin.So, Client <-> Authentication Server during Login. Once the Client send the Login packet to the Server and receive the LoginOk packet, the Client <-> Server continue like it usually does. I think I messed something up but I wanted the AuthSocket in the Client to close once you're inGame.Sincerely,Rithy Link to comment Share on other sites More sharing options...
Robin Posted January 12, 2012 Share Posted January 12, 2012 I'm disappointed. Link to comment Share on other sites More sharing options...
Rithy58 Posted January 12, 2012 Author Share Posted January 12, 2012 @Robin:> I'm disappointed.Why?Sincerely,Rithy Link to comment Share on other sites More sharing options...
Robin Posted January 12, 2012 Share Posted January 12, 2012 Because I walked you through every step of this under the promise that you wouldn't be releasing it.If I wanted this stuff floating around I would have released it myself when I did it 12 months ago. Link to comment Share on other sites More sharing options...
kris_hole Posted January 12, 2012 Share Posted January 12, 2012 What ~~scrooge~~ robin said… i think? Link to comment Share on other sites More sharing options...
Rithy58 Posted January 13, 2012 Author Share Posted January 13, 2012 @Robin:> Because I walked you through every step of this under the promise that you wouldn't be releasing it.> > If I wanted this stuff floating around I would have released it myself when I did it 12 months ago.Oh, I'm very sorry then. Someone just PM me that the link doesn't work so umm…I guess it stop there then :DI didn't release a full-fledged finished one. This is a very basic base that I thought it would help other people. Beside, it require a lot of coding to get it to what you want it to be. This was the code of my first attempt and I released it more as an educational thing than something for everyone to use out of the box.Anyway, I'll leave the text so someone can understand how it work and make one themselves and I'll remove the download link.Sincerely,Rithy Link to comment Share on other sites More sharing options...
ark0n Posted January 13, 2012 Share Posted January 13, 2012 I'm working on my auth server as well, I'll be sure to post screen-shots as i go. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now