Lamborghini Murcielago 2001 V2.0

Cool release, still some issues :

- the custom shader won't work on ATI cards (running actually in stencil shadow mode)
- the cars physics could be better, driving it with a G25 feels strange, seems like the chassis is too rigid...

I've recently tried fsr BMW E30M3 which drives amazingly well with a steering wheel...so I guess somehow it's doable to make it more stable on the road.

Otherwise, the Flash app is great, I love it, & the sounds too. Was it coded with AS 3 with Flex or Flash CS ? The real advantage of Flash app, it works on all systems like Java does. After some search, I found 3D classes for AS3...More infos here :

http://away3d.com/

For the sounds, I was thinking about mono mixing the backfire sound (explosion sound) into the engine sound, idk maybe we could end up with cool results, didn't try this yet. An elegant way, would be scripting it & dynamically loading them...Too much things to try these days...

=============
Thanks Mitch as always, love to see scripts examples !
 
Backfire sounds just need finishing being implemented... then we can set those up properly. Possibly tie them into the backfire particle event!? Even that needs fixing so it's percentage likeliness works.

Damn on that shader... doh. It works so nicely too. I hope Ruud and Co can make the same shader and have it as default. It's almost essential for nice projection type light sources!


The handling is a bit odd still. It's hard to get the right balance with this car.

This scripting should help lots though, so I can get the compromises worked out. The real car has active awd, all manner of stability stystems, and also fancy damping choices for track/road.

My setup is thus a compromise right now, to try make it nice to slide around, but also nice on roads, and not too wobbly on a slalom/track etc...


Playing with scripting now to see what I can get working nicer!


As for the Flash app, yeah, it's pretty cool. It's simple AS2 stuff. I'm not a coder really. I can adapt code, and improvise stuff, but that is where my interest ends. The app really is to show Ruud that Racer could do natively, so I spent as much time just making it functional for that purpose. In technical terms it's uber basic :D


Cheers

Dave
 
Mitch, I've realised that "brakebalance" can be used via the console, yet it's not listed in the scriptfuncs.txt

Is there a list of all available I/O for scripting somewhere?

Is there a standardised method of adjusting any given cars car.ini properties?

Ie, "rcar.engine.max_torque" to adjust the max_torque value for the current car?

Or are you having to set each one up for scripting manually?

If so, can you provide a list of all the current properties we can adjust?


I'm just going through now, and with steer angle (any chance of a rate of change of steering angle variable?), slip ratios and all that is there already, you can pretty much write ESP, nicer ABS, traction controls, brake steers, active aerodynamics etc etc...

We just need to be able to control the I/O more. Ie, if I check slip ratios and steer angle to then trim the throttle back smoothly it would be really cool. But I can't adjust the throttle amount (that I know of)



Here is my rough brake bias script.

rcar $car = get local car
string $cmd
float $adjustbias
string $finalbias

while 1
{
$car = get local car

//adjustbias ranges from 0 > 4 at full lock
$adjustbias = pow ((get $car steerangle * 4)/get $car max steerangle) to (2)
paint ($adjustbias) at float[2]{10,45}

//brakebalance = 0 is 0% front, 100% rear
//brakebalance = 1 is 100% front, 0% rear
//brakebalance = 0.5 is 50% front, 50% rear

if $adjustbias < 0.25
{
$finalbias = $adjustbias + 0.5
}
else
{
$finalbias = 0.75
}

paint ($finalbias) at float[2]{10,25}

$cmd = "brakebalance " + ($finalbias)
send $cmd to console

interrupt
}

BUT, because the brakebalance adjustment isn't so intuitive (0.5 is 50:50, but it then halves the max_braking amount), you have to double those max_braking amounts.

Would be better if I could just reduce the rear max_braking amounts rather than using the brakebalance thing.


Also, is it possible to add input. Ie, to apply brake to wheels even when there is no brake input? Ie, if sr/sa is > 0.25, wheel0/1.brake = 50% kinda thing (imagine that is ESP)



Thanks

Dave
 
Thanks for the clarified script, the ones first posted had problems, Will try the new ones.

Brake glow is a matter of choice, they didn't show up after seceral laps round carlswood so that's why I added the change.
 
Yeah, the scripts are good once you get them working :D

The steering one works ok for brake balance adjustment for now.

I've been writing some more... ie, you can make it so an automatic car is manual if the rear average slip ratios are over a certain amount, and then once they drop (ie, not slipping), the car is auto again, and can shift up. This is really handy for automatic cars that you don't want to auto-shift up gears if they spin an inside wheel or powerslide!


Lots of these things should be programmed into Racer really, BUT, you can see why Ruud hasn't, since they are simply nice to haves for road cars. They are not really essential for racing cars on race tracks!
Also, with all due respect to Ruud, often his implementations are questionable (ABS and TCS are a bit crude), so we now can do proper versions specific to different road cars (once we get a throttle adjustment variable or brake application capability!)


Many possibilities once we get the list of variables we can impact on the car (the list is clearly relatively large but it's not documented anywhere)...



My current script, once I work out how to calculate a nice steering angle acceleration (over a relatively large duration), is to reduce the ff_friction amount when you input large accelerations, thus simulating power steering!
THAT is a huge issue for any car in Racer right now that uses power steering... we just get dead light steering when driving in lines, so it feels right when steering hard. Or we have too heavy steering in a straight line, but when we need to steer hard and fast it's too heavy!

I'm fairly close on that one, though you do lose control of the FF via the car.ini, as the variables we have access too now are the absolute ones (controller), not the per car ones (doh!).
Ideally a clever programmer needs to do it with nice coefficients so it's easy to tweak for the time lag and how much the power steering helps by % wise over a given steering acceleration range.
Ie, 0.1 rad/s > 1 rads/s, reduce from 100% friction > 10% friction.
Keeps it nice and weighty when driving around normally, and then goes light when you need to counter-steer etc.

Yay!

Dave
 
There is a difference between consolescript commands (not listed in scriptfuncs.txt) and script-rsx functions (listed in scriptfuncs,txt).
Console commands can not be listed the same way the scriptfuncs can, because console commands are just crude string compares, and script functions must be defined clearly so the compiler knows what to do with it. That is why script functions are much faster and it is preferred to expose all script functions needed instead of using the console.

I just have to insert all the functions ... which does not take a lot of time but you guys just have to tell me what you need exposed !!
Make me a list ! :)
 
car.ini :D
Seriously though, if the entire car.ini was available it'd open up a plethora of possibilities - I know this is completely OTT and in reality we'd really only need 10 or 20% of the vars. I however can only think of more novelty scripts - I'm sure Dave could make up a list of relevant things.
 
A function like ini.exe that could change any car.ini values on the fly would definitely open up the possibilities.

Want a turbo? Just write a script with a new turbo variable, so turbo speed (thus pressure) changes based on throttle & rpms, and feeds back to the torque curve multiplier. Then add a new audio clip whose volume is adjusted based on the turbo variable.

'Sport mode' button? Just tweak half a dozen suspension values, maybe change the gearbox shift times.

Then there are track events, like nails on the track (oops, there goes tire pressure & handling) or a rock through the radiator (other bad things, maybe a cloud of steam)
 
Yep, as Cam said, just add in everything using the existing car.ini logic.

Ie, reference as the ini.exe would need to access the specific variable.


I'm not sure if that is a big list, or we should prioritise them, but *if* we had access to them all, then you can in theory code lots of clever things. The advantage of having them all is that it means any sudden idea/innovation could be made right away by an author and tested out.

I'd also like, if possible, perhaps sooner than the whole car.ini list, have access to be able to generate inputs without an actual controller input.
Ie, if I code in ESP, or the McLaren MP4 12C's brake steering, I'll need to brake individual wheels and right now we can't do that. So if we could access the clutch, throttle, and the brake at each wheel, via script, that would be absolutely amazing! (we could add in fantastic ABS/TCS and ESP with that system!)

Engine max_torque (engine.max_torque as proper reference), and wheel(x).power_gearing would also be cool to have for me to test very soon for tinkering with AWD on the Lambo :D
I can make it rwd, then use steer angle and rear wheel slip ratio to determine the torque sent to the fronts!

Yay!

Dave
 
Hi Mitch,
I would like to be able to select gears, right now we can only read the gear. This would open up auto transmission coding.
We will need access to the clutch as well. And if there is a way to read the torque at the clutch that would be nice.

Camera roll/pitch/yaw x/y/z would be fun. This could be a whole new world. I wonder if Peter van der Burg is bored with GPL yet. ;)
Just imagine the movies we could make then.

Alex Forbin
 
Engine max_torque (engine.max_torque as proper reference), and wheel(x).power_gearing would also be cool to have for me to test very soon for tinkering with AWD on the Lambo :D
I can make it rwd, then use steer angle and rear wheel slip ratio to determine the torque sent to the fronts!

Yay!

Dave


That would certainly be nice.
I think the current 4wd system is applying unresolved forces to the car in the form of thrust.

Alex Forbin
 
That would certainly be nice.
I think the current 4wd system is applying unresolved forces to the car in the form of thrust.

Alex Forbin

I can't put my finger on it, but awd cars certainly don't feel right, or something feels wrong.

Could simply be bad force mixing on front wheels that are ALSO driven, making issues with that even more apparent.


Totally agree with what you say though, for gears especially. If we can have access to what are in essence the controller inputs via script, that would be great :D

Dave
 
For those who want to try these scripts:


Brake bias:
Please note you must set the car.ini max_braking values for the brakes to double their normal values (an issue with how the "brakebalance" works)

lamborghini_murcielago\scripts\paint\brakebias.rsx

rcar $car = get local car
string $cmd
float $adjustbias
string $finalbias

while 1
{
$car = get local car

//adjustbias ranges from 0 > 4 at full lock
$adjustbias = pow ((get $car steerangle * 4)/get $car max steerangle) to (2)
//paint ($adjustbias) at float[2]{10,45}

//brakebalance = 0 is 0% front, 100% rear
//brakebalance = 1 is 100% front, 0% rear
//brakebalance = 0.5 is 50% front, 50% rear

if $adjustbias < 0.25
{
$finalbias = $adjustbias + 0.5
}
else
{
$finalbias = 0.75
}

//paint ($finalbias) at float[2]{10,25}

$cmd = "brakebalance " + ($finalbias)
send $cmd to console

interrupt
}



Power steering:
Please note, for ideal performance I've set racer.ini controls.time_input and time_output to 5ms (at 20ms the FF changes are very juddery, 5ms they are much smoother)

lamborghini_murcielago\scripts\paint\powersteering.rsx

rcar $car = get local car

string $cmd1
string $cmd2

float $steer
float $steervel

float $ff_fast
float $ff_slow

float $steer_int = 0

while 1
{
$car = get local car

$steer = (get $car steerangle)

$steervel = $steer - $steer_int

$steer_int = (get $car steerangle)

if $steervel <0
{
$ff_fast = 3500 + ($steervel * 20000)
}
else
{
$ff_fast = 3500 - ($steervel * 20000)
}

$ff_slow = $ff_fast

$cmd1 = "ff stickfriction " + ($ff_fast)
$cmd2 = "ff stickfriction " + ($ff_slow)
send $cmd1 to console
send $cmd2 to console

paint ($steervel) at float[2]{550,25}
paint ($ff_fast) at float[2]{650,25}
//paint ($cmd) at float[2]{350,25}

interrupt
}


Feel free to test/improve the code/logic. I'm far from a programmer expert so they may be inefficient somewhere... They are currently tuned for the Lambo and my personal preferences.

For the brake bias, it should be really ok for most users.

For the power steering, adjust the

$ff_fast = 3500 - ($steervel * 20000)

3500 value up/down for more or less base friction, and then adjust the 20000 value up/down for more or less assistance as steer speeds increase (20000 is probably the higher end of assistance, a more realistic value might be 15000)


Ideally, the FF would be best adjusted with the cars ff_gain value when emulating power steering, right now we are directly accessing the controllers ff_power....


Thanks

Dave
 
Mmmmm, they do work nicely.

When the car slips and you counter-steer, the ff_friction dies away, and the Mz FF can come through and the car counter-steers itself more really nicely, rather than the Mz FF fighting the friction and ruining the response quite a bit.

Then when you straighten up again and drive smoothly, you get a nice solid weight again.


Obviously this is really rough, but with tweaked values and maybe a proper implement of power steering later by Ruud with LUT's (steer velocity vs friction) and rate of change of friction damping, it could be much better again I think!

Dave
 
Generally you need to remember that the Murcielago is a big heavy mid-engined supercar, and it's gonna be a handful if you take liberties like late braking and steering into bends at speed.

In real life, ESP will help, and put the car into mild understeer in the condition you are having... but we don't have that in Racer. Soooo the solution is either drive it like it's dangerous, or for me to tune it to be safer... the former is ideal considering ESP might be just round the corner via scripting... the latter isn't ideal because then it's not so rewarding to drive.


Simple solution is just try brake more in straight(er) lines.

I actually removed about 200 braking force from the fronts with the brake balance script to get the rears working harder in straight lines, giving much better straight line braking performance.

I will agree though that on some controllers it may feel oversteery under braking and turning, but on the G25 you can really feel the car not liking that driving style.
Hopefully an ESP script over the coming month or so will solve the issues for people who are struggling with the car at first :D

Dave
 

Latest News

Are you buying car setups?

  • Yes

  • No


Results are only viewable after voting.
Back
Top