Wifi Idea's ... Master Server List In Php ...


joyrider

Active Member
Joined
Mar 29, 2006
Messages
589
Age
43
Website
www.willemssoft.be
Hey guys,

I once started a multiplayer Tron clone but never finished it and i thought the Caanoo might be a good console to pick it up again, it used SDL_NET And i think i used TCP could have been udp as well with some kind of handshaking / command sending mechanism, but the problem was that everyone needed to have a good connection since the server waited till everyone's command came in before it sended out the players real position's... this kinda worked but anyway i want to discuss something else here...

I have been playing with an idea for a master server system in the style of the "Original Unreal tournament" game BUT i'm thinking of doing the list on my website in php given i'm able to do a http post or get command somehow but that are worries for later.

Here's my idea :

i basically have a multiplayer game (lets name it GAME) and my website with mysql etc.

A player from my GAME starts a new server, the GAME sends a command to my website with the IP of the newly made server and saves it in a database or txt file which will be sended to other players when they browse for multiplayer servers.

Now since you can't really ping (perhaps using php one can, but i don't want to stress my website server to do so) from a website, i was thinking on whenever a player refresh the server list (which he gets from my website while not actually seeing it) the GAME would ping every server to get the latency from the point of the gamer to the server. If a certain server times out say ping takes more then 5 seconds or no reponse from the server in that time, the game would send another HTTP POST / GET to my website to let it know that the (user) server of my game in question did not respond. On my website i keep track of how many such failed ping results to a certain game server occured and say when it hits 5 timeouts i'd remove the server from my master list on my website.. I also think i should send some sort of "let the master server know i'm still alive" command to my website to prevent false positives.

I can only see good (Pro's) things in this system :
1) no need for REAL servers which are always online
2) users of the game host the servers
3) users also basically maintain the server list as does the game itselve by sending the "i'm still alive command"
4) No real stressy situations for my website since all it handles are http post / get command's and it would act as if a user just visited my website
5) could be really easily implemented on my website in php even without databases, a simple text file would work as well

I do see a few CON's:
1) The amount of servers depend on the users playing the game and creating / hosting servers
2) nowadays most wifi setups at home use some kind of router, so the game will only see the internal ip address, and i can't really send that out to my master server (although private network ip address are known, so i should be able to filter them). EDIT : The webserver probably knows the real ip and i can probably get that using simple php commando's
3) given point 2 is this even possible with wifi to do this kind of system, don't all wifi enabled devices get some kind of internal ip address, if so how could i get this system going ??
Edit : might still be a problem, cause most routers do have a firewall so only way i can see this to work is by placing the caanoo in the DMZ zone then of the router and most end-users have no clue what the hell that even is, let alone how to configure their router(s)

Any idea's are welcome, especially on point 2 & 3 from the cons... since i don't have a clear idea on this, unless the DMZ on the router can help with this (DMZ basically places one single device outside of the router's firewall and exposes it to the internet).
 
Back
Top