Drachengeifer1 / vdrift-ogre

Automatically exported from code.google.com/p/vdrift-ogre
0 stars 0 forks source link

Track's ghosts (reversed) #252

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Since I drove all tracks (with ES in normal sim mode)
and I have those ghosts:
- current ReplayFrame size: 392 Bytes
- those ghost are 340 MB for 102 tracks
If have only time (1), car pos (3 floats) and rot (4), some steering (1), 
braking info
this would make new ReplayFrame size about:
4 + 3*4 + 4*4 + 4 + 1 = 37 B,
and could be less if we pack rot floats to shorts (half size):
4 + 3*4 + 4*2 + 2 + 1 = 27 B
Then all ghosts would be 340 MB * 27/392 = 24 MB
Since the frame rate is 160Hz we can easily half this 12 MB, and maybe even use 
40 Hz then it is 8 MB.
Need to probably multiply this by 2, since reverse direction needs their own.

This is really small and should be put into game.
So I'm making an additional "track's ghost" (with reduced info, so eg. wheel 
positions would be the same, could go into terrain etc).
It should probably dissapear (but definitely needs a new gui chl) when you 
drive the track (or when you have other car's ghost)

I think I could even scale the time for it, for other cars

Original issue reported on code.google.com by Cry...@gmail.com on 16 Jul 2013 at 10:46

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
So it's done on master.
Track's ghost is the green ES.
There is a Gui checkbox for it. It's on by default.

Size is 10 MB for 120 track ghosts.
Using 1/3 sim fps so 53.3. Less makes it to jumpy from close.
Linear interpolation used.
I'm still fixing some stuff on Hud.

Atm only 1 direction, no reverse.
And I have to update about half of ghosts since back then rewind wasn't 
deleting old frames, so you can see all accidents now.

Original comment by Cry...@gmail.com on 21 Jul 2013 at 7:49

GoogleCodeExporter commented 8 years ago
Time not scaled and seems impossible e.g. if you drive a slow car, ghost would 
be slower so when it jumps gravity would be wrong and velocity before jumps.
No idea, if I should scale time. Terrain tracks should be okay though.

Original comment by Cry...@gmail.com on 21 Jul 2013 at 7:53

GoogleCodeExporter commented 8 years ago
OK fixed hud and updated ghosts without rewind jumps.
Also now track ghost has braking lights and simpler wheels steering.

Only reverse ghosts aren't done, but this needs all track driven in reverse, a 
lot of time. Lower priority.

Original comment by Cry...@gmail.com on 22 Jul 2013 at 2:04

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago

Original comment by Cry...@gmail.com on 26 Mar 2014 at 4:33