Game Development Community

Dedicated Servers & GameConnection

by Shane DeRidder · in Torque Game Engine · 02/12/2006 (8:48 pm) · 3 replies

I'm attempting to create the TorqueScript necessary to create a dedicated server. The project I'm working on has some special needs, and to facilitate my own learning process of the engine, I've decided to NOT reuse the example code in the SDK (I know, I'm a masochist!).

As expected, I've run into a problem. My GameConnection::onConnect() function isn't getting hooked when a client connects to the server. I can see the challenge request come in, but my echo() statement within the GameConnection::onConnect() is not being displayed.

Is there something really basic I'm missing here?

About the author

Recent Threads

  • Mouse pointer oddity

  • #1
    02/15/2006 (10:05 am)
    Did you try initiallizing the code when it gets loaded.
    Look through the example codes to see where onconnect() is being called then try and fit that to your project
    #2
    02/15/2006 (10:22 am)
    Nothing wrong at all with digging deep inside!

    Here's a writeup I did last year that may be useful: TGE 1.3 Connection Sequence Overview
    #3
    02/15/2006 (12:40 pm)
    @Stephen: the resource helped immensely. After scrounging through the C++ code, I had a fairly good idea of the sequence, but having it cleanly written out like that is a real help.

    First off, I'll admit publicly that I often overlook the obvious, the simple, and the little things I should know better about. That said, my problems were a lot simpler than I was originally thinking they were.

    My test server sits behind a firewall -- my game client machine is on a different network. The server was seeing the initial packet, the client was never getting the response (eaten by the firewall) - doh!

    What was confusing the the most, was the server never initializes the GameConnection object in TorqueScript, whereas the client does. I was assuming I had missed something in the example code. Ah well...