Game Development Community

Basic Flight Sim demo?

by Steve Lewis · in Torque Game Engine · 07/15/2006 (11:30 am) · 1 replies

We don't want to build a full up flight sim, but we would like to play back some flight recorded data through the TGE.

So here's the question: Given that I have a CSV file that has the position (lat/lon/elevation) and attitude (pitch, yaw, roll) of an airplane, and at say 1sec intervals (actually faster, but let's just say 1sec), I want to render a simple shape that reflects this data. (by simple -- even a simple triangle for a body and triangle for a "tail" is fine). Basically, let's say I could load the data into a structure like:

struct Kinematic_data {
double latitude; // radians
double longitude; // radians
double elevation; // meters about above sea level
double yaw; // radians, 0 is true north, positive is clockwise rotation
double pitch; // radians, positive nose down
double roll; // radians, positive right wing down
};

This is precomputed data. I could buffer it all in memory, or read it line by line from a file. For simplicitly, we could just assume that the "center" of the TGE world is whatever the initial lat, long, elevation positive is.


We can provide LOTS of data, we just need help on where to get started on how to do this using the TGE. Should we use scripting? As the game clock ticks away, we just want to read the next entry in the player kinematic data. So it's almost like a precomputed player path, and we just want to play it back visually. In general, it might be nice if Torque TGE came with a flight_demo in addition to its fps demo and car racer demo.

Again, we can provide data to work with, and we have some other ideas (e.g. how could we do flight ribbons that show where the craft has been?). If anyone wants to help or has any pointers on how to do this with the TGE, reply here or shoot me an e-mail at slewis78@sbcglobal.net

Thanks!