The online racing simulator
Searching in All forums
(819 results)
Scawen
Developer
This week I've been continuing to make the program thread safe and efficient, restructuring and reordering as needed. I have reduced the number of critical sections, noticed and eliminated a possibility of deadlock, implemented code to detect future issues.

It's interesting to me that multithreading is already in place and working but there is a continuing investigation into all the code that is not yet thread-safe. This week has been increasing my confidence in understanding the issues and the scope of those issues and how to find them and solve them.

I still have lists of info screens to check and known code that is not yet thread-safe. The type of thing that could go wrong is usually when things change, such as objects or cars appearing / disappearing / regenerating, or when the user moves from one screen to another. In the stable state it should be robust already. I think I may take a pause from thread safety today to try some performance analysis including a visual display to show what is happening on the two threads.

Here's the diary of updates since the previous post:

26 Sept
Working towards removing any game code locks from the main thread during a d3d lock
(note that the 'main' thread is the one that processes windows messages and graphics)
Moved sync point (game lock and snapshot) to just after the windows message loop
- this allows frame sync point and windows messages to share a single critical section
- there are good reasons to process keyboard and mouse input while game code is locked
Included a debug check to show red warning if game code is locked during a d3d lock

27 Sept
Removing the few instances where a game code lock could have caused a deadlock
Establishing new rules about how the program works, what can be called from where
As the sync point is united with message loop, kb and mouse input is now thread safe
InSim is another form of input so InSim processing is also moved to the sync point
Converted Escape Menu to be a mode of World2d rather than a separate subprocess
- looks the same but avoids old workarounds that were causing new problems

28 Sept
Additional debug check to prevent main thread code calling game functions at wrong time
Sorting out parts of code that were marked as needing attention regarding thread safety
Small diversion: added a pointer to Player object in AI drivers for better efficiency
- also added a similar pointer to Player in the Car object to avoid player searches
Included setup & fuel load in snapshot for thread safe live settings / pit instructions
Noticed a possible crash in car draw code, used the snapshot setup which is thread safe

29 Sept
Added a new debug mode to detect (crash) if setup or colour pointers are used in render
- testing showed issue with colour config pointer, generating meshes when joining race
- restructured so a local copy of the colour config is stored in the car (no pointer)
- noticed that this is more efficient and noted that car setups use a similar system
- for consistency, efficiency and thread safety decided to do the same with car setups
- this turned out quite a long operation but cleaned up garage and vehicle editor a bit
- yesterday's copy of setup stored in the snapshot is no longer needed so deleted that
Added copy of Steer variable to CarSnapshot (rotates steering wheel / animates driver)
ziplfs
S3 licensed
some screens from editor
Flame CZE
S3 licensed
Moderator
It is in your clipboard, so you can paste it in an image editor (Photoshop etc.).
Scawen
Developer
I've been keeping a diary of progress that some might be interested in, just for a little insight into the way the work goes. As development has continued I have gradually learned more systematic ways to track down where issues might come up. With increased understanding, my direction changes from haphazard to more directed and systematic. The thing with multithreaded code is that things can't be left to chance, because the type of bugs that can come up from race conditions are are too mysterious.

The main gist of the last week of development was to continue with the snapshot, including the physics objects and the smoke and skids. As that is nearly complete I've been sorting out a snapshot for the various lists that can be displayed, like the race position list, connections list and results. Always making notes about the things I notice during my travels through the code, and thinking of strategies to sort out the next thing.

Yesterday I noticed a possibility of deadlock which cannot be allowed. No matter how rare it might be, if it's possible then it will happen at some point. So I've noted a couple of things to do a slightly different way and then I'll be looking at the input side of things.

Here's the diary of updates since the previous post:

18-20 Sept
ViewCar (pointer to currently viewed car) separated into two copies (Game and Snapshot)
Changed Game::ViewCar to Snapshot::ViewCar wherever it is used for graphical purposes
More functions moved from "World" to "Game" along with associated variables

21 Sept
Continued with CarSnapshot implementation, added smoothed camera position
Temporary diversion: improved accuracy of camera direction vector storage
More use of CarSnapshot and included player name for display purposes

22 Sept
Added Player UniqueID to CarSnapshot and made ray checking thread safe (click on car)
Improved efficiency of CarSnapshot (moved SSPos/SSBodyMat to main Car structure)
Implemented snapshot copy of the list of Solid objects (moving physics objects)
Fixed new bug that could cause an object to disappear for the first frame when moved

23 Sept
Implemented snapshot copy of Smoke/Dust puffs (necessary as they move)
Implemented critical section to avoid adding/removing skid nodes while drawing skids
Fixed free view follow glitches by storing elapsed frame turns as part of the snapshot
Made turbines, flags and trees use the new elapsed frame turns
Fixed crash bug related to map squares when exiting track editor
Added some player-related values to CarSnapshot to enable thread-safe text displays
Implemented snapshot copy of live race position list and race results list
Updated car arrows on small map display using snapshot race position list

