Game Development Community

Tool Talking To TGE

by James Spellman · in Torque Game Engine · 07/19/2006 (12:41 pm) · 9 replies

I have a tool that I would like to have communicate with TGE. For all intents and purposes, think something like Torsion. They would run on one machine or perhaps a pair of machines with the tool handling the interface and TGE handling the output. I'm familiar with the use of NetEvents in TGE and I think I can figure out RPC if it comes to that, but the simple act of making a connection between the two applications has boggled me.

The first step of my plan was to use TNL 1.5, and by reworking one of the samples, attempt to connect to the TelnetDebugger in TGE as a test of connectivity. This, of course, has got me stymied already. Unless I'm really off-base, I would assume that I've not got the right combination of ports, addresses and protocols. So I'm submitting to you, forum post readers, in search of any helpful advice, suggestions, "Why the heck did you do that?" comments, or anything else that may further my progress.

Thank you!

#1
07/20/2006 (2:19 pm)
I'm not much further along today on this issue. I've verified that I can connect to TGE using Window's Telnret tool. Netstat shows that I have a listener at TCP 0.0.0.0:6000. The 0.0.0.0 seems a little weird to me, but Telnet was okay with it. I've tried connecting with IP, TCP, IPX, 0.0.0.0, localhost, computername, any, port 5000, 6000, 28000 and others. Not a peep.

I wish I could ask a more direct question about his. Well, maybe I can. Can I make a Telnet connection to TGE using TNL?

It doesn't seem to me that this should be this hard. Perhaps TNL is overkill? Should I try to just muddle through Winsock or whatever API I find in MSDN?
#2
07/20/2006 (2:31 pm)
By default, the server is probably using UDP.
#3
07/21/2006 (10:27 am)
That would be my guess. In fact, I would think that most of the defaults would be accurate except the port number. There's something fundamental that I'm missing and unfortunately I don't have time to mess with it anymore.
#4
07/21/2006 (11:45 am)
Have you considered implementing your debug client connection in TGE itself? That would most certainly make it easier to tie in.
#5
07/21/2006 (2:41 pm)
Yes, I had throught of that. Natrurally, I'd like to use one library for everything. I'd like to use NetEvents because that is what I'm used to. I didn't want to go thru the trouble of adding another API to TGE or attempt to rip out what was there. I mistakenly believed it would be easy to make use of the existing Telnet Connection.
#6
07/21/2006 (2:49 pm)
Telnet isn't UDP, though.

You might take a look at the TCPConnection object, then. This may do what you need.
#7
07/21/2006 (3:17 pm)
That revelation about Telnet not being UDP doesn't explain why I can't connect to it. I've managed to connect to it using two other socket sample programs I've found. I just don't see where the differences are.

However, after glancing at TCPObject, I think you may be right that it what I was really looking for in the first place. Well, I'm off to read up on it...

Thanks for the help!
#8
07/21/2006 (4:14 pm)
Sorry, I wasn't trying to be insulting about Telnet not being UDP, it was just part of the train of thought that was leading up to what I said after that.
#9
07/21/2006 (6:04 pm)
I understand. I was merely saying that I didn't connect the dots about Telnet NOT being UDP.

Anyway, I tried TCPObject with TNL - No go. I tried TCPObject with everything else - Connection established. After noodling around the forums learning how to establish the connection back to the client (thanks Stephen Zepp and John Vanderbeck) I now have a potential solution. Although I am having some trouble as my Client is using Unicode and I need to monkey with the strings to get them to come out right in TGE.

Now that I think about it, I think Stephen told me earlier to use TCPObject. Oh well, thanks a bunch for the help Cliff! Hopefully I'm off and running...