Game Development Community

GPS-Torque connection

by Michigan State University (#0021 · in Torque Game Engine · 03/23/2007 (8:44 am) · 2 replies

Ok, we're interested in creating a Torque representation of campus, upon which we can place 'players' representing professors or students. We would like to be able to use GPS technology to map their location, and then somehow message Torque about their location and update their position accordingly.

My question is, assuming we can handle the logisitics of getting the GPS data onto the network, how easy/difficult would it be to get Torque to look for and receive these messages. Given Torque's Server/Client nature, I'm assuming its not terribly difficult, but it's definitely beyond my experience as a student so far.

Thanks.

#1
03/23/2007 (9:41 am)
Assuming you've got the data on the server, it's fairly easy, and there are a number of ways to do it. If you're uploading to a web server, then you simply have TGE download the updated lists every X seconds. If you're uploading directly to the TGE Server, then you'd just skip that step. To propagate it to all the clients, you can either 1) directly integrate it into the C++ code where you're updating positions and such... this would be the best way since you can control interpolation, etc better, or you could prototype and do it really quick in script... %obj.setPosition(bah);
#2
03/23/2007 (9:58 am)
I would just setup a TCPObject in a listen state, and deliver the data that way to Torque.

Your bigger challenge will be over-riding the built in physics to accept the external-authoritative position and adjust to compensate.

I would highly suggest starting very basic, and get something simple moving ( a box not based off the Player class for example ) before digging into the full 3D procedurally animated and networked physics based code--and I speak from experience, having implemented this for a commercial client :)