24-25 Sept
Implemented snapshot of connection info for the list of names (take over, send setup)
Worked through several info display screens to check thread safety and use of snapshot
Noticed a possibility of deadlock by acquiring game code lock while d3d lock is held
- this is because there is also some game code that could try to acquire a d3d lock
- for example when a car is created or layout objects are added a d3d lock is required
- apparent solution: avoid possibility of a game lock by main thread during a d3d lock
Tomsteel
S3 licensed
Quote from Kanade :One detail I noticed: I think you missed something while making it skinable (the band under the rear wiper).

Thank you for reporting it, there are indeed a couple of polygons badly assigned!
I'm so thrilled to hear how much you enjoy driving it! Thumbs up

Quote from Eclipsed :There is no info so far that there would be any plans regarding editor update. Shrug

I believe there were mentions about some "ease of use" updates in the editor.
YIKES THIRTEEN
Slashpca
S3 licensed
Model made entirely within LFS EDITOR, using my mod the "SIMPRAJET" as a starting point, YIKES9 body kit originally created by me for my XRT tweak mod "XRT KOUKI HLU" and XRT HLU COMP", fitted to this S13 model and adjusted.

hyper cut video of parts 1-3:
https://youtu.be/e-5K5qYL9hk

https://youtu.be/uAAMeBYnK6E
https://youtu.be/Zfu-PdwBMLU
https://youtu.be/bXewRe3Fa4I

https://youtu.be/rU_gPz3wrmg
https://youtu.be/6wRm6JZ9DBg
https://youtu.be/3zN32D6F-mw

Part 6, converting body kit to RB style :
https://youtu.be/ohmZQtbAkrc

Part 7, Origin Race line Style kit:
https://youtu.be/DYmi_33SBZk

Origin of the bodykit:
https://youtu.be/eEh3nDRUpPY

Mesh wheels:
https://youtu.be/2_a27J4TFLs
https://youtu.be/UP7vUabg57I

Model 5 Wheels :
https://youtu.be/Ng9KVsneClo
https://youtu.be/Q-PP9qH5GRA
Last edited by Slashpca, .
Quored
S3 licensed
Quote from Gutholz :Tilt

Taken out of context... that's not what I meant... why can't people take a dummy and make a car out of it? From the drawings you can do it from scratch, but you can't take a billet in the form of a body and remodel it from scratch? I saw posts on the forums where a man took what kind of car from the tab fashion and made it in lfs editor bmw e92 so he was questioned about why he took the base car and not made from scratch ... even though there was nothing left of that car... Don't you think this is bullshit?
Eclipsed
S3 licensed
Quote from Tomsteel :...and hopefully a more polished editor to be released in order to avoid wasting time for temporary solutions in regards of texturing.

There is no info so far that there would be any plans regarding editor update. Shrug
Tomsteel
S3 licensed
Quote from Kanade :Will there be textures in the interior panels, instead of plain color?

Sure, I have plans in terms of the visuals aswell, but I decided to wait for the new graphics engine and hopefully a more polished editor to be released in order to avoid wasting time for temporary solutions in regards of texturing.
Channel In Discord for objects
le4aser
S3 licensed
My idea it's make chat (channel) in discord for share objects from LFS Editor (Dashes, Wheels, Badges, Exhausts, Rollcages, suspension) it makes modding easier LFS
LFS Editor. Startup error
Broker
S3 licensed
Hello!
When starting LFS Editor, an error occurs - No modes found.
How to fix it?
Foch_sho
S3 licensed
Quote from Scawen :I'm not really replying to TAJM, but just for the record for any reasonable people following this thread. This is about people hacking their .eng file, to contain far larger wavs than the limit that LFS allows, and that wav file being music rather than an actual engine sound. Then going online and selecting that hacked mod, forcing others to download that 30 MB mod and busting their eardrums with extremely loud music.

To pretend this is reasonable behaviour is just ridiculous.

That's all good. However, for two days I tried to inform your reviewer about another violation. But no one listened to me. If necessary, I can provide correspondence and proof. Where I see a mod with a violation, I write a complaint about it.

But. They don't want to listen to me. We are talking about the LARGHERR B282T mod. If you haven't seen him, then please pay attention to him. I think you will have a few questions in your head why the wheels are so huge. After all, the limitations in LFS Editor are very modest. This mod has a direct intervention in the LFS Editor code, using third-party HEX programs. The situation is absolutely the same as in the case of .eng files. And now back to the fact that the reviewer ignored my complaint about this mod.

