Multiplayer testing
by Kage · in Torque Game Engine · 08/14/2004 (7:29 am) · 11 replies
I'm trying to test my multiplayer feature across WAN and finding this is impossible to accomplish because I don't have a master server that will store my game info. So far, my LAN testing is going OK.
When I host a game (spawn a server) on one PC and attempt to join a game by first querying the master from another PC, my game doesn't show up in the listing. Actually, nothing shows up in the listing. Similarly, attempting this feat with someone in another state is the same.
Maybe I'm doing something wrong, but what's easiest way to test multiplayer game across WAN. Do I need to create my own master server that will store my game PAK info to do this testing?
When I host a game (spawn a server) on one PC and attempt to join a game by first querying the master from another PC, my game doesn't show up in the listing. Actually, nothing shows up in the listing. Similarly, attempting this feat with someone in another state is the same.
Maybe I'm doing something wrong, but what's easiest way to test multiplayer game across WAN. Do I need to create my own master server that will store my game PAK info to do this testing?
About the author
Professional gameplay programmer and have worked in the industry since 2004. Specialized in: animation system, player control, weapon system, AI, combat, camera, physics - ODE/Havok, optimization, and networking.
#2
I could be doing something wrong, just don't know what.
Here are the changes that I made to taylor my game:
-change the game type
$Client::GameTypeQuery = "Bugged-Out Rally"; // in [example/mygame/client/init.cs]
-changed the pak info
package BuggedOutRallyPak { // in [example/main.cs]
Could these changes be the culprit why the GG's master server store my game info?
08/14/2004 (8:09 am)
I'm not getting any of my game info from GG's master server, and the reason I posted this thread.I could be doing something wrong, just don't know what.
Here are the changes that I made to taylor my game:
-change the game type
$Client::GameTypeQuery = "Bugged-Out Rally"; // in [example/mygame/client/init.cs]
-changed the pak info
package BuggedOutRallyPak { // in [example/main.cs]
Could these changes be the culprit why the GG's master server store my game info?
#3
08/14/2004 (10:00 am)
You might not be changing the game type that the server is sending to the master. Package names have nothing to do with networking in Torque.
#4
08/14/2004 (10:14 am)
Most likely your port# is not being set correctly or initialized at all or being blocked by firewall. IMO that is the most common reason for GG's server to not recognize you.
#5
$Server::GameType = "Bugged-Out Rally";
So the two match, and I still can get any info from the master server.
08/14/2004 (10:15 am)
In the onServerCreated() function [common\server\game.cs], I also have the gametype defined as,$Server::GameType = "Bugged-Out Rally";
So the two match, and I still can get any info from the master server.
#6
I maybe missing something or screwed up something(???).
-----------debug dump----------------
Sending heartbeat to master server [IP:216.116.32.49:28002]
DemoNetInterface::handleInfoPacket()
GameMasterInfoRequest
Received info request from a master server [IP:216.116.32.49:28002].
-----------end dump------------------
Is there a specific packet info I should look for?
08/14/2004 (10:25 am)
I've capture some debug prints from the console.log file showing the heartbeat and the response back from the master server. I don't think the port blocking is the issue. I maybe missing something or screwed up something(???).
-----------debug dump----------------
Sending heartbeat to master server [IP:216.116.32.49:28002]
DemoNetInterface::handleInfoPacket()
GameMasterInfoRequest
Received info request from a master server [IP:216.116.32.49:28002].
-----------end dump------------------
Is there a specific packet info I should look for?
#7
Server::GameType to = "Bugged-Out Rally"
and
Server::MissionType to = "Racing"
in my game.cs file, so I'm convinced the response packet contains valid values.
08/14/2004 (10:49 am)
I've reviewed the handleGameMasterInfoRequest() function [game\net\serverquery.cc] and it looks like the function passes pertinent 'pref' and 'Server' values back to the master. These values are defined in my game, whether they're valid or not I'm not certain, but I only changed: Server::GameType to = "Bugged-Out Rally"
and
Server::MissionType to = "Racing"
in my game.cs file, so I'm convinced the response packet contains valid values.
#8
does it work then?
08/14/2004 (1:00 pm)
What if you trying something other than "Bugged-Out Rally"does it work then?
#9
I've reverted the Server::GameType back to "Racing Starter Kit", started a server on one PC, then query the master from the other and here is what I got:
---------------- queryMasterServer() ---------------------
No master servers found in this region, trying IP:216.116.32.49:28002.
Requesting the server list from master server IP:216.116.32.49:28002 (2 tries left)...
DemoNetInterface::handleInfoPacket()
MasterServerListResponse
Received server list packet 1 of 1 from the master server (1 servers).
Pinging Server IP:4.4.236.182:38000 (3)...
Pinging Server IP:4.4.236.182:38000 (2)...
Pinging Server IP:4.4.236.182:38000 (1)...
Pinging Server IP:4.4.236.182:38000 (0)...
Ping to server IP:4.4.236.182:38000 timed out.
------------------ query end-----------------------------
This resulted in NADA and the port values set at 38000 looks very fishy - should be 28000.
I tried this again and this time the port values came up as 28000 - now I'm getting somewhere. Another point to notice is that master server has actually picked up the server information - shown as "list packet 1 of 1 from the master server (1 servers)."
********** conclusion ************
Alright, I feel stupid about this whole thing because I have it working now. I realized that the IP address shown above refers to my DSL address, however, my local network addressed is set to 192.168.1.xxx in my router.
I went into my router and set the 'forwarding' configuration parameters for addresses 28000 ~ 29000 to my PC which will act as a server (192.168.1.100). After I do this, everything works.
Thanks to everyone for giving me some ideas to try.
08/14/2004 (2:25 pm)
@Westy - good point.I've reverted the Server::GameType back to "Racing Starter Kit", started a server on one PC, then query the master from the other and here is what I got:
---------------- queryMasterServer() ---------------------
No master servers found in this region, trying IP:216.116.32.49:28002.
Requesting the server list from master server IP:216.116.32.49:28002 (2 tries left)...
DemoNetInterface::handleInfoPacket()
MasterServerListResponse
Received server list packet 1 of 1 from the master server (1 servers).
Pinging Server IP:4.4.236.182:38000 (3)...
Pinging Server IP:4.4.236.182:38000 (2)...
Pinging Server IP:4.4.236.182:38000 (1)...
Pinging Server IP:4.4.236.182:38000 (0)...
Ping to server IP:4.4.236.182:38000 timed out.
------------------ query end-----------------------------
This resulted in NADA and the port values set at 38000 looks very fishy - should be 28000.
I tried this again and this time the port values came up as 28000 - now I'm getting somewhere. Another point to notice is that master server has actually picked up the server information - shown as "list packet 1 of 1 from the master server (1 servers)."
********** conclusion ************
Alright, I feel stupid about this whole thing because I have it working now. I realized that the IP address shown above refers to my DSL address, however, my local network addressed is set to 192.168.1.xxx in my router.
I went into my router and set the 'forwarding' configuration parameters for addresses 28000 ~ 29000 to my PC which will act as a server (192.168.1.100). After I do this, everything works.
Thanks to everyone for giving me some ideas to try.
#10
08/14/2004 (4:44 pm)
If anyone want to join my server and race in the locked levels of my game, you can download the beta version at www.inoculousgames.com and join me.
#11
01/19/2005 (9:25 am)
You still need help testing and fixing this Akio?
Torque 3D Owner Billy L