The online racing simulator
volatile and nonvolatile insim data
Very often I am thinking about how to obtain data from LFS, if an insim addon would connect e.g. in the middle of a race or quali. There might be a lot of information "lost". As an example an application might want to detect the split times of the fastest lap. I do not see any way to obtain such information if the application connected after the event has occured. This is what I would call volatile data, just for further discussion in this thread.

I am interested in what do you think are volatile data. If someone disagrees, it would be kind to tell how to obtain the information if is not evident.

Let me start with:
- Lap time of fastest lap
- split times of fastest lap
- drivers who left the race


kind regards
Soeren
It would seem to me that your concern is an organisational or human issue, rather than a technical one.

Nevertheless.. Laptime of the fast driver and the drivers who left the race could be taken from the log file, if you setup the server to use one. You could just hunt through looking for the last occurance of "X has done the fastest lap..." (or whatever the message is), and the "X has disconnected" messages. Of course this relies on having access to the log file, and assuming it's enabled. Also an organisational issue.

The split times I can't think of anything off the top of my head
-
(MonkOnHotTinRoof) DELETED by MonkOnHotTinRoof
you are right, of course there might be other possibilities to obtain the required data. But I am talking about insim, because any other workaround (and it is nothing else than a workaround) may depend on circumstances. In case of accessing a local log files on the LFS server it requires that the insim tools are running on the LFS server (or have access to the server).This might work for tools like laplogger, but there are lots of tools running on client side. Therefore I think it is necessary to distinguish between the insim part and workarounds.

Let me describe a simple example:
I am considering to show fastest lap times in LFS TV Director (in qualification split times too of course). But the TV director is running on client side. On the last DeTM broadcast Vykos had 2 disconnects while broadcasting. So he had to join the race again in the middle. And now the question is: what was the fastest lap before the disconnect?

As developers of client side insim applications we need to be aware of a mid race join, and then we need to consider that a lot of information might be "lost".

The interesting questions now are:
1st question: can I request a certain information at a later time (example: requesting a RST packet at a later time is possible, so it doesn't matter if the addon missed the start of the race)
2nd question: if the answer is no, what would be possible workarounds to obtain these information at a later time.

I hope this description makes it a bit cearer what
I am going to ask.

regards
Soeren
Well imo the easiest way to deal with disconnects(your example) is to save the data on the client side until a restart occured... Probably depends on how you notice disconnects in your program and doesn't work with data while the client is not connected :/

Aut afaik there are no possibilities to know what happened while your client was disconnected, and I don't think there are any workarounds :/
Quote from GeForz :Well imo the easiest way to deal with disconnects(your example) is to save the data on the client side until a restart occured... Probably depends on how you notice disconnects in your program and doesn't work with data while the client is not connected :/

Aut afaik there are no possibilities to know what happened while your client was disconnected, and I don't think there are any workarounds :/

Hehe, that sounds easy BUT.... its quite useless..... BECAUSE if you reconnect, how does the insim app know, that is connected to the same race? Even if you can detect that it is the same server, the race could be restarted. And even if you handle this by requesting RTP packets and check the race time.... what are you going to do if you missed the first half of the race completely?

I know that there is unlikely a solution that will work in all cases, but I would be happy if it would work in one case reliably.

I wondered if it would be possible to request IS_RES packets during the race, there is a field for best lap. But when I tested this, LFS did not answer to the TINY_RES request.

But to return to the topic of this thread: do you know other information that might become lost in terms of insim?

kind regards
The safest way to get information is really from the server side mpr file. Thats how I got the information for the SimFIA league, or when we did not have that from my own mpr file on my client (hopeing that I would not disconnect).
Yes, but he is running the Director client side so is not allowed to access the server.



Quote from Soeren Scharf :.... And even if you handle this by requesting RTP packets and check the race time.... what are you going to do if you missed the first half of the race completely?

Well just a random suggestion, but you could save the time at when you disconnected on the client PC and check the time difference when you reconnect to help you piece the puzzle back together.

If all other race details (racer names, number of laps for each player,etc etc) are saved constantly, on disconnect you have the last race details saved.
You can compare all that info. against the current data when you reconnect and examine the time difference and lap count and maybe realise if it's the same race OR a new one.

Well not completely solved, but any race information and clues are of help . But my point was saving the time when you disconnect to SEE if it is at all "possible" a new race has re-spawned based on the lap counters when you return. Hope that helps in some way. Just an idea.

edit: sorry. I later realised I just went off topic about disconnecting/reconnecting.

FGED GREDG RDFGDR GSFDG