Whats the best networking I could get with TGB?
by Robert Carroll · in Torque Game Builder · 10/12/2009 (5:36 pm) · 7 replies
Hi, im making a platformer and I just found out theat TGB only supports TBS networking games. Is there a way to make a online high scores boad=rd with the current TGB. Or what I really wanted to know was If theres some way I could get RTN to work in TGB.
About the author
Stay Up all night playing PS3 ;) add me PSN: RCBASEBALL13.
#2
10/12/2009 (6:31 pm)
Well Im new to networking so? I guess I would try to do internet score board like some flash games. I talked to this one guy that made multiplayer games and he said he used an IP address or somthing.
#3
10/12/2009 (6:33 pm)
I'd recommend creating an in-game high-score list first. That way you know what data it consists of so you can effectively design reporting to a database server down the road for online high-scores.
#4
10/12/2009 (7:15 pm)
I do Have a high scores behavior from the Asteriods Game I got that to work.
#5
1) Modify the source code of HTTPObject.cc with the changes found in this resource. This allow you to put a '&' into the URI's without them turning into escaped characters.
2) Write a PHP (or other) script on your web site. It should take, at a minimum, 2 parameters: the player's name and their score. There are a lot of great PHP sites out there that will show you how to parse parameters and how to interface with a database on your web site.
3) Add code similar to the following to your game:
10/12/2009 (7:34 pm)
For an internet high score table, you'll need the Torque Pro version, the HTTPObject, a web site, and passing knowledge of PHP.1) Modify the source code of HTTPObject.cc with the changes found in this resource. This allow you to put a '&' into the URI's without them turning into escaped characters.
2) Write a PHP (or other) script on your web site. It should take, at a minimum, 2 parameters: the player's name and their score. There are a lot of great PHP sites out there that will show you how to parse parameters and how to interface with a database on your web site.
3) Add code similar to the following to your game:
%w = new HTTPObject();
%w.post( "yoursite.com:80",
"/scriptLocation/scriptName.php",
"score=" @ $PLAYER_SCORE TAB
"name=" @ $PLAYER_NAME,
"" );The "TAB" added to the string becomes the '&' with the source code modifications from step (1).
#6
10/12/2009 (7:55 pm)
Ok, I don't have pro so that answers that. Is there a way to let ppl that play the game when their is an Update like after a month of playing you could right a message that apperas in the corner. That says updat 0.60 is out?
#7
For example, I've used the HTTPObject and have a PHP script on my site that just returns the current version number from a database. (You'll have to research HTTPObject and look at the onLine function.)
10/12/2009 (9:12 pm)
There are several ways to do this, but yes, you can.For example, I've used the HTTPObject and have a PHP script on my site that just returns the current version number from a database. (You'll have to research HTTPObject and look at the onLine function.)
Associate David Montgomery-Blake
David MontgomeryBlake