Page 1 of 4
UDP Networking [Solved]
Posted: Tue Nov 05, 2013 9:28 pm
by spynaz
Is it possible to create a list of running servers so the user can choose which one to join (like on COD) and not having a 24/7 running server that does it?
Re: UDP Networking
Posted: Tue Nov 05, 2013 9:42 pm
by Ranguna259
You can have a main server that contains only the names of other servers and then that same server could reedirect the user to one of the listed servers.
[]
Posted: Tue Nov 05, 2013 11:12 pm
by bekey
-snip-
Re: UDP Networking
Posted: Wed Nov 06, 2013 12:16 am
by spynaz
But the main server would have to run 24/7. Plus I don't feel like paying money to host an online server.
[]
Posted: Wed Nov 06, 2013 2:07 am
by bekey
-snip-
Re: UDP Networking
Posted: Wed Nov 06, 2013 2:38 am
by szensk
spynaz wrote:But the main server would have to run 24/7. Plus I don't feel like paying money to host an online server.
The main server could only receive and relay updates whenever it is running, but that seems like a bad idea because clients would be given incorrect server information. Publish-subscribe scenarios such as this could be done through services like irc/xmpp, if you don't want to run your own server.
Otherwise you could send a message to every single computer on the internet on whatever port your server runs and see if they reply in an appropriate matter. (This is a joke. Don't try to do this. )
Re: UDP Networking
Posted: Wed Nov 06, 2013 7:01 am
by spynaz
bekey wrote:In the IRC example one, the main server is actually a irc.freenode.net.
So you're able to create an irc server on freenode.net for free? If so then how?
Re: UDP Networking
Posted: Wed Nov 06, 2013 7:13 am
by Plu
You can't host your own irc server, but you can use the existing on there. I'm guessing the idea would be to use IRC as the communication protocol; you have a channel, your server connects to that channel and so do the client, and they communicate information regarding other servers via IRC.
An interesting solution.
You can also rent a webserver for hosting a website for as little as $20 per year, if you're afraid of high renting costs. You can make a simple php program to handle messages and send players information on the currently available servers.
In the end you only need a fixed location that is always available so that each client knows where to connect to get the server list. That server doesn't have to do much of anything and so can be really cheap, but you'll not really get out of having that main server.
Unless you go the very complicated route, I guess. I could see options using something like a torrent network to spread the server list, but I can't see an easy way to get that working.
Re: UDP Networking
Posted: Wed Nov 06, 2013 7:49 am
by spynaz
Plu wrote:You can't host your own irc server, but you can use the existing on there. I'm guessing the idea would be to use IRC as the communication protocol; you have a channel, your server connects to that channel and so do the client, and they communicate information regarding other servers via IRC.
An interesting solution.
You can also rent a webserver for hosting a website for as little as $20 per year, if you're afraid of high renting costs. You can make a simple php program to handle messages and send players information on the currently available servers.
In the end you only need a fixed location that is always available so that each client knows where to connect to get the server list. That server doesn't have to do much of anything and so can be really cheap, but you'll not really get out of having that main server.
Unless you go the very complicated route, I guess. I could see options using something like a torrent network to spread the server list, but I can't see an easy way to get that working.
Looks like this is a hard thing to do. I do know how to code with the php language, but I just don't know how I would do this. I guess I'll just make it the way MC did where you have to manually specify a server and connect to it and you could see whether it's online or not.
Re: UDP Networking
Posted: Wed Nov 06, 2013 12:19 pm
by DaedalusYoung
There are also several free hosts with PHP support, so you can try those. I've been using
www.atspace.me and
www.host-ed.net for a while with no problems.