The online racing simulator
Searching in All forums
(59 results)
Tommy
S3 licensed
Haha, perfect.
Put in on github and let the community do it's magic
Tommy
S3 licensed
It's written in .Net 2.0 (as per note on the site) so it is decompilable.
Try running a decompilator on it, you may be able to get clean source code.

You would be surprised how many binaries have I came accross that were published in debug mode without any code obfuscator.
Tommy
S3 licensed
This should be quite easy to implement - you can control LFS using virtual controller so implement a proxy that would use mouse for gear selection and forward this to LFS.

For gear changes only, you could emulate keyboard presses without use of virtual controller (as my lfs strobe program from years ago). For an example with proxy controller check my LFS autonomous driving project: https://github.com/soolek/autocruise
Tommy
S3 licensed
This script will definitively work I have made my own controler proxy too, using .net only but it does not alter steering output.

IMO it is not good to take all the hard work from the driver since it will limit him at some point in the future (tracks are 3D, the script takes 2D slip angle into account only, while small concave can make a difference in grip).

on the other hand it is cool for casual gamers...

Makeu: try to use very understeer sets (lots of rear toe-in, stiff front swaybar) and once you find that the understeer limits you, lower it a bit.
Current very fast, high-end setups are neutral and hard to control because they use all the available grip.
This WILL make you better if you want to get serious
Tommy
S3 licensed
Forzas sensitivity is selective - that is more sensitivity when countersteer is needed to steer outwards and less to steer into corner when oversteer happens. I find this kind of aid very confusing and personally hate it. I have used a pad (starting from ps1 dualshock) for 14yrs in LFS and developed a strong thumb sense I guess

Here are my tips:
1) Get rid of all deadzones, try to map whole physical stick range to ingame wheel movement (so none gets wasted)
2) Set steer compensation to about 0.6 for drifting, 0.4 for racing (more linear)
3) Use very limited steer range in car setup for grip racing (I recently discovered that 16 degrees is great ratio of countersteer ability and "feel")
4) If your steering is snappy try to filter/smooth it out (forgot the setting name) just high enough till it doesn't feel laggy

Try to use setups that have understeer feel so you won't struggle with countersteer and use some rigid position (I tend to rest my elbows on knees) so your pad won't float around in midair.

LFS has great steer response without any aids comparing to forza, take advantage of it - some people struggle with 900deg wheel turn to make a fast lock2lock.

https://www.youtube.com/watch?v=C96uovYkiQs 36 degree turn, 0.6 steer compensation. Notice that it is hard to feel the end of steer range so I still flutter a bit.
Tommy
S3 licensed
Perfect! Loading times are back to normal (that is a few seconds) even with very high resolution textures. Thank you!
Tommy
S3 licensed
I wanted to make a fully-fledged controller proxy for LFS in c#, but it is in my queue for to long now (to busy doing paid projects). I made some pilot app that proved that the concept worked and you can alter the output for your own liking with additional data from insim, outgauge, etc. (for example: press clutch when you are driving car with sequential gearbox and have the gas pedal pressed while doing down-shift)

The parts are already there: vJoy for output, lots of articles for controller input, insim, outgauge c# libraries.

Here are other possibilities:
-ALS on depressing gas pedal (turn ignition off and press the gas pedal)
-Cancel turn signals
-Valet parking after the race (pre-recorded route to pits)
-Pace car
Tommy
S3 licensed
If you want to achieve something similar then the anwser is yes in general.

OT: Timer is old CLR functionality - you better use something else, for example a separate thread with sleep ~17ms and then send backspace in it:

