Beta [beta] VDrift


@ptitSeb you do so much porting this is probably all stuff you already know, but I try to help if I can, when I look at our in-house code base, the changes we have when using tremor are in two places:

1. Some extra parameters to ov_read (you can see the values we pass below):


long result = ov_read( &m_PiOggVorbisFile.OggVorbiFile, pByteBufferPtr + amountReadInBytes, numberOfBytesToRead - amountReadInBytes,
#if !defined(_OGG_VORBIS_TREMOR)
0, 2, 1,
#endif
&section
);
 2. Time in milliseconds vs seconds


bool OggAudioReader::GetLength( OggVorbis_File * file, PiTimeUnit & timeUnit, int desiredLogicalBitstream /* = -1 */ )
{
#if defined(_OGG_VORBIS_TREMOR)
ogg_int64_t timeInMilliseconds = ov_time_total( file, -1 );
if ( timeInMilliseconds == OV_EINVAL )
return false;
else
timeUnit = PiTimeUnit::FromMilliSeconds( timeInMilliseconds );
#else
float timeInSeconds = ( float )ov_time_total( file, -1 );
if ( timeInSeconds == OV_EINVAL )
return false;
else
timeUnit = PiTimeUnit::FromSeconds( timeInSeconds );
#endif

return true;
}
Of the two things, the first was obvious (compile error) but the second compiled fine, but results in a problem (maybe no audio) and took longer to track down.
Yeah, first thing I figured out already.

For the second think, thanks, I'l keep that for next time. I have a few project where I want to do the switch from vorbisfile to tremor.

And yes, I use the _ARM_ASSEM_ code path.

I just had a quick look at the bullet code, and there is already a lot of NEON stuff inside. Unfortunately, that code has been contributed by Apple and thus only works with their products... :(

Cheers, Magic Sam
Mmmmm ok, I'll look again there.
 
I have updated the release in first post.

I tried to get a few more fps, using GCC 5.0 with lto, and trying a few adjustement.

And I added 3 new tracks and a car.

It's still too slow for the repo IMO, but somehow enjoyable.

Thanks @Ingoreis for the video.
 
Last edited by a moderator:
@ ptitSeb: thanks for the updated version, will give it a try ASAP :)

I also found this repository about bullet (with NEON) for the Blackberry platform, don't know if that could be useful though...

Cheers, Magic Sam
 
For some stuff in bullet you can adjust how much ressources are used. With soft bodys you could decrease the number of patches, maybe you can decrease the kind and number of physic calculation.

If it uses explicit EULER you can probably increase the step size. If it uses implicit euler you could decrease the accuracy. Or replace a solver. Runge Kutter is more accurate then EULER or LEAPFROG (leapfrog is as fast as euler but more accurate) but takes a lot more computing time. I don't know the code and how much work it would be. But if they coded clean and uses just bullet, the replacement of a solver of a linear system or decreasing a parameter could be "easy" to do :) .
 
Last edited by a moderator:
Hi,

Bug report: game crashes when browsing through available cars:

ERROR: M3.car.wheel.fl.tire.tire/touring.tire.a0 not found.

ERROR: Failed to load physics for car M3

./runscript.sh: line 88:  2685 Segmentation fault      bin/vdrift $*

 

Cheers, Magic Sam
 
Last edited by a moderator:
Hi,

Bug report: game crashes when browsing through available cars:

ERROR: M3.car.wheel.fl.tire.tire/touring.tire.a0 not found.

ERROR: Failed to load physics for car M3

./runscript.sh: line 88:  2685 Segmentation fault      bin/vdrift $*
Ah, I forgot some data file when I added M3 car. I'll fix that.
 
Last edited by a moderator:
And thanks for the extra fps btw: It now ranges from 8 to 20 fps (long straight line) on Paul Ricard's circuit with the X5 car, on a Rebirhth OC'ed @ 825 MHz.

Cheers, Magic Sam
 
I have put a new beta (same link in first post). I removed the M3 car, it was not working well.

I recompiled with more option on lto...

also, I noticed that the "driving line" slow things down.

I'll try to see if I can add more track (the PND will become even bigger of course).
 
Last edited by a moderator:
Hi !

Thank you very much ptitSeb for your time and efforts on this one, it's really appreciated :)

I've been reading some articles about compiler optimizations recently, and I wondered if you already gave "whole program optimization" or "profile guided optimization" a try for VDrift ?

Cheers, Magic Sam
 
Hi !

Thank you very much ptitSeb for your time and efforts on this one, it's really appreciated :)

I've been reading some articles about compiler optimizations recently, and I wondered if you already gave "whole program optimization" or "profile guided optimization" a try for VDrift ?

Cheers, Magic Sam
for "whole program optimization", I have to recheck, but I use lto and I think it's enabled, but I'll double check and recompile if missing.

For "profile guided optimization", it takes much longueur to do. I can try, but it's a bit boring (you compile, run the game to create a profile file, than recompile again).

But I'm not sure this optim can bring the fps we need. I'll try anyway.
 
Last time I tried profile guided optimization for console dev, it made next to no difference (which was very disappointing given how much of a hassle it is).
 
The VDrift PND is now on the repo.

I got even more fps out of it, and it's gatting playable.

I also added particle effect for more eye candy...
 
Back
Top