Jump to content
  • Advertisement
Sign in to follow this  
dongzhe

Game Lobby

This topic is 3221 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

HI guys I am try to make a game lobby, it would have same purpose as Garena. people could login and enter a room, player could play a game with people in same room. the game i would like to have are like warcraft, Star Craft , CS and so on. as we know, these game are communicate via UDP broadcast. the host will broadcast data to all LAN. UDP broadcast will be rejected by internet. therefore the lobby would establish a virtual LAN, player from different locations in the world could see each other and play the games together. When i say VLAN, please don't misunderstand with normal "VLAN". they are different. "VLAN" only works at same location, but what I need is across the internet. here is some of my ideas: 1. VPN, but I think it will not work well, it will cause too much overhead. 2. develop your own stuff like vpn, IP encapsulation, get rid of security. I am not too sure. I hope you could help me with 1. What method I could use to see each other, jion the host, play the games. but keep this in mind all the game i am talking about using UDP broadcast 2. any suggestions with that when game start, should the lobby act like data exchange center or all the data goes among the players only? and how to achieve the your suggestions i know it is big question, but any small ideas would help. if any one have same interest, you could join the group NetworkGaming@groups.live.com

Share this post


Link to post
Share on other sites
Advertisement
These games don't communicate via UDP broadcast, just UDP (and not even multicast). UDP will not be rejected by the internet (or else, most multiplayer games would not even work), but broadcast will.

Why would you need broadcast? Advertising/discovering the rooms? There are virtual LAN solutions, but from the top of my head I can't remember. Maybe you ought to post in the networking forums instead.

Share this post


Link to post
Share on other sites
Quote:
Original post by oliii
These games don't communicate via UDP broadcast, just UDP (and not even multicast). UDP will not be rejected by the internet (or else, most multiplayer games would not even work), but broadcast will.


Yes, may be you are right about it, when the game start, they talk via UDP only, but when you set a host, you are broadcasting.

Share this post


Link to post
Share on other sites
Not in the strict sense. 'Broadcasting' is creating a UDP broadcast socket, which works only on LAN (or virtual LAN). Basically telling the routers (under the same domain) to send that packets to everyone connected to them. On the Internet, that's just not possible :)

The host indeed 'broadcast' to the clients of the session (game lobby or otherwise), but it's just using a normal UDP socket (or several, one per client, although one for the entire game will be enough, like for XBox Live games), to the clients connected to the session.

The client connections, registrations, keep-alive and disconnections are usually ad-hoc solutions loosely based on the TCP/IP protocols.

So in essence, the host sends multiple UDP packets, via a basic UDP socket. That is still sending basic UDP packets.

These packets travel the internet quite happily, however you have to go through router security, as most users will be behind a firewall / router (NAT punchthrough).

There is talk of bringing multicast sockets, that reduced the overall bandwidth required from the host end-point, although that's not really feasible and supported at this time (and will it ever).

If you want to use a virtual LAN as a basis for your game, this has been done before, for example to play Quake across the Internet. But it's really not how most games do it.

Share this post


Link to post
Share on other sites
look, I don't have control over the source code of these games, when you host a game, it will work only in LAN, they will broadcast the data to other pc in LAN(even you are outside of firewall, broadcast will not going onto internet) to see if any other players is alive and setup the connection. these data should be captured, encapsulated and then send to game lobby.

when game lobby for exmaple has three clients, one clent host a game, and other two client jion the this host. when game start game lobby should no longer be a data exchanger. two connect should be setup. client 1 to host and client 2 to host.

assume I have all the IP info about these three client, how to make them to talk to each other by themself. ppp? L2TP? any ideas? detials?

Share this post


Link to post
Share on other sites
Instead of writing your own you could use something like RakNet. It provides a lobby system and it is free to use until you earn over $250,000. I have not checked myself but it might be possible to just use the lobby features without anything else from the RakNet system.

RakNet by Jenkins Software

The Lobby System

Share this post


Link to post
Share on other sites
Quote:
Original post by kbar
Instead of writing your own you could use something like RakNet. It provides a lobby system and it is free to use until you earn over $250,000. I have not checked myself but it might be possible to just use the lobby features without anything else from the RakNet system.

RakNet by Jenkins Software

The Lobby System



thanks lot man, but I am more interesting in technical side of it. do you know any open source ?

[Edited by - dongzhe on December 10, 2009 5:13:53 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!