Game Lists

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • RE: Game Lists

      Why do you need al ist of all teh hosts if its jsut peer to peer. the only peopel that need to worry about who's connected is the Host and listener.

      What you could do is set it up like IRC and just relay the host lists around to everyone connected but that may take up some memory and i'm sure your player wont be happy to have 256mb of their memory taken up just so you know who's playing.
      .Code
      push you ; haha!
    • What I want is the player to see a list of all currently available games they can join...I thought of using UDP to say "HEY! Who has a game I can Play" and getting all the people who hosted the game to send back a name. When the user has chosen a game, the host says whos playing and where they are and they can all get along well and blast each other to bits :P.
      JPulham
    • If you want to do it right, you want a server.

      Of course, you can probably abuse a webserver for this ;)

      Just get an account from econo shop like edatarack.com, write a nifty PHP script with mySQL, and bammo, instant and cheap (though slow and unreliable) host server!
      -Larrik Jaerico

      www.LarrikJ.com
    • I looked at raknet...but wasn't to sure...its probably what I'll use anyway.
      As to the server PHP thing my m8s got a site, its the one im making the game for. But I want the game to be playable even after the site gone (if it ever goes) Whats the best way to get the attension of every computer in the world? cause then if the program is running, it can choose to process the message, else the computer just ignors it.
      JPulham

      The post was edited 1 time, last by JPulham ().

    • Oh now I think I understand the "server is too expensive" thing.

      If you have Broadband internet access like I do, and a nice router at home like a Linksys or Netgear, you can host games at home.

      The trick - use DynDNS.org to create a forwardable internet address for your home server. It takes a little doing, but it works like a charm!

      1. Take one of your computers at home and give it a static IP address.
      2. Install DynDNS.org DDNS client on that computer and make sure it will run as a service.
      3. Set your router at home to forward all internet traffic for the ports you are interested in (not all ports!) to the static IP address of your server.
      4. Install your internet app and give it a test.

      When people try to attach to your server, it will have an address like coolestgame.dyndns.org. If the "actual" IP address ever changes, like when your cable modem reboots, the DDNS client on your home server will reset the IP address of your home network on DynDNS.org's IP forwarding database. So people on the internet at large can find a server sitting in your house behind a cable modem !

      One caution though - this means that computer can be accessed by the internet, so make sure it is just as secure as a web server or FTP server. It WILL get attacked...

      Hope that helps.
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • Originally posted by JPulham
      I looked at raknet...but wasn't to sure...its probably what I'll use anyway.
      As to the server PHP thing my m8s got a site, its the one im making the game for. But I want the game to be playable even after the site gone (if it ever goes) Whats the best way to get the attension of every computer in the world? cause then if the program is running, it can choose to process the message, else the computer just ignors it.


      Well, how are people going to get your game? If you buy a domain (which is a puny 8 bucks a year), then you can use it to host your site AND the game, and use the domain name in case you ever move servers.

      You'll definately want the client tracking software in a seperate server program, though.
      -Larrik Jaerico

      www.LarrikJ.com
    • My friends ditributing the game on his site...I've asked him about the PHP server...but I don't know what kinda limits it has...I'm not expecting a vast number of users...but I don't know if he'll be Eager to try out some PHP stuff I wrote ... I'm not the best web developer. :(
      He might support though...he has said he'd like user 'levels' like Halo on XBL.
      JPulham
    • I don't really know what you mean by "description of how to add/remove games from C++ in RakNet."

      PHP isn't that hard, but it's not something you can just whip together either. You might want to try getting a book on it and spending a week with it before you work on somethign so important. Or find someone who knows it.
      -Larrik Jaerico

      www.LarrikJ.com
    • Um - PHP isn't a solution for a game server - it IS a solution to report & track people RUNNING game servers though.

      For example - this web site is a PHP based site that has a MySQL back end - everything you type gets stuck in a SQL database and the PHP files crank out HTML that is used to make the pages you see....

      A game server, like the ones that run things like CIty of Heroes or Xbox Live, are dedicated programs that sit on a public server and talk straight to the game clients. Very proprietary stuff generally written from scratch.

      Does that help?
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • Thats what I mean...a server tracker ...not a server.
      I thought of something like 'server.php?act=add?name=MyGame'
      this adds the game to the database...my mate says it should be able to store the IP as well.
      Then when a 'client' wants to join the database is sent back and the client chooses the server from a list and uses the IP stored to start the game. The problem is though...I don't know how to get data from PHP scripts and send instructions from within C++. Thats what I mean by "description of how to add/remove games from C++ in RakNet." but it doesn't have to be written using RakNet.
      JPulham

      The post was edited 2 times, last by JPulham ().

    • Getting the data back isn't hard at all. You might want to grab some sort of http library to make the request, and then just don't spit back any html markup.

      In PHP stdout is the connection to the client, so that part is easy. Just remember that your client won't receive ALL of the output at once, so keep checking till its done.

      Seriously, if you have a webserver that lets you run Perl, that might be better.
      -Larrik Jaerico

      www.LarrikJ.com
    • so would sending something like this from the client:

      Source Code

      1. server.php?action=get

      and having the PHP doing something like this:

      Source Code

      1. while(!ourpos < listsize)
      2. {
      3. stdout(Name);
      4. stdout(IPAddress);
      5. }
      6. stdout("done at last");

      Would that work? and how would I read off the info from the PHP in C++? thnx anyway.
      and to add the list...my friend (the PHP expert :P) said that web forms would work...could I use win sock to send an HTTP request like this :

      Source Code

      1. server.php?action=add?name=MyGame
      JPulham

      The post was edited 1 time, last by JPulham ().

    • while(!ourpos < listsize) ??? That's a strange looking test.

      Anyway, yeah, the PHP code is good enough, but you'll have to manually add seperators (like newlines, etc), too. Oh, and PHP doesn't really look like that, but you'll be fine.

      The winsock part of it I don't know.
      -Larrik Jaerico

      www.LarrikJ.com
    • 'while(!'... I started writting one thing and then changed my mind...I've had so many bugs like that :P.
      I knowe PHP isn't like that but its just a draft...as to the WinSock code I have a friend who does web based database solutions for accounting ect...he might know...
      JPulham