I want to tell you that it's not fair. And I will ask you to fix this situation personally, if your assistants can handle it.
Scawen
Developer
Quote from Amynue :Probably not the right topic to post this, but I have a problem with the editor when it comes to suspension.

We can precisely set how far the suspension can compress using the "Max up" slider, but we can't really do that when it comes to how far the suspension can extend. Theoretically we can do it by adjusting the "Lowest wheel height" slider, but the problem is we also use that slider to set the desired ride height once we set the suspension to desired stiffness. So the stiffness, ride height and max suspension extension can't be set to precise values without sacrificing one of them.

I agree and there's no way around it at the moment.

How it works in LFS is you can set the bump stop at the top of the suspension's motion (as you know, with the "Max up" slider in the "Suspension" tab at top left) but the lower stop is set by "Lowest wheel height" in the "Suspension tab at the bottom of the screen.

But how it is coded at the moment, that lower stop then coincides with the maximum spring extension, so there is no force from the spring at that point. This has simply been the case since the early days of LFS, there is no code for a maximum extension, separate from the point where the spring itself is fully extended.

This is a reasonable approximation for many vehicles, but I can understand that it doesn't work for some, and you want the spring to be already compressed to some extent when the suspension is at maximum extension. Or looked at another way, you want to set a maximum extension that stops the suspension moving too far, even though the spring is still pushing at that maximum extension.

To change it to work as you want it requires another variable in the editor and saved in the vehicle files. An update is needed in the physics code which sets up and operates the suspension. It can be done but would require an incompatible version of LFS which I can't work on right now as I'm in the middle of the multithreading.

I also realise the "Max up" and "Lowest wheel height" are quite confusing. We need three variables to replace these two but they should also be less confusing and correspond better with a real vehicle.
Škoda Fabia I
Flame CZE
S3 licensed
Moderator
So I've decided to take up another modelling challenge in the LFS editor... After the Velorex, I thought it would be nice to have my own car in LFS.

It's nothing but a classic small Czech car from the early 2000's - the first generation of Škoda Fabia. It has a weak 1.2 litre 3-cylinder engine in a car weighing just over a ton.

I've got some of the specs in the editor already and have started modelling using a blueprint. It will be nice to use my own photos for reference too. Wish me luck Big grin
Last edited by Flame CZE, .
Kanade
S3 licensed
Thank you, I will surely have questions about the editor in future. Smile
Currently I have continued a tiny bit, 1/4 of the front fender.

I'm a bit anxious about the suspensions as I have not found proper documentation yet (I only got R25 paper documentation at home).
Kanade
S3 licensed
I personally hope that some unaccessible or some unexpected areas will still have collisions, I bet that the community can come up with amazing things with the editor.
The mods system, what is allowed, what is not allowed and what we hope to see
Scawen
Developer
The Live for Speed mods system, what is allowed, what is not allowed and what we hope to see

The mods system has now been public for 10 months and has opened up a huge range of possibilities in Live for Speed. Many excellent mods have been made and the results have been enjoyed by a lot of people.

On the positive side, some people have built models in the LFS editor, others have created them in advanced software such as Blender and exported them to be completed in LFS. Some people have found models on the internet, created by artists who have given permission to other people to use them. A lot of great mods have been uploaded.

On the negative side, some people have come across models on the internet that were taken from other games and uploaded, giving 'permission' for others to use those models, although the uploader had no right to give that permission. Worse, some users have extracted models directly from other games and claimed them as original work. Controversially, some people have taken models from other games and traced them in 3 dimensions, in a process that has been called 'retopology'. The idea was to claim that their new mesh is entirely their own work, because they did in fact build every point and polygon. In a fraudulent version of this, some people have imported models from other games, edited them a little and called the result a retopology.

The negatives listed above have become a serious problem because they have created a lot of work for our volunteer reviewers, leading to long delays publishing mods created by users who are using the system as intended. We do not charge a subscription for use of the mods system after the initial S3 license payment. It is not possible for us to pay a team of reviewers to perform detailed checks on all the mods submitted.

We rely on community members to be diligent and work with us, within the rules. Some members have defied the rules or tried to use loopholes to get around them. This is not sustainable. We have a fully integrated mods system. Vehicles are hosted on and distributed by our own web servers. For this reason mods must be fully legal, from legitimate sources and not from other games unless specific permission has been given.


What is allowed

The following types of mod are allowed, if created by the mod uploader or with LEGITIMATE permission or license from the original creator.

1) Fully original creations. Possibly inspired by multiple real vehicles or a class of vehicles.

2) Vehicles inspired by only one real vehicle and closely following the original design. Such mods do not have any affiliation with the manufacturer and therefore cannot use real names or logos. The inspiring vehicle must be declared in the "intellectual property" declaration, so that mod creators are open about the inspiration and credit the original designer. These mods are regarded as tributes to the original vehicle, portraying the real vehicle in a good light. If the original manufacturer ever expresses a problem with such a lookalike mod, it will be removed very quickly. Indeed we may remove any model at any time.

3) Detailed replica of a real vehicle, WITH PERMISSION from the manufacturer. This is a very rare case, and would require written documentation to be allowed on our system. In that case the real vehicle name and logos can be used.

NOTE: A serious problem is often encountered with (2) above (vehicles inspired by one real vehicle). Many, if not most, of the good looking models of real cars found on file sharing sites have been ripped from other racing games or simulations. These models MAY NOT be used in Live for Speed, regardless of the usage license displayed on the file sharing site. We understand that people may be tempted to use a model that is freely available to download, but even if they work on it for many hours, preparing it for use in Live for Speed, we cannot accept the mod. It is up to you to be absolutely certain that the person who uploaded the source model has the right to give you permission to use it. If in any doubt YOU MUST NOT try to upload such a model to our system. This has stalled the reviewing process on several occasions, as our volunteer reviewers have not been able to keep up.


What is not allowed

1) Models extracted (ripped) from another game or simulator. This is a breach of the software license of the original game. Another developer acquired the license and paid for the development of that model, to be used in their game. It is unlikely they want to see it driving around in another game. You are welcome to ask the developer's permission if you would like to use their model, but we don't think this will often be granted. We don't want their models on our system either, so please do not submit them.

2) Models downloaded from the internet that have originally been taken from another game or simulator, even if that was done by someone else. How can you know if a model you find is actually legitimate and has not come from another game? The answer: If you don't know for sure, then don't use it. Many of the high quality cars HAVE come from another game, and the person who uploaded it is falsely claiming it as a model they made. In these cases, they do not have the right to allow you to use the model.

3) Models traced in 3 dimensions from a model extracted from another game. This 'retopology' has sometimes been seen as a loophole that allowed people to submit 'original work' as they actually built every vertex and triangle, using the original model as a guide. But it is not actually all their own work, as it is based on the 3 dimensional likeness of a vehicle, ripped from another game. Obviously they would have found it far more difficult without using the ripped model as a guide. The source model contains a lot of development work by the original game developer, which is incorporated into the new 'retopology' model, even if all the vertices and triangles are new. We cannot accept these retopology models.

4) Any other use of models or images extracted from another game to help in building a mod. No part of your mod creation process can involve using another game's content in defiance of the license agreement for that game.

NOTE: People who are found to submit a mod that is not within the rules may receive a temporary ban from submitting mods. Longer temporary bans may be given if they do it again. Permanent bans are also possible for repeated deliberate rule breaking or worse offences.


What we hope to see

We hope that mod creators will only create original models or use models or sources that are confirmed to be legal. This legal confirmation is the duty of the submitter, not the reviewer.

It is HIGHLY RECOMMENDED to create a development thread for your mod, including plenty of information as early as possible in the development process, until the time the mod is submitted to be published. Community members may give a lot of support and sometimes suggestions in the early stages. Development threads can help our reviewers to see instantly that the mod is genuine and legitimate.
Forum section: Vehicle Mods - Work in Progress

A list of valid sources, websites where you may find some acceptable sources and sites which are not acceptable sources:
Forum thread: Model sources - which are OK t ... nd which are not accepted

If you are unsure about the legitimacy of a source model, please discuss it on the forum, where people may well be able to help.
Forum section: Vehicle Mods Forum

The mods system is all about creativity and fun. Please do everything you can to help the reviewers and make it easy for them. Please help review the mods that are waiting to be published. You can express support for new mods and help check if they are legal if you wish. You can also make comments or suggestions to improve the new mods.
Forum section: Vehicle Mod Reviews (S3 licensed users only)

If you submit a mod, you must follow the rules outlined on this page:
Web page: Vehicle Mod Submission Guidelines
Last edited by Scawen, .
henricat2006
S3 licensed
If you know how to use the hex editor, you can edit the engine files and go beyond the limits of the LFS Editor, I made a car to test, trying to simulate the Tesla Model S Plaid

https://www.lfs.net/files/vehmods/E3BBA6
Foch_sho
S3 licensed
I join this problem. Sometimes it is extremely inconvenient, it is impossible to set an extremely accurate suspension stroke, which would be a benchmark regardless of the adjustment in the game itself in the garage. At the very beginning of the appearance of LFS Editor, I made mistakes many times and did not attach the true meaning of this slider. This setting is inconvenient in this form. It would be great if you could add an adjustment slider, which is located in the garage of the LFS. So we can see how the players will be able to customize their car, and in what position the car will be located. Now it looks like a "lottery"
FGED GREDG RDFGDR GSFDG