The online racing simulator
Getting position in NLP/MCI
(6 posts, started )
Getting position in NLP/MCI
Right now we are able to know at any given moment in which lap any car is and in which node. Adding some stuff it is possible to get the standings of a race playing with those values.

But wouldnt it be MUCH easier if we got the value for the position of each car in every race tracking packet? Yeah it can be calculated but it would make things much simpler if 5 bits of the NLP or MCI packet were for the position of the car.

Unless I'm missing a better way of getting standings than comparing laps and nodes each cycle...which isnt even accurate when more than one car is in the same node.
#2 - GabbO
I have the same problem. Is there no easy way to read the current position of the players in the race???
I don't understand what you're asking for. Right now you have the X,Y,Z coordinates for each car in every MCI packet. Is that what you want?

Anyway, what are you going to do with the physical coordinates of the car? Having the coordinates you can know where the cars are, but... how do you know which one is ahead? You can't know that!

That's why nodes are used. Nodes follow the outline of the track so you have info on how far into the lap each car is. Knowing the coordinates only gives you the position of the car, but you can't know which car is ahead relative to a certain lap.
#4 - filur
Quote from InSim.txt :struct CompCar // Car info in 28 bytes - there is an array of these in the MCI (below)
{
...
byte Position; // current race position : 0 = unknown, 1 = leader, etc...

:drink:
Quote from filur ::drink:

Indeed the best solution But that is based in nodes I think. I see no better way to know the race position anyway.
#6 - GabbO
Ok, thanks, didnt noticed that part of the message

Getting position in NLP/MCI
(6 posts, started )
FGED GREDG RDFGDR GSFDG