A lot of people would like to use the popup headlights for other purposes. As the patch release is next weekend, I don't have time to do everything that could be done.
But I wondered if it might be possible at least to enable existing light switches to operate moving parts.
E.g. you could use /light rfog/ffog/extra to operate an item if it was set to be connected to that switch.
Keeping it simple at first, that might be, instead of an object type "popup headlight" you would set "rotating object" as the object type then link it to headlights/rfog/ffog/extra.
Now, in my opinion that would already do a lot of what people want, without me having to add extra text commands, user inputs and data sent over multiplayer (in two separate versions of LFS). It's kept simple by using existing switches. So I hope this may be possible in the time available.
But I also wanted to think on a bit further, although this starts to sound too complicated for this week when I already feel under a lot of pressure. The release next weekend is important to me after a very hard work year and I want a fresh start to finish the other version next year, so we can release the new physics, graphics and updated tracks.
Anyway, I couldn't help thinking a bit as I rolled around in bed and had to get up early again and write some things down.
I came up with this.
Types of object:
- rotator [like current headlights, rotates a given amount]
- slider [moves along an axis a given distance]
- spinner [rotates at a given speed]
Rotator and Slider can connect to:
- boolean switches (e.g. light switches)
- axis (e.g. throttle, brake, clutch, steer)
Spinner can connect to:
- boolean switches (e.g. light switches - spins at given speed)
- moving parts (e.g. engine, drive shaft - spins with object or multiple of it)
Well, that's the concept.
Questions remain:
Amounts:
Range of values for "Rotator" amount?
Currently goes from -180 to 180 degrees. Considered enough for popup headlights and probably for most purposes.
Range of values for "Slider" amount?
Given storage limitations, a range of -1000 to 1000 is available. If the resolution is 1mm that would allow movement of 1m. Probably good for many things, but maybe we need an alternative "Large slider" that has resolution of 1cm (allowing movement of up to 10m)
Range of values for "Spinner" amount?
1) When connected to a boolean switch, this would be a set rotation speed (rpm) when connected to a boolean switch. Again, the base value is from -1000 to 1000. Would that be OK if it plainly represented RPM? So you could have a spinning object 1rpm, 2rpm, 3rpm... up to 1000rpm.
2) When connected to a rotating component, it could be a multiple. Usually 1 (e.g. rotate with driveshaft). But maybe 0.5 (e.g. camshafts rotate at half engine speed). Or maybe some things rotate faster than the rotating component? So what sort of range, given again we have -1000 to 1000 but clearly this must be scaled down massively (nothing will rotate at 1000 times the rate of an component it is connected to). Maybe 10 times the speed would do, so it could go from 0.01 up to 10 times the speed of the connected part?
Rotating parts that Spinners could be attached to:
Engine
Drive shaft
Final drive (diff)
Rear (left or right) wheel
Front (left or right) wheel
Steering wheel angle
Steer angle (left or right)
Input axes that Rotator and Sliders could be attached to:
Steering wheel (-1 to 1)
Throttle (0 to 1)
Brake
Clutch
Handbrake
But I wondered if it might be possible at least to enable existing light switches to operate moving parts.
E.g. you could use /light rfog/ffog/extra to operate an item if it was set to be connected to that switch.
Keeping it simple at first, that might be, instead of an object type "popup headlight" you would set "rotating object" as the object type then link it to headlights/rfog/ffog/extra.
Now, in my opinion that would already do a lot of what people want, without me having to add extra text commands, user inputs and data sent over multiplayer (in two separate versions of LFS). It's kept simple by using existing switches. So I hope this may be possible in the time available.
But I also wanted to think on a bit further, although this starts to sound too complicated for this week when I already feel under a lot of pressure. The release next weekend is important to me after a very hard work year and I want a fresh start to finish the other version next year, so we can release the new physics, graphics and updated tracks.
Anyway, I couldn't help thinking a bit as I rolled around in bed and had to get up early again and write some things down.
I came up with this.
Types of object:
- rotator [like current headlights, rotates a given amount]
- slider [moves along an axis a given distance]
- spinner [rotates at a given speed]
Rotator and Slider can connect to:
- boolean switches (e.g. light switches)
- axis (e.g. throttle, brake, clutch, steer)
Spinner can connect to:
- boolean switches (e.g. light switches - spins at given speed)
- moving parts (e.g. engine, drive shaft - spins with object or multiple of it)
Well, that's the concept.
Questions remain:
Amounts:
Range of values for "Rotator" amount?
Currently goes from -180 to 180 degrees. Considered enough for popup headlights and probably for most purposes.
Range of values for "Slider" amount?
Given storage limitations, a range of -1000 to 1000 is available. If the resolution is 1mm that would allow movement of 1m. Probably good for many things, but maybe we need an alternative "Large slider" that has resolution of 1cm (allowing movement of up to 10m)
Range of values for "Spinner" amount?
1) When connected to a boolean switch, this would be a set rotation speed (rpm) when connected to a boolean switch. Again, the base value is from -1000 to 1000. Would that be OK if it plainly represented RPM? So you could have a spinning object 1rpm, 2rpm, 3rpm... up to 1000rpm.
2) When connected to a rotating component, it could be a multiple. Usually 1 (e.g. rotate with driveshaft). But maybe 0.5 (e.g. camshafts rotate at half engine speed). Or maybe some things rotate faster than the rotating component? So what sort of range, given again we have -1000 to 1000 but clearly this must be scaled down massively (nothing will rotate at 1000 times the rate of an component it is connected to). Maybe 10 times the speed would do, so it could go from 0.01 up to 10 times the speed of the connected part?
Rotating parts that Spinners could be attached to:
Engine
Drive shaft
Final drive (diff)
Rear (left or right) wheel
Front (left or right) wheel
Steering wheel angle
Steer angle (left or right)
Input axes that Rotator and Sliders could be attached to:
Steering wheel (-1 to 1)
Throttle (0 to 1)
Brake
Clutch
Handbrake