The online racing simulator
LFS fast forward
1
(32 posts, started )
LFS fast forward
Hi,

I did a quick'n'dirty tool called LFS fast forward. It's purpose is to improve the handling of replays for movie makers or race marshals.

What it can do is to load a replay, forward it a number of specified seconds and pauses the game there.

It also supports three in-game command: skip, goto and unfreeze.

/o skip n ... forwards the replay n seconds
/o goto n ... goto second n of the replay. If n is in the past, it reloads the replay to do so.
/o unfreeze ... workaround needed because of a connection issue. Use this, if the replay is stuck after forwarding to make it work again.

Please also check the readme.txt for more details.

Actual version: 0.4.1
Version for Patch X: LFSff 0.5X-0.4.1
Version for Patch W: LFSff 0.5W-0.4.1

For some history about the genesis of the tool check the threads 444101 and 374133.

Note: Since the tool is meanwhile made obsolete by LFS built-in features, the development of the next version (1.0) has been halted.

kr
Lion
nice love it
works fine so far

btw theres a small typo in the readme:
2. Activate insim by typing /insim=<port> (<port> has to be the same port as in config.xml, e.g. 30000)
#3 - FL!P
Very nice! Works fine here in patch X. Thanks!
Works fine

Is it supposed to be faster? - or how is the FF speed in comparison?

I just set it to skip 2 hours (meh) an now I'm just waiting but have no clue for how long I'll have to wait :P

Edit: Ah,got to 2h mark now.. I can change cars and angles, but not resume the replay And also just noticed the part about FF speed in the readme

Edit 2: Just noticed the dos prompt scrolling like crazy, repeating this:

"java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at org.kerf.jinsim.TCPChannel.receive(TCPChannel.java:36)
at org.kerf.jinsim.AbstractChannel.run(AbstractChannel.java:57)
at java.lang.Thread.run(Unknown Source)"

LFS does say "InSim timeout : LFSFastForward", but I'm not sure why.
Quote from Shotglass :btw theres a small typo in the readme:
2. Activate insim by typing /insim=<port> (<port> has to be the same port as in config.xml, e.g. 30000)

Fixed that, thanks.
Quote from r4ptor :Ah,got to 2h mark now.. I can change cars and angles, but not resume the replay

Just noticed the dos prompt scrolling like crazy, repeating this:

"java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at org.kerf.jinsim.TCPChannel.receive(TCPChannel.java:36)
at org.kerf.jinsim.AbstractChannel.run(AbstractChannel.java:57)
at java.lang.Thread.run(Unknown Source)"

LFS does say "InSim timeout : LFSFastForward", but I'm not sure why.

For one it seems the keep alive mechanism is not working properly.
The problem with the frozen replay may have to do with it. If not, LFS seems to forget the unfreeze command.

Maybe I can do something about the freeze problem quickly, but the keep alive issue may be hard to track.
I hope you will figure it out - I think it took about 5 mins to skip 2 hours, which isn't too bad, and beats to have to do it manually.
id guess for now the fix for the user would be to skip in intervals rather than at once

btw you could use the new insim buttons to give the user a sort of video player interface for the program

edit:
you probably should do the skipping in intervals in the program instead of makng the user do it
im sure you know how lfs slows down to 1x when the cpu cant keep up im guessing this might be a problem your app faces
Oh yeah

I'll have a look at when i get more time.. have racing to do ina bit.
It had to do with the connection issue. Unfortunately, the problem is in LFS, so all I could do is a workaround.

The replay freezes, if forwarding takes longer than 70 seconds with Patch X or 2 minutes with Patch W. I added an unfreeze command to fix that.

I cannot unfreeze it automatically, because I have no information, when LFS finishes forwarding.

Adding a watchdog to find out, when LFS is frozen would be possible. Also to forward in small jumps. But both is a bit tricky and I didn't intend to invest too much into this little tool. Have bigger tools in mind . So I hope this fix is good enough.

I intend also to forward the issue to Scawen. Maybe he does a fix that helps out. But it's a bit crititcal, because the bug is at the same time the feature lfsff lives of.

kr
Lion

PS: For download of new version see 1st post of this thread.
Tried the new version. It did the same thing in my first attempt - closed everything and then tried again and this time it worked fine.

The workaround isn't bad at all actually - it's just a second (un)pause feature.

Skipped 2 * 2 hours in less than 8 minutes
thx, you've made my day
I was just thinking today how useful a feature like this would be as I have an hour long replay to look at tonigh. Will give it a go - thanks!
Great invention! I'll be using it a lot in future. Thanks a lot
Haven't tried it but sounds really handy
Thanks for this, link is broken though, so I can't try it
So even if you can FF about 2 hours in 5 minutes like someone said above you'll sitll have to unfreeze it 4 times (one each 70 seconds?)

I'll try it anyway, as being a judge in our league makes me watch many replays to solve racing incidents. Thumbs up for this initiative!
#18 - AW06
this is a really good idea just a shame i cant download it as the link is broke..
If the devs would only include rewind code in the next patch, this program would make searching for events in replays a breeze.

Great work.
#21 - Jakg
Quote from gohfeld23 :If the devs would only include rewind code in the next patch, this program would make searching for events in replays a breeze.

Great work.

If you knew how replays actually worked you'd know why they haven't - atm a replay is just the controller inputs (and in an MPR the odd position packet), the Ai then "re-enact" the replay - starting 5 mins in and turning 5° left with 56% throttle wont help if you A. Don't know where the car is and B. Don't know what forces are acting on the car - to find this information you need to go back a frame, and to find the information for that you need to do the same.
I'm fully aware of that as most game demos function this exact way. (Mostly FPS games as well as many sims) This is also the main reason for the small file sizes of game demos/replays.

However, it's very possible to include a reverse function, although additional coding needs to be done to the engine. The way games like Nexuiz do it (a DP based FPS) is the utilize a # of frames forward and back buffer. While it increases CPU load, it allows the user to go back at a set pace (the pace that the CPU and engine need to process the additional frames) which is roughly 1x rewind (e.g. no speedup option).

A simpler way is to call a time in the replay which would get processed and then replayed forward eliminating the need to restart the replay to get to an earlier frame. (there would be slight buffer time which would depend on the users processing power)

Another way to simplify the whole process is to execute replays as a forced set of events and eliminate the physics engine from them. by doing this, the replay stops being a re-enactment since the game only displays the position of the objects without any forces being applied to them.
Sorry for the broken links this week. I took the server off-line as a precaution, because there was renovation work going on at the server location. But it is back on-line again and the link should work.

@Highsider9: Thanks for pointing out, that it can be downloaded also at http://www.lfs-database.com. I will add this information also to the first post.
Quote from MaKaKaZo :So even if you can FF about 2 hours in 5 minutes like someone said above you'll sitll have to unfreeze it 4 times (one each 70 seconds?)

No, you only have to unfreeze it once, if the forwarding takes longer than 70 seconds. Because it freezes at the end of the forwarding.
Announcing new version coming soon.

The current version ticked me off a little, so I decided for a complete rewrite of the tool. It will also contain one or two new features.
I also got feedback from Starblue, that a visual interface would make it easier to use. I can agree to that and will add a button interface too.
1

LFS fast forward
(32 posts, started )
FGED GREDG RDFGDR GSFDG