Game Development Community

Remote close commands

by K. Anderson · in Torque Game Engine · 09/23/2008 (10:30 am) · 1 replies

What I'm trying to do is allow an external program to send in a quit command to a client. There's similar things done from the server to boot clients and such but I need this to come in from an external program with nothing to do with torque.

What I've been looking into is either A) Have this other program run a handshake and mimick itself as a client in order to send the command through torque's built in commands or B) Try setting it up to slip in a NetEvent and hope the server thinks its from the client or C) Send the quit command over UDP built like a PacketRecieveEvent.

The other option I'm looking at to save a little work is just having the other program kill the game process. I might start with that and work on this later as I'd like to have a closedown run to post out scoring and send a broadcast before the game closes rather than just disapearing.

#1
09/25/2008 (3:55 am)
K Anderson - a couple of options are to look at some form of interprocess communication which your options will differ depending on if you're using windows, linux or mac or a far simpler method would be to get your game client to look for a flag file in a directory if it finds it then it quits - your other application need only create the flagfile then.