So, I implemented something like this for SimFIA around 15 years ago now. It only used the Split packets because it was the only thing that was reliable. We would have the Timing and Scoring interface that would show deltas to car in front, car behind for our league races, but it would only show for 5 seconds when the player passed a sector. The FiA and FOM get their timing information on the F1 cars from the timing lines as well, but not just each sector time, but also the mini-sectors between the marshal posts (around 200 meters apart on average) each have a timing loop on them. The FOM TV feed actually updates the deltas between the cars on each timing loop by calculating the delta between Car 1 and Car 2's time between the same timing loop. That effectively works out to an array of timestamps. It's also why you don't see a sector time display, until all cars have passed the first sector timing line.
The array would be something like ...
struct Cars { UCID u8; PLID u8; Info u8; // Is Player; Is IA; Sp0 u8; // Padding. Always 0;
Lap u16; // Current Lap; Used to index into Laps array. Node u16; // Current Node; Used to index into Best and Laps array. Last u32; // Current Timestamp; Used to show last update from car.
struct CarInfo { Lap = u16; // 24 Hour Races could have more than 255 laps. Node = u16; // Node ID Time = u32; // Timestamp (Milliseconds, So / 1000 for seconds.)
// Location in map in LFS Meter Units. LocX = u32; LocY = u32; LocZ = u32;
// Vector of their velocity in LFS Meters Units. // 9.80665 m/s² = 952_863 = 1G; Z should equal this when sitting still on level ground. // -49.03325 m/s² = -4_764_315 = -5G; X Formula Car Hard Breaking. VelX = i32; VelY = i32; VelZ = i32;
// Rotating Degrees from Center +90.00 = 9000; -180.00 = -18000 RotX = i16; // Roll: between -180 and 180 deg; RotY = i16; // Pitch: between -90 and 90 deg; RotZ = i16; // Yaw: between -180 and 180 deg; }
If you are going for iRacing type delta for players to compare against themselves, a much higher resolution timing loop is required. I'd want a timestamp for every time they enter each track node. Yeah, that's going to be like 350+ data points for each lap, and sometimes much more. I'd additionally, want their X, Y, Z world cords, as well as their heading vector, and speed (in the LFS meters per second, so the u32 where the upper u16 is the actual meters, and the lower u16 is the 65536th of a meter.)
UCID = u8; PLID = u8; Info = u8; // Is AI, is Player; Sp0 = u8; // Padding
Lap = u16; // 24 Hour Races could have more than 255 laps. Node = u16; // Node ID Time = u32; // Timestamp (Milliseconds, So / 1000 for seconds.) Speed = u32; // Speed in m/s using LFS Meter Units.
// Location in map in LFS Meter Units. LocX = u32; LocY = u32; LocZ = u32;
// Vector of their velocity in LFS Meters Units. // 9.80665 m/s² = 952_863 = 1G; Z should equal this when sitting still on level ground. // -49.03325 m/s² = -4_764_315 = -5G; X Formula Car Hard Breaking. VelX = i32; VelY = i32; VelZ = i32;
...how much work/cost would be allowing also rental model for people who struggle with basic math and concept of saving money (although I can imagine life situations where even 1k TL could be difficult to save over year, but maybe such person should focus on other things in life than PC and games)?
(this is not serious suggestion, sorry Scawen, just dumping overloaded brain. I like the lifetime license - shows moral integrity of developers which is welcome change in today's world for me ... well, one really far fetched option would be monthly rental until some total sum (like ~150% of S3 price) is paid over time and then changing rental license to final license, thus being "money lender" business on LFS dev team and making everything more complicated, although maybe lowering entry barrier for people like OP)
OK, following looks a lot, but should be straightforward ...
Download lapper, and save to your '/LFS' folder.
Download from https://www.lfs.net/forum/434-Releases. I'm still running V7093, but no reason why script won't work with the newer versions.
You can rename this downloaded folder or leave name as is. Because I use lapper with lots of different layouts, I make a new folder with the name of my new layout, as lapper saves times and drift scores in databases using the track abbreviation. And as I use LA1 a lot, the 2nd layout would overwrite the times/scores of the 1st layout.
In this downloaded folder, in the /bin directory, open 'LFSServers.cfg' file
Change the IP and port numbers on the last line to match your rented LFS IP / port numbers
(e.g. DEF1|gr1|123.456.78.901|59901|./default|default_1.ini|autowork)
In the /bin/default directory, open 'default_1' file.
Change the password to match your multiplayer host password (e.g. $password = "mypass": )
In the same directory, open both the 'admin.txt' and 'superusers.txt' files, and add your LFS username.
Download the 'drag2.txt' file in my post
(https://www.lfs.net/forum/thread/112222-Simple-Drag-Light-System),
and rename to 'drag2.lpr'.
Move this file into the /bin/default/includes folder.
In that folder, open the 'addonused' file, and add the line
include("./drag2.lpr");
All the above files can be opened with your default note app, e.g. Notepad.
To run lapper, click on the 'LFSLapper.exe' file.
If all that works, then when in your server, type "!drag".
If you want to change any of the light colours, you can. For instance "^0•" will show a black light, but if you want it white, you would change the 0 to 7, or 8 if you wanted grey, etc.
If you want to do Drivers Briefing file here is how I did it.
First i made the file Briefing.lpr in the folder location:
C:\LFS\LFSLapper\bin\servers\includes\
Then i added line:
include( "./Briefing.lpr");
Line was added to file:
C:\LFS\LFSLapper\bin\servers\includes\addonsused.lpr
Then I made sure that my Server_OPEN.lpr in the folder location:
C:\LFS\LFSLapper\bin\servers\
had line
include( "./includes/addonsused.lpr");
After that
I wrote code and tested it.
I found out that, if you want to have multiple commands for different text flods, you have to write them in same file as I have done here.
Next I am going to explore the "SWITCH( $command )" if it would make possible to make individual "files with execute commands".
Here is my code
----------
# DriversBriefing
# THIS IS THE DRIVERSBRIEFING text
Sub line1 ()
cmdLFS("/msg" ); #This maybe clears all other written text before it
DelayedCommand( 1,line2 );
EndSub
Sub line2 ()
globalmsg("^7Welcome to OPEN Drift Event 1 ");
DelayedCommand( 4,line3 );
EndSub
Sub line3 ()
globalmsg("^7We now start the DRIVERS BRIEFING.");
DelayedCommand( 4,line4 );
EndSub
Sub line4 ()
globalmsg("^7Keep the game chat empty for competition leader messages.");
DelayedCommand( 4,line5 );
EndSub
Sub line5 ()
globalmsg("^7Do not write anything to the game chat during the QUALIFY.");
DelayedCommand( 4,line6 );
Sub line6 ()
globalmsg("^7Thank you!");
EndSub
# THIS CLOSES DRIVERSBRIEFING text flod
Sub CloseBriefMsg( $KeyFlags,$id )
closeGlobalButton("Brief_msg");
EndSub
# THIS IS THE COMMAND FOR START DRIVERSBRIEFING text flod
CatchEvent OnMSO( $userName, $text )
$ucaseText = ToLower($text);
IF( $ucaseText == "!brief" ) THEN
IF( UserIsAdmin($userName) == 1 ) THEN
DelayedCommand( 1, line1 ); # delay in secends, here 1, whats happens next
privMsg($userName, "^2Drivers Briefing starts ...");
ELSE
privMsg("Only for admin!");
ENDIF
ENDIF
IF( $ucaseText == "!huuto" ) THEN
IF( UserIsAdmin($userName) == 1 ) THEN
DelayedCommand( 1, huuto_line1 ); # delay in secends, here 1, whats happens next
privMsg($userName, "^2Sign up name call starts ...");
ELSE
privMsg("Only for admin!");
ENDIF
ENDIF
EndCatchEvent
# THIS IS THE SIGN UP NAME CALL text
##########NIMENHUUTO##########
Sub huuto_line1 ()
globalmsg("^4SIGN UP NAME CALL");
DelayedCommand( 4,huuto_line2 );
EndSub
Sub huuto_line2 ()
globalmsg("^7We now start the SIGN UP NAME CALL FOR THE EVENT.");
DelayedCommand( 4,huuto_line3 );
Sub huuto_line3 ()
globalmsg("^7ALL DRIVERS who want to PARTICIPATE in the competition TODAY,");
DelayedCommand( 4,huuto_line4 );
EndSub
Sub huuto_line4 ()
globalmsg("^7TYPE hi in the game chat now.");
EndSub
# THIS CLOSES text flod
Sub CloseHuutoMsg( $KeyFlags,$id )
closeGlobalButton("huuto_msg");
EndSub
Scaling up LFS, is almost equivalent to a complete "acquisition" by big players, where big money and manpower will try to replace art.
Open sourcing it, will make harder the, "I can live with it" potential.
So, lets enjoy the ride, and mr. Scawen play tennis, it prolongs life !
The answer helped me a little, but not always, so I go through the following ...
# Possible subs to use:
# Sub sub1()
# Sub sub1($userName)
# Sub sub1($KeyFlags,$userName)
# Sub sub1($KeyFlags,$argv)
# Sub sub1($KeyFlags,$id)
If you're using a command to start things off, why do you need a distance to do first?
Another issue might be the directory and folder you're placing your briefing.lpr file. It should be in the standard \bin\default\includes directory, and should be added into the existing addonsused.lpr file.
Each round consists a total of up to 12 stage combos (ex: 6 stages x 2 car pools = 12 combinations)
From that total, only your best 5 results will count towards round points. Points are added per stage:
1st - 10pts
2nd - 9
...
10th - 1
ex: If your best results are 1st-2nd-2nd-5th-5th, your leaderboard points from this round will be 40pts
At the end of each round, your position on the leaderboard will determine how many championship points you earn:
1st 23pts
2nd 20
3rd 17
4rd 14
5th 12
6th 10
7th 8
8th 6
9th 4
10th 2
11th+ 1
Warning: Admins will be on the lookout for any bad conduct. Any abuse will be met with severe punishment.
For Discord:
-Keep an eye on #champ-announcement for round details, points update and general info.
-Check #champ-bot for update on stage times.
-If you want to report a bug or misconduct, use #champ-reports or alternative #champ-bot-reports using in-game server !report command.
So with all the updates there is quite a process now, that takes you right through what is necessary.
For example, if you have not yet set an unlock code, and you start up LFS in version F (or earlier)...
-----
1) Message on entry screen "A new update is available". This flashes for a few seconds. There is a button to visit the forum and another to directly download in game.
2a) Visit forum, you will see the test patch thread.
OR
2b) Click direct download, you go straight to the download screen.
OR
2c) Ignore that and click "List of Hosts", you see the download screen.
3) Install patch manually or using the auto updater.
4) Start LFS. The "Unlock LFS" or "S3 licensed" button is flashing.
5) Click the button. There is a message that you need to update your unlock code and an "external link" icon button.
6) Click the external link, you go to your details page and the option "Set a new unlock code" is in RED text so you can't miss it.
-----
The worst issue remaining is for totally new players, they will install LFS and it already says "A new update is available" on the entry screen, but they cannot use the auto updater.
So that means it is a high priority to release the full version.
I understand the distortion is kind of strange, because it is linear. Although 'correct' in one sense it is sort of wrong in another, related to our perception.
Ideally there could be a distortion shader to make this affect more agreeable but this is not available in LFS.
There is a quite extreme setting you can use. It uses multiple renders to create the main scene.
In Options - View ... there is a setting "Multiple screen layout" and you can set up to 5 left screens and 5 right screens. This can approximate a cylindrical render, created from 11 vertical linear renders per frame.
I'd be interested to know if you get any improvement by using that.
You would adjust the view in that case by "Main screen FOV" and "Screen Angle" which should be a fairly small number.
Here I am again, beating on the dead horse due to an external reference :
"Microsoft is not on the business of making OS's, the OS is nothing but a data mining tool. I wonder how much money they make on the sale of user data vs total sales of Windows OS" ... "at this point you're paying to be spied on"
Made the changes.
I still need to exclude front-wheel drive cars. Is there a query for the drivetrain?
is it something like
$modinfo["drive"] = getmoddedcarinfo($userName);
... and then the same if-then logic can be applied in the same way.
## Allowed Drivetrains on the server
## Drivetrain: Rear Wheel Drive [RWD] or Four wheel drive AWD
## List of Drivetrains
## No_drive, //0: No_drive
## Rear_wheel_drive, //1: RWD
## Front_wheel_drive, //2: FWD
## Four_wheel_drive, //3: AWD
Code:
----
Event OnNewPlayerJoin( $userName )
## Allowed tyres on the server
## Tyre types: Super or Normal
## List of Tyre types
## Slick_R1, //0: R1
## Slick_R2, //1: R2
## Slick_R3, //2: R3
## Slick_R4, //3: R4
## Road_super, //4: Super
## Road_normal, //5: Normal
## Hybrid, //6: Hybrid
## Knobbly, //7: Knobbly
$OTFR = GetCurrentPlayerVar( "OldTyreFrontRight" ); # Vanha Rengas etu oikea
$OTRR = GetCurrentPlayerVar( "OldTyreRearRight" ); # Vanha Rengas taka oikea
$TFR = GetCurrentPlayerVar( "TyreFrontRight" ); # Rengas etu oikea
$TRR = GetCurrentPlayerVar( "TyreRearRight" ); # Rengas taka oikea
$FWAdj = GetCurrentPlayerVar( "FrontWheelsAdj" ); # Etu rengas säätö?
$RWAdj = GetCurrentPlayerVar( "RearWheelsAdj" ); # Taka rengas säätö?
IF (($OTRR != "TYRE_ROAD_SUPER" ) && ($OTFR != "TYRE_ROAD_SUPER" ) && ($TRR != "TYRE_ROAD_SUPER" ) && ($TFR != "TYRE_ROAD_SUPER" ) && ($OTRR != "TYRE_ROAD_NORMAL" ) && ($OTFR != "TYRE_ROAD_NORMAL" ) && ($TRR != "TYRE_ROAD_NORMAL" ) && ($TFR != "TYRE_ROAD_NORMAL" ))
THEN
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
openPrivButton( "tyrespec",50,35,100,15,5,15,32, "^7You have been moved to spectators because your ^1disallowed ^7tyres");
openPrivButton( "tyrechange",50,50,100,15,5,15,32, "^7Please change your tyres to ^3Normal ^7or ^3Super" );
# openPrivButton( "tyrechange",50,50,100,15,5,15,32, "^7Please change rear ^7and front ^7tyres to ^3Super" );
ENDIF
## Allowed cars on the server
## Vehicle class: saloon, touring car or GT
## List of correct names of vehicleclasses
## Object, //0: Object
## Touring_Car, //1: Touring car
## Saloon_Car, //2: Saloon car
## Buggy, //3: Buggy
## Formula, //4: Formula
## GT, //5: GT
## Kart, //6: Kart
## Bike, //7: Bike
## Van, //8: Van
## Truck, //9: Truck
## Formula_1, //10: Formula 1
## Formula_SAE //11: Formula SAE
$modinfo["class"] = getmoddedcarinfo($userName);
IF(($modinfo["class"] != "GT" ) && ($modinfo["class"] != "Saloon_Car") && ($modinfo["class"] != "Touring_Car"))
THEN
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
openPrivButton( "classspec",50,35,100,15,5,15,32, "^7You have been moved to spectators because your ^1car ^7does not meet the server ^1requirements.");
openPrivButton( "classchange",50,50,100,15,5,15,32, "^7Allowed vehicles ^7on the server are ^3Saloon, Touring Car, or GT" );
ENDIF
EndEvent