The online racing simulator
Question about outsim
(5 posts, started )
[noob] Question about outsim [Position Vector]

struct OutSimPack
{
unsigned Time; // time in milliseconds (to check order)

Vector AngVel; // 3 floats, angular velocity vector
float Heading; // anticlockwise from above (Z)
float Pitch; // anticlockwise from right (X)
float Roll; // anticlockwise from front (Y)
Vector Accel; // 3 floats X, Y, Z
Vector Vel; // 3 floats X, Y, Z
Vec Pos; // 3 ints X, Y, Z (1m = 65536)

int ID; // optional - only if GameID is specified
};

How do the Position vectors work? I split it up sucessfully into 3 integers in Python. Then, I divide by 65536 to get meters. But, when I drive down the straight of KY GP Long, the X axis goes from 0 to 65536. How do I just get the amount of meters?

EDIT: Would IS_MCI be better for locating a car on the track? I just want to figure out location of cars so that I can make a points-based race where you go around the track collecting points. Kind of like arcadey games. Only if the cones marking the points do not reset. Or, If I figure out the time it takes for a cone to reset, then I can make the 'points' erm 're-spawn' there.
#2 - Stuff
Hmm, I'm not too sure about python ints, but you shouldn't be getting those high of values from a C++ integer thats been divided by 65536. Remember, that int is signed which means the range is -2147483648 to 2147483647 (or in LFS, -32768m to 32767m). Other than that, I'm not sure what you're trying to do by getting the amount of meters? Elaborate please

I've also thought of making some courses/autox layouts that have objectives or points to make it more fun somehow. I think you would definitely need to use MCI packets because it will give you everyones position whereas OutSim only does the currently viewed person.. And I dunno about respawning cones, but you could check if the person drove into an area with those MCI packets.. Hmm.. could be a fun layout.
Quote from wheel4hummer :EDIT: Would IS_MCI be better for locating a car on the track? I just want to figure out location of cars so that I can make a points-based race where you go around the track collecting points. Kind of like arcadey games. Only if the cones marking the points do not reset. Or, If I figure out the time it takes for a cone to reset, then I can make the 'points' erm 're-spawn' there.

If you want to make it multiplayer capable and running on a server, MCI is the only way to go.
Yes Outsim is only for one (your own) car
Quote from Stuff :Hmm, I'm not too sure about python ints, but you shouldn't be getting those high of values from a C++ integer thats been divided by 65536.

I think I found my problem. I told python that the struct included signed integers, but I want unsigned. I will try MCI packets tho.

Question about outsim
(5 posts, started )
FGED GREDG RDFGDR GSFDG