(C#)
new Action(() =>
{
Thread.Sleep(17);
//send backspace here
}).BeginInvoke();
Last edited by Tommy, . Reason : use of ThreadPool's Threads is better then creating Threads manually in such case
Tommy
S3 licensed
Strobe is just a key emulator, the "secret" about not showing characters in chat is that with each keypress a second "backspace" keypress is send - its done quickly that you just dont see it.
Connecting to LFS is a bit pain, but you just need to get used to it. To automate it a bit, your program would need to change the lfs config and/or read current config and use values from there. It could even open up chat window and do the /insim:<port> for the user once it detects the lfs game window. People don't do it because it is a lot of work for a developer to take every possibility into account
Tommy
S3 licensed
[Solved]
It turns out that IT WAS lfs config after all, for some reason I had my ip in config changed (which is used for both: hosting a lfs session and insim).
Reverted it back to 127.0.0.1 and everything works
Tommy
S3 licensed
For some unknown reason the 29999 port is used under different ip (25.135.172.210?!). When trying to connect to it I receive information that this port is already used.
I hate networking
Tommy
S3 licensed
doing netstat -anb shows clearly that LFS is listening on port 29999 (this port was unused prior starting LFS):

Active Connections

Proto Local Address Foreign Address State
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING
[Skype.exe]
TCP 0.0.0.0:135 0.0.0.0:0 LISTENING
RpcSs
[svchost.exe]
TCP 0.0.0.0:443 0.0.0.0:0 LISTENING
[Skype.exe]
TCP 0.0.0.0:445 0.0.0.0:0 LISTENING
Can not obtain ownership information
TCP 0.0.0.0:554 0.0.0.0:0 LISTENING
[wmpnetwk.exe]
TCP 0.0.0.0:1025 0.0.0.0:0 LISTENING
[wininit.exe]
TCP 0.0.0.0:1026 0.0.0.0:0 LISTENING
EventLog
[svchost.exe]
TCP 0.0.0.0:1027 0.0.0.0:0 LISTENING
Schedule
[svchost.exe]
TCP 0.0.0.0:1028 0.0.0.0:0 LISTENING
[services.exe]
TCP 0.0.0.0:1029 0.0.0.0:0 LISTENING
[lsass.exe]
TCP 0.0.0.0:2599 0.0.0.0:0 LISTENING
[devenv.exe]
TCP 0.0.0.0:2869 0.0.0.0:0 LISTENING
Can not obtain ownership information
TCP 0.0.0.0:3258 0.0.0.0:0 LISTENING
[devenv.exe]
TCP 0.0.0.0:5357 0.0.0.0:0 LISTENING
Can not obtain ownership information
TCP 0.0.0.0:10243 0.0.0.0:0 LISTENING
Can not obtain ownership information
TCP 0.0.0.0:47087 0.0.0.0:0 LISTENING
[Skype.exe]
TCP 25.135.172.210:139 0.0.0.0:0 LISTENING
Can not obtain ownership information
TCP 25.135.172.210:29999 0.0.0.0:0 LISTENING
[LFS.exe]
TCP 127.0.0.1:1030 127.0.0.1:1031 ESTABLISHED
[thunderbird.exe]
TCP 127.0.0.1:1031 127.0.0.1:1030 ESTABLISHED
[thunderbird.exe]
TCP 192.168.1.100:139 0.0.0.0:0 LISTENING
Can not obtain ownership information
TCP 192.168.1.100:1310 91.214.238.170:80 CLOSE_WAIT
[wtw.exe]
TCP 192.168.1.100:3052 173.194.113.71:80 CLOSE_WAIT
[wtw.exe]
TCP 192.168.1.100:3119 74.125.136.16:993 ESTABLISHED
[thunderbird.exe]
TCP 192.168.1.100:3120 74.125.136.16:993 ESTABLISHED
[thunderbird.exe]
TCP 192.168.1.100:3121 74.125.136.16:993 ESTABLISHED
[thunderbird.exe]
TCP 192.168.1.100:3122 74.125.136.16:993 ESTABLISHED
[thunderbird.exe]
TCP 192.168.1.100:3262 91.214.237.85:443 ESTABLISHED
[wtw.exe]
TCP 192.168.1.100:3264 157.55.56.155:80 ESTABLISHED
[Skype.exe]
TCP 192.168.1.100:3268 91.197.13.248:80 CLOSE_WAIT
[wtw.exe]
TCP 192.168.1.100:3269 91.190.216.64:12350 ESTABLISHED
[Skype.exe]
TCP 192.168.1.100:3274 168.63.124.173:80 ESTABLISHED
[Explorer.EXE]
TCP 192.168.1.100:3276 65.52.237.45:80 ESTABLISHED
[Explorer.EXE]
TCP 192.168.1.100:3277 46.229.154.8:80 CLOSE_WAIT
[Explorer.EXE]
TCP 192.168.1.100:3278 46.229.154.8:80 CLOSE_WAIT
[Explorer.EXE]
TCP 192.168.1.100:3284 157.56.124.131:443 ESTABLISHED
[Explorer.EXE]
TCP 192.168.1.100:3285 157.56.192.103:443 ESTABLISHED
[Skype.exe]
TCP 192.168.1.100:3327 74.125.136.16:993 ESTABLISHED
[thunderbird.exe]
TCP [::]:135 [::]:0 LISTENING
RpcSs
[svchost.exe]
TCP [::]:445 [::]:0 LISTENING
Can not obtain ownership information
TCP [::]:554 [::]:0 LISTENING
[wmpnetwk.exe]
TCP [::]:1025 [::]:0 LISTENING
[wininit.exe]
TCP [::]:1026 [::]:0 LISTENING
EventLog
[svchost.exe]
TCP [::]:1027 [::]:0 LISTENING
Schedule
[svchost.exe]
TCP [::]:1028 [::]:0 LISTENING
[services.exe]
TCP [::]:1029 [::]:0 LISTENING
[lsass.exe]
TCP [::]:2869 [::]:0 LISTENING
Can not obtain ownership information
TCP [::]:3587 [::]:0 LISTENING
p2psvc
[svchost.exe]
TCP [::]:5357 [::]:0 LISTENING
Can not obtain ownership information
TCP [::]:10243 [::]:0 LISTENING
Can not obtain ownership information
UDP 0.0.0.0:68 *:*
Dhcp
[svchost.exe]
UDP 0.0.0.0:443 *:*
[Skype.exe]
UDP 0.0.0.0:500 *:*
IKEEXT
[svchost.exe]
UDP 0.0.0.0:1434 *:*
[sqlbrowser.exe]
UDP 0.0.0.0:3702 *:*
[dashost.exe]
UDP 0.0.0.0:3702 *:*
EventSystem
[svchost.exe]
UDP 0.0.0.0:3702 *:*
[dashost.exe]
UDP 0.0.0.0:3702 *:*
FDResPub
[svchost.exe]
UDP 0.0.0.0:3702 *:*
FDResPub
[svchost.exe]
UDP 0.0.0.0:3702 *:*
EventSystem
[svchost.exe]
UDP 0.0.0.0:4500 *:*
IKEEXT
[svchost.exe]
UDP 0.0.0.0:5004 *:*
[wmpnetwk.exe]
UDP 0.0.0.0:5005 *:*
[wmpnetwk.exe]
UDP 0.0.0.0:5355 *:*
Dnscache
[svchost.exe]
UDP 0.0.0.0:8976 *:*
[devenv.exe]
UDP 0.0.0.0:8977 *:*
[devenv.exe]
UDP 0.0.0.0:47087 *:*
[Skype.exe]
UDP 0.0.0.0:60985 *:*
FDResPub
[svchost.exe]
UDP 0.0.0.0:60987 *:*
EventSystem
[svchost.exe]
UDP 0.0.0.0:60989 *:*
[dashost.exe]
UDP 25.135.172.210:137 *:*
Can not obtain ownership information
UDP 25.135.172.210:138 *:*
Can not obtain ownership information
UDP 25.135.172.210:1900 *:*
SSDPSRV
[svchost.exe]
UDP 25.135.172.210:29999 *:*
[LFS.exe]
UDP 127.0.0.1:1900 *:*
SSDPSRV
[svchost.exe]
UDP 127.0.0.1:56480 *:*
[Skype.exe]
UDP 127.0.0.1:56481 *:*
[Skype.exe]
UDP 127.0.0.1:60984 *:*
SSDPSRV
[svchost.exe]
UDP 192.168.1.100:137 *:*
Can not obtain ownership information
UDP 192.168.1.100:138 *:*
Can not obtain ownership information
UDP 192.168.1.100:1900 *:*
SSDPSRV
[svchost.exe]
UDP 192.168.1.100:60983 *:*
SSDPSRV
[svchost.exe]
UDP [::]:500 *:*
IKEEXT
[svchost.exe]
UDP [::]:1434 *:*
[sqlbrowser.exe]
UDP [::]:3540 *:*
PNRPsvc
[svchost.exe]
UDP [::]:3702 *:*
FDResPub
[svchost.exe]
UDP [::]:3702 *:*
EventSystem
[svchost.exe]
UDP [::]:3702 *:*
EventSystem
[svchost.exe]
UDP [::]:3702 *:*
FDResPub
[svchost.exe]
UDP [::]:3702 *:*
[dashost.exe]
UDP [::]:3702 *:*
[dashost.exe]
UDP [::]:4500 *:*
IKEEXT
[svchost.exe]
UDP [::]:5004 *:*
[wmpnetwk.exe]
UDP [::]:5005 *:*
[wmpnetwk.exe]
UDP [::]:5355 *:*
Dnscache
[svchost.exe]
UDP [::]:60986 *:*
FDResPub
[svchost.exe]
UDP [::]:60988 *:*
EventSystem
[svchost.exe]
UDP [::]:60990 *:*
[dashost.exe]
UDP [::1]:1900 *:*
SSDPSRV
[svchost.exe]
UDP [::1]:60982 *:*
SSDPSRV
[svchost.exe]
UDP [fe80::9534:8dce:adb6:70a7%12]:1900 *:*
SSDPSRV
[svchost.exe]
UDP [fe80::9534:8dce:adb6:70a7%12]:60981 *:*
SSDPSRV
[svchost.exe]
UDP [fe80::adce:6472:91d1:2fed%19]:546 *:*
Dhcp
[svchost.exe]
UDP [fe80::adce:6472:91d1:2fed%19]:1900 *:*
SSDPSRV
[svchost.exe]
Tommy
S3 licensed
I do /insim=29999 just after running lfs.

LFS_External throws exception with Message = "The InSim Interface was unable to connect to the remote InSim host." on initialization. No further stacktrace.

InSimDotNet throws exception with more details:

InSimDotNet.InSimException was unhandled
HResult=-2146233088
Message=Could not connect to InSim
Source=InSimDotNet
StackTrace:
w InSimDotNet.InSim.Initialize(InSimSettings settings) w c:\Users\Alex\Documents\Visual Studio 11\Projects\InSimDotNet\InSimDotNet\InSim.cs:wiersz 195
w LfsHelper.Controller.LfsConnection.get_InSim() w D:\Projekty_firmowe\LfsHelper\Controller\LfsConnection.cs:wiersz 56
w LfsHelper.MainWindow.Window_Loaded(Object sender, RoutedEventArgs e) w D:\Projekty_firmowe\LfsHelper\MainWindow.xaml.cs:wiersz 41
w System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
w System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
w System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
w System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
w System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
w System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
w MS.Internal.LoadedOrUnloadedOperation.DoWork()
w System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
w System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
w System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
w System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
w System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget)
w System.Windows.Interop.HwndTarget.OnResize()
w System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
w System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
w MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
w MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
w System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
w MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
w System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
w MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
InnerException: System.Net.Sockets.SocketException
HResult=-2147467259
Message=Nie można nawiązać połączenia, ponieważ komputer docelowy aktywnie go odmawia 127.0.0.1:29999
Source=System
ErrorCode=10061
NativeErrorCode=10061
StackTrace:
w System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port)
w System.Net.Sockets.Socket.Connect(String host, Int32 port)
w InSimDotNet.TcpSocket.Connect(String host, Int32 port) w c:\Users\Alex\Documents\Visual Studio 11\Projects\InSimDotNet\InSimDotNet\TcpSocket.cs:wiersz 99
w InSimDotNet.InSim.Initialize(InSimSettings settings) w c:\Users\Alex\Documents\Visual Studio 11\Projects\InSimDotNet\InSimDotNet\InSim.cs:wiersz 174
InnerException:


