Game Development Community

Torque Multiplayer Game

by RedCore · in Torque Game Engine · 07/30/2004 (12:36 am) · 6 replies

I starting coding my game off of the turorial.base code.. and i'm having a few problems using multiplayer over a lan(Master Server also, but i figure i'll get lan working first). I'm using the gui's from starter.fps, but when i query for lan games it says there are no servers. So, i tried connecting manually from the console..

==>Echo($Pref::Server::Port); $newconn = new GameConnection(ServerConnection);$newconn.setConnectArgs("RedCore"); $newconn.setJoinPassword("");$newconn.connect("192.168.0.4");
28000
Adding a pending connection
Sending Connect challenge Request
CDROP: 1377 IP:192.168.0.4:28000

It drops the connection, and says the connection to the server has timed out.

I can use the same code when i host a game with starter.fps and it works perfectly..

I'm using the startmissiongui and other gui's from starter.fps also.. so it isnt creating the multiplayer game correctly, and i'm even getting heartbeats from the master server.. (which i cant query either, it says it cant find it). I'v tried using the same build as i used using the starter.fps test.. and it still didnt work. so i know it is in fact in script..

Anyone have any ideals why this would happen?

Thanks,
RedCore

#1
07/30/2004 (2:25 am)
Redcore,

Make sure that somewhere in tutorial.base, you enable the net ports on the client (e.g. in initClient()).
Aka :
// Really shouldn't be starting the networking unless we are
   // going to connect to a remote server, or host a multi-player
   // game.
   setNetPort(0);

You may also need to do something similar on the server if its not done so already. See the starter.fps scripts.
#2
07/30/2004 (5:27 pm)
Thanks, works now.

Amazing how one line can cause such problems, but thats programming for ya.
#3
07/30/2004 (6:41 pm)
I need info about online gaming for costom games. NOT MUCH CASH (HAVE CHEAP FRIENDS)
#4
08/23/2004 (4:57 pm)
Nuts - same error, but that's in there.
#5
09/08/2004 (6:48 am)
I have a quick networking question: Why would the starter.fps always fail to join host games on lan after successful queries? It always stops on loading datablocks... thanks.
#6
09/09/2004 (9:49 am)
Sounds like a good question for a new thread.