Game Development Community

Sending Messages to Torque From External Processes

by Steve Bilton · in Torque Game Engine · 02/12/2008 (9:17 am) · 3 replies

Hey guys,

I'm doing some genetic algorithm training of agents in the Torque engine, but really I need to start distributing the workload over multiple machines. I can do this using Parallel Virtual Machine, but when I call Torque I really need to be able to pass things back and forth between the two processes.

Presumably there's something like this doing the client/server message passing - is there a way I can adapt this to send generic outside messages and act on them appropriately?

Cheers

#1
02/12/2008 (10:25 am)
The way client/server message passing happens via UDP is probably not what you want, if one end of the connection is not Torque. Torque is all UDP, so you'd have to deal with possibility of lost packets.

However, there is a "TCPObject" in Torque you can use to open TCP connections to use to communicate.

I'd check that out first.
#2
02/12/2008 (10:55 am)
You could also try and embed a lightweight HTTP server into Torque.
#3
02/12/2008 (11:21 am)
I was also going to recommend that, since we've embedded appWeb into Torque, and it works quite well.

But, it's a bit more work to get that running.

And also, be aware that if you intend to have a lot of connections running, you'll probably run into the connection tracking bug with TCPObject (which I'm pretty sure is unfixed still).