PDA

View Full Version : host-client matchmaking "server"...


dave05
2005.09.15, 02:51 PM
Hey everyone, I've passed the general design and development stage for my game, and now I've written a basic client-server model, whose specific inner-workings I will describe below. I'm not familiar with how things are generally done in the online-multiplayer game world, so I'm essentially just hoping for some criticism, suggestions, etc.

Basically, I have a 'master server' (I don't know much networking lingo either), which accepts registrations, logs in new users, and allows existing users to sign in using an id_number / user_name / password filter to verify users are who they say they are. Duplicate user names aren't allowed, naturally, and I verify lower-case vs. lower-case...

Anyways, I don't have a T1 connection, only DSL. (i'm willing to get a high-bandwidth connection, but i don't believe it is necessary for the way I'm envisioning the server working) Thus the master server will simply match up hosts with clients. Basically I allow users to check (or not check) a "willing to host" box, and the server, comparing various win-loss statistics of 2 players, will tell the host to "listen," then pass the host's IP address to the client. Then both socket connections to the "master server" will cancel, and the two players will connect directly to each other for the duration of the match.

Once the game is finished, both players will reconnect to the main server.

apparently computers connected to the internet via a router will not be able to host using this method, which is why people using a router should not be "willing to host." Anyways, that's just my opinion on how to get this to work...

Also, i think i should make the player read some kind of disclaimer, ie "your ip address will be accessible by a third party, bla bla bla"...

let me know what y'all think.

thanks - dave

Steven
2005.09.15, 05:51 PM
You really need a way around the no-router restriction. That could be killer. The user can enable port forwarding/masquerading/DMZ/whatever and fix it manually, but it's a pain to do so and I know that at least Skype has found a way to bypass NAT...

dave05
2005.09.15, 06:54 PM
the only thing i can think of to get around the no-router restriction, is something a friend suggested i do - launch a "host" on the server machine for each pair of players for which neither can host. I assume such a thing would require a T1+ connection though, so...

I'm not saying I'm not willing to shell out the dough for more server bandwidth, but first I want to finish the peer-to-peer thing so I can beta test for as little money as possible :\

Steven
2005.09.15, 07:03 PM
Here's one idea:
http://en.wikipedia.org/wiki/UDP_hole_punching