the "Nie można nawiązać połączenia, ponieważ komputer docelowy aktywnie go odmawia 127.0.0.1:29999" means "Cannot connect because the target machine actively refuses it 127.0.0.1:29999" so there is something blocking it still
Win8 + local InSim connection
Tommy
S3 licensed
Hi there,

Since getting new machine with Win8 I am struggling with connecting LFS to my new (and old) programs that used the .Net InSim library. The LFS/insim configuration is 99% not the issue - exact same config worked on my previous XP machine (xp was 32bit, w8 is 64b now).

In the new project I have downloaded the latest InSimDotNet nuget package (great work btw ) but still no luck. What I have tried is (in every configuration): enabling every Win8 firewall port related to both programs, running winXP mode and running as admin.

Did any one of you had similar problem and solved it? any help/hint/tip will be very appreciated.

To hype things up: I am working (well trying to...) on a new project called LFSHelper (http://sourceforge.net/projects/lfshelper/) which will in general group every idea I had that might enhance LFS experience using every possible input/output method available without hacking(input: insim, outsim, outgauge. output: controller proxy, keyboard). The project is open source
Tommy
S3 licensed
Hm, your optimisation does not take acceleration/braking into account and the race direction as I can see - it tries to make it as smooth as possible while for example "late apexing" comes from the fact that cars can brake smoother and faster as comparing to acceleration.

You might try this optimisation (probably the best paper on this subject and most promising universal solution so far): http://game.itu.dk/cig2010/pro ... /papers/cig10_048_083.pdf

I wanted to use it in my AI project for LFS but I already run out of time for that
Tommy
S3 licensed
even with basic programming skill it is very easy to do with .net + vJoy ("new" easy to use ppjoy)
Tommy
S3 licensed
It is not worth it it's just a sample app showing traffic simulation and first is an example of "follow the line" algorithm.

They do not work with LFS in any way
Tommy
S3 licensed
I have finally made it
hacking LFS directly proved to be quite hard - lots of values floating around guarding each other (you can set 300% throttle for example == 300% power and strange engine noise :razz

so I have made a controller proxy that had a simple role: when acc < 50% emulate 100% acc and keep 3k rpm using only ignition (on/off). You can do this manually using controller but its hard to feel the effect because of the focus on keeping the revs in range (and boost as a result). Then I have added clutch control when revs dropped down to much (you can easily forget about the 3k rpm idle) + another axis mapping so that I could brake and accelerate at the same time (usefull in fwd racing)

its not perfect: you lack the "engine brake" feel because it is not analog anymore and when press acc more then 50%, the acceleration transition is very sudden, just like a clutch-kick. I would need to implement a analog->digital converter that would simulate quasi-analog ignition state (just rapidly turning it on and off with different wait times) but since it was just a test to prove the idea and test a (probably) future feature in lfs - ALS, I stopped here.

I'm not posting the program because it is hard-coded for my pad (axis configuration), but a replay instead to discuss the effect.

My impression: I thought that the effect would be better. The replay that I have attached is most probably the best situation for ALS to show its power: slow and windy track with high-boost cars - you can compare last corner exit on 1st lap vs 2nd, as well as first corner exit (XRR beating FZR on corner exit!).
Only car that was behaving nicely with ALS in TBO class was RB4 (especially on rally track) - it accelerated great out of slow turns. XRT and FXO had problems on corner exits since it did lose grip a lot due to sudden power spike.

Anyway, let's hope that ALS will be implemented in LFS because it is fun and can change car balance a bit
Tommy
S3 licensed
Purpose of ALS is to keep turbo spinning to keep as high pressure in inlet as possible while not generating power to wheels, so when power is needed the turbo does not need to spool once again (aka. turbo lag). Audible and visual effect is just a side-effect not the main purpose.

So,
> Second vid - subaru is just an example of unburned fuel exploding in hot exhaust - my nissan did the same, probably only the AFR is low.
> First video its hard to tell exactly but it is very close, could be just launch control keeping low rev limiter while driver holds throttle open. Question is if bangs and flames between gear changes are effects of ALS or just rich mixture of air and fuel burning in exhaust (as in second vid).

A real ALS can be found in WRC rally cars -> http://www.youtube.com/watch?f ... e&v=7zYZ_zItA1Y#t=38s
Tommy
S3 licensed
Nope, power is coming from wheels and car is slowing down. When it stops there is nothing left to power engine to pump air into turbo.
I know what is your point, the answer is that the whole "raised pressure" area is a closed system and produces more and more friction to keep high pressure - no excessive energy comes out. If you keep feeding energy to wheels though, at some point turbo will "leak" the excessive pressure to the exhaust and it won't raise infinitely in the inlet. So basically you turn cars kinetic energy to friction.

I'm not an expert in physics - I do know that it just works (usefull thing to learn here is that when your brakes fade, turn off your engine and push maximum throttle - engine will compress air and generate more friction which will stop the car)

I would also like to know more about this so it is a nice topic for offtopic/general racing talk - let us talk there and keep the topic here which is ALS for LFS
Tommy
S3 licensed
Engine turns into a pump that pumps air from inlet at the cost of power coming from wheels
Tommy
S3 licensed
Actually, I was thinking about this from some time - it is possible in LFS and can be recognized as a cheat, but it is legal:
notice that when you turn off the ignition and press accelerator RPM's drop but the turbo pressure raises/stays at max (same as in reality).

so: make a simple "man in the middle" script to forward controls to LFS that would turn off ignition and press 100% accelerator below some set accelerator value coming from controller and would turn on ignition back on and forward the accelerator/throttle axis value normally.

Problem is that making a controller proxy is quite hard (I have only heard about SimpleJoy for C) but obviously the creator of launch control was able to change LFS values directly to do this (the same as ESP for cars that don't have it/before native ESP for LFS).

So yes, it is possible and it could enhance high-turbo cars (XRR FXR) greatly. Funny thing is that the "feel" would be exactly the same as in a real ALS system - no sound though (could be added from the controlling program).

I will do it as soon as I have some free time (no luck for few months now)
Tommy
S3 licensed
The Best transmission settings I have ever seen were in... first Gran Turismo for PS1. I was always wondering why did next series removed it...

It was easily readable, and you could get a lot of usefull information out of it - like how much rpm will drop after every gear change to determine power on wheels, etc. - maybe it was a bit to technical? Anyway THIS kind of gear ratio visualization would help a lot!

Tommy
S3 licensed
Lately I have a dozen of small ideas every day but lack of time just kills it so I know how you feel

anyway I still have high hopes for your project since it's faaar more sophisticated and would love to see it working in alpha stage
Tommy
S3 licensed
Just to show that such app can be usable:
My version of AI controlled player car http://www.youtube.com/watch?v=FpAZun0bb5A
FGED GREDG RDFGDR GSFDG