The online racing simulator
.NET library
1
(44 posts, started )
.NET library
Those coming over from the RSC programmers forum are likely already aware of this, but since this is a nice clean new board, i figured I'd just point out that there is a .NET wrapper around InSim, for those working in .NET and not wanting to have to figure out the InSim protocol.

Current version is 0.06b

Current NDoc

Release Notes

Source Release

Binary Release w/ Sample
Ah - hey, thanks for this.
As developper, I looked for the protocol and found a post on RSC forum with a link which seems dead : http://www.liveforspeed.net/fi ... php?name=LFS_S1G_DEDI.zip

Can someone tell me where I could find the protocol specification? As Linux user, a .net library doesn't please me too much, I was thinking of java or perl but I'd like to have a look to the protocol before speaking of my ideas ;-)

See ya later

Bruce
Most of the "documentation" (inline code commentry, iirc) is within Scawen's LFS Control - but unfortunately that isnt on the site at the moment. Other than that, I dont know of any more detailed information about InSim's protocol.

When I get home, I maybe able to dig out the original LFS Control zip for you.

Incidentally, you could try running this on Mono, but I dont think it'll hold up too well tbh, and there is a Python InSim library on RSC, somewhere - but its out of date.

Edit:
Perhaps if sdether or Messiah have time, they could write us up some docs for InSim - I know that I'd really like a quick reference at least

*pretty* please guys?
Quote from Bruce314 :Can someone tell me where I could find the protocol specification?

<lfs_install_dir>/docs/InSim.txt ?
:doh:
I'm caught : looking from documentation from work, I had no lfs install on my local drive (just try to find why :-p )
In fact, I could download the self-working server on a third party server (thx google) and found the file bundled inside. I've had a quick look, it seems quite easy to use... I'll make some test and let you know of my ideas later. I wish I could set a useless server on my local computer at work, but I'm not sure everyone will be pleased with that...
By the way, I think about writing an interface in java, to be able to use it on every environment and take benefit of this wonderful language... Time to go back to my IRL work...
Thx a lot to all and excuse my stupid question...

Bruce
Quote from Bruce314 :Can someone tell me where I could find the protocol specification? As Linux user, a .net library doesn't please me too much, I was thinking of java or perl but I'd like to have a look to the protocol before speaking of my ideas ;-)

As has been pointed out the full docs are in the zip file for LFS. However, may I suggest taking a look at Mono (www.mono-project.com). You may not be able to use the tester application (yet), since Windows.Forms isn't complete yet, but the rest is fine under linux.

I was a perl programmer on linux for about 8 years before I started with C#, so i wanted to make sure that I didn't tie my future career to MS with accepting a .NET position. My experience with Mono makes me believe that it's a very viable platform on unix. Novell's been doing an excellent job supporting it and a lot of smart people from various Open Source projects are working on it.

Of course, having said this, someone building a good Perl library for InSim would be quite nice as well, and a worthy addition to CPAN.

Edit: Or you could take my lib to Java (it's GPL after all). There's some esoteric stuff in there, mostly all the Sequential layout structs for loading the data, but it may be easier to take the C# and translate it to java than starting from scratch.
Hi guys,

Nice to see that you can mess with LFS 2 from a programming point of view, being a programmer myself I've been messing with a lot of other sims I played (SCGT, Nascar Heat) but this is way better.

Even better to see things developed in .NET as I am a C# freak myself

As soon as I get back from my holidays I'll look into it.

A programming sub forum in a racing sim forum! Just awesome

Cya around or on the track
thought I read somewhere something about an outSim, which can be setup from root to choose on which port it interacts (there are some configuration files, choosing the rate). First handshake udp paquet sent on inSim has a flag to choose whereas you want to start spooling these paquets. Never tried myself (hugh, I've a job and a wife IRL), but it seems to give informations for cockpit simulators (accelerations, position, speed...) Can't remember exactly - too hard to find time to read doc, write code and play a little - but you should find some info related to this in your root lfs folder and root/doc...
Have fun!
Quote from GhostVE :Just a quick question to make sure I am not missing something :

Except the CarInfo structure which provides the car's speed is there any other structure that reports while racing telemetry data - RPM, current gear and so on ? My guess is no, because I could not find anything related, in case I am wrong can you point me to the right direction ?

Did you read the "Car Position Packets" part in the InSim.txt file which is about OutSim? (leading to the end of the README.txt) perhaps that helps you
Quote from GhostVE :Maybe I did not express my question well (english is not my native language).
What I am asking is whether there is some other structure where you can pull out from OutSim information about engine RPM, currect gear, how much fuel left and so on... What I want to do is hook up a few gauges with servo motors and have my program read these values from LFS in order to drive the gauges....

You are quite correct. A lot of telemetry information is not currently available. Outsim is primarily for physics data, supporting motion simulators and the like.

What is missing (and plans are unknown) is technical data about the car's state such as current gear, rpm, tire condition, brake condition, pedal positions, steering wheel position, fuel level, etc. All data that's available to the driver, but not in a data format outside the game.

[offtopic]
I can think of two reasons why this information doesn't yet exist:

1) It would open up all sorts of new aids that could be programmed and might be considered undesirable. I doubt this is the reasons, since the existing data already opens up a lot of possibilities

2) Of all the data in LFS, this is the most volative, just looking at what all
has changed since S1 alone. I can see not wanting to define packets for this information until car features are more locked down.

I would love that data however. One application that I would try to undertake if I could access it is either create an interface to feed the data into a real Motec HUD to be used on the steering wheel for the FOX and FO8, or build a Motec replica that does the same thing.

While I'm babbling about this, I would like to see this data as a subscription based set of packets, so you could tell InSim which set of data you want to listen to (all data could be a lot of data) and what player you want to listen for. Since a large number of applications for telemetry would be client side, it would be nice to be able to just get info on the active car.
[/offtopic]
Yeah, saw the spec for OutGauge. Awesome. I hope to have a new version of the my lib out in the next week that has the packet changes for S/T/U in insim and adds OutGauge support
nice one!
maybe there is also a source of OutSim and/or OutGauge?
I created a separate DLL for OutGauge. Figured there was no reason to force dependence on the InSim DLL. Ihave not done one for OutSim. But really creating OutSim should be trivial based on OutGauge.. Basically just a matter of swapping out the data structures and accessors. I will package it up and post it tonight, dll, source and test app.
nice...
i'm currently starting with c#!
i use delphi 7 atm...
so, i'm not used to c#!

thx!
Quote from CrazyICE :nice...
i'm currently starting with c#!
i use delphi 7 atm...
so, i'm not used to c#!

thx!

Hope you'll enjoy it. I started using it a couple of years ago and being and OO bigot, have found it to be very enjoyable. My mainstay for the 5 or so years before that was perl and with the odd java in there as well. Before that was C/C++ and before that was LISP. Started in Turbo Pascal about 20 years ago, which i guess is an ancestor of Delphi.
yep...
i learned turbo pascal 7 at school, and thenm VB (also at school), then,
I made the network-admin and then started to be a programmer and therefor
with delphi!
but i like to change my job and want to start using c#...

c# is nice, but different to delphi
eehm... if possible, how do I get this code loaded correctly in VC++ ExpressEdition? I always get an empty solution... Or can I get it somehow loaded into Dev-C++?

Or doesn't it work in C++ at all and I have to learn C#?
Quote from Tanuva :eehm... if possible, how do I get this code loaded correctly in VC++ ExpressEdition? I always get an empty solution... Or can I get it somehow loaded into Dev-C++?

Or doesn't it work in C++ at all and I have to learn C#?

It's C#, so it probably won't load up in the C++ Express edition. The DLLs should be usable from C++ though.
#22 - Vain
Oh, and if I may say something personal on the topic:
Die C#, die!
Thanks for paying attention.

Vain
And why did you feel the need to such a comment? Atleast add a reason for your disliking of C#.
#24 - Vain
I dislike it for the same reason I dislike java: I don't like it.
I tried it, got to a point where I could write programs easily, and dropped it. Just like java.
Try looking at it this way: Some people like Live For Speed and nKpro. Some people like LFS and dislike nKpro. Some people like nKpro and dislike LFS. Some people don't like either. I dislike C# and java, but like Cpp.

Vain
Quote from sdether :It's C#, so it probably won't load up in the C++ Express edition. The DLLs should be usable from C++ though.

Okay, then I gonna try them.

@Adroid XP: I can imagine a reason: It's microsoft-made
1

.NET library
(44 posts, started )
FGED GREDG RDFGDR GSFDG