hello,
maybe all of you know this: after loading a replay it will take some seconds until LFS is drawing the scene. What you see is some light blue background (see attachment). After 2 to 3 seconds LFS starts to draw the scene.
Now when you try to activate the TV Director, while LFS is still in this state, then LFS draws the scene as expected for a short moment, but then LFS switches back to this blue background screen and stays there. This seems to happen at exactly this moment when LFS would usually leave this screen and start to draw the scene.
I do know know why this happens and I do not know anything about the technical background of this behaviour. But the worst is, I do not know how to detect the state of LFS (is LFS already drawing the correct scene or still in this "loading" or whatever screen). But this detection is important to able to let the TV director activate automatically. But similar to race start (green lights) there is no packet about this state change.
What I found up to now (relies on mpr):
1. after loading the replay LFS sends an IS_RST packet
2. LFS starts sending IS_MCI packets
3. on request (TINY_GTH) LFS sends a SMALL_RTP with content 0
4. later (about one second) the content of the SMALL_RTP starts to increase as time elapses.
5. when SMALL_RTP returns a value about 200 (2 seconds) LFS starts to draw the scene.
Notes:
- You may pause the replay while steps 3-4. But then LFS will not change the state, it is really waiting until race time elapsed 2 seconds.
- tested with S2X
Much text for explanation, now the questions:
- Can I rely on the 2 seconds? What about different (and future) LFS versions? What about multiplayer mode? In spr this value is not 2 seconds (much smaller).
- Does anybody know something about the technical background (Scawen of course)? Where does this value come from?
- Can I avoid the issue by setting different values in my CPP packets or some other packets to trigger redrawing the scene?
- Or is there a different method to detect the state of LFS regarding this screen?
Hopefully somebody can give me a hint. I do not like using a method, when I do not know how reliable this method is.
kind regards
Soeren
maybe all of you know this: after loading a replay it will take some seconds until LFS is drawing the scene. What you see is some light blue background (see attachment). After 2 to 3 seconds LFS starts to draw the scene.
Now when you try to activate the TV Director, while LFS is still in this state, then LFS draws the scene as expected for a short moment, but then LFS switches back to this blue background screen and stays there. This seems to happen at exactly this moment when LFS would usually leave this screen and start to draw the scene.
I do know know why this happens and I do not know anything about the technical background of this behaviour. But the worst is, I do not know how to detect the state of LFS (is LFS already drawing the correct scene or still in this "loading" or whatever screen). But this detection is important to able to let the TV director activate automatically. But similar to race start (green lights) there is no packet about this state change.
What I found up to now (relies on mpr):
1. after loading the replay LFS sends an IS_RST packet
2. LFS starts sending IS_MCI packets
3. on request (TINY_GTH) LFS sends a SMALL_RTP with content 0
4. later (about one second) the content of the SMALL_RTP starts to increase as time elapses.
5. when SMALL_RTP returns a value about 200 (2 seconds) LFS starts to draw the scene.
Notes:
- You may pause the replay while steps 3-4. But then LFS will not change the state, it is really waiting until race time elapsed 2 seconds.
- tested with S2X
Much text for explanation, now the questions:
- Can I rely on the 2 seconds? What about different (and future) LFS versions? What about multiplayer mode? In spr this value is not 2 seconds (much smaller).
- Does anybody know something about the technical background (Scawen of course)? Where does this value come from?
- Can I avoid the issue by setting different values in my CPP packets or some other packets to trigger redrawing the scene?
- Or is there a different method to detect the state of LFS regarding this screen?
Hopefully somebody can give me a hint. I do not like using a method, when I do not know how reliable this method is.
kind regards
Soeren