The online racing simulator
Searching in All forums
(372 results)
Stigpt
S2 licensed
excuse me, but...
You managed to correctly spell Bourdais, Piquet etc.. but you could'nt spell "Formula" correctly?
Stigpt
S2 licensed
hmmm... If it doesnt work out the box, Ill make it my next project
I got a pda, and 3 screens, so I cant use it on a secondary screen, BUT I CAN use it on my pda
Stigpt
S2 licensed
hmmmmm
I wonder if this would work on my Windows Mobile 6.0 PDA?

Anyone tried (I cant try right now, not at home)?
Stigpt
S2 licensed
gebikki - thats a bug with LFS.
Whenever you enable INSIM, outgauge and outsim is DISABLED.
This prevents the gearshiftindicator from being used with any insim software (relax, my pitboard, etc)
Stigpt
S2 licensed
nope, not using hibernate.

Could it be some power-saving thingy? (no use of that, either)
LFS keeps asking to unlock..
Stigpt
S2 licensed
Ok, this is not me. Its my friend (username [SNEK]), who, in an attempt to prevent an epic babelfish post, asked me to explain the problem.
He had to format his harddrive and reinstall XP Pro (SP2).
Now, sometimes when he reboots, LFS asks for an unlock. And he ran out of unlocks.

What he asks is help AND an extra unlock so he can play. (hes addicted to LFS as if its caffeine).

So.. what gives? I find this puzzling cause I installed vista over XP, didnt install lfs, just created a shortcut, and away I went... in his case, should have been a cakewalk.

Keep in mind, he did NOT delete LFS - it was in another partition, is latest version, no crazy mods, etc.

EDIT: 2 new facts:
1- BEFORE formatting, lfs was already occasionally asking for a new unlock, upon restarting the PC (not always, occasionally)
2 - He bought and installed (after formatting) a new GFX card (which should mean anything, but the more facts, the better)
Last edited by Stigpt, .
Stigpt
S2 licensed
New Version!
1.5.0.0
Changes from 1.1.0.0:
-Configurable button position: Can be on the top or the bottom of the screen.
-Added Lap and Split time display for opponents (can be turned off, defaults ON).
-Added Admin Pass auto-detection.
-Major optimizations to the code.
-Fixed several crash bugs due to joining/exiting servers, 1 car in qualifying/practice, etc. Shouldn't crash anymore, ever.
-Fixed display of gap time when time was over 60secs (used to show up 1:08 as 68s) Now displays correct time (up to 99Minutes).

Left to do for 2.0 release
More positioning options for buttons (left/right?)
Add Qualify/practice support (show timediff from leader/guy in front of you)
Saving of program settings
Showing "+1lap" in gap time when opponent is 1lap ahead.
Stigpt
S2 licensed
woah there taa
I see why you're the ANGRY angel.
I just asked for some help, so I didnt have to do the research (which I did in paralell, btw) This gave me a better picture of what to do. In the meantime, I was debugging my app, and trying to decide when and where to write/read.
As an added bonus, the next guy coming to this forum will find a little gem of knowledge on how to write to the disk
Stigpt
S2 licensed
Another question:
I COULD go research for this, but it will go faster and better if I ask
How do I open a file using c#?

This is so I can "save" my program settings, and read the settings from the file, and hopefully, read the user's admin password from cfg.txt - so it isnt necessary to ALWAYS type it

In the meantime I will try to research it
Stigpt
S2 licensed
Yet ANOTHER epic fail for J@tko!

Man, I swear he does it on purpose!
Stigpt
S2 licensed
my advice - dont get TOO obcessed with ONE corner. Fill yer car up for a race-stint and just GO.
At the end of that huge sting, you'll know the track. Try to do some hotlaps now, be more agressive, and youll see the times drop. Then back to a race-stint. Then back to more hotlapping
If if you are exiting too slow, try entering slower / braking earlier- youll find that you will be getting on the power earlier, and exit even faster.
Stigpt
S2 licensed
Quote from mc906 :yea i know
but, 1 corner of drifting in real life will probably take your tires to over 100 degrees, but LFS does not do that

And where does this little gem of wisdom come?
Dont pull numbers out yer arse, ok?

Go out there, do a 1 corner drift, measure temps, then come back.
Your whole 2 posts can be summarized like this:
"I know that tires heat up and cool down in real life, so in lfs it is obvious they do so unrealisticaly."

If arguments like these are to be even considered for discussion, I got a more insteresting one:
"Damage in LFS is waaaayyy too strong, I mean I never crashed a car, and I think the damage is too much in lfs. I crashed at 200kph and my whole front was damaged!"
Stigpt
S2 licensed
no, it was something I DIDNT add.
Nothin called the close method.
This last release has a quit button that calls the close button, then activeform.close() - and it exits correctly.
Stigpt
S2 licensed
New version up! 1.0.1.0!

Changes:
Fixed the not quitting correctly bug.
Added easy to use GUI.
Added usage instructions in the program itself.
Fixed "admin password does not match" bug.

You can now set the insim port of your choice
You can now set the admin pass of your choice.
Stigpt
S2 licensed
in an odd twist of events, in Portugal it is illegal to NOT stop the criminal.

You CAN (and get) arrested for "denying help".
Stigpt
S2 licensed
lol vain. It was c# - me first prog. (hence the odd bug and primitive form). Will keep updating it as a educational project - at college we learn mainly java with 6-month courses on other languages - but most are left for US to learn if we want (we had exactly 120mins of C - then on to do a 3000-line program with semaphores and shared memory)
So ill need this to keep learning. Eventually, Ill look at YOUR code (since I know what it is gonna do) to learn the basics of c++.
Stigpt
S2 licensed
very possible.
Though im a bit more inclined to put it at the bottom center, one on the left, the other on the right.
I can also very add the driver times - but might end up a tad too cluttered.
PitBoard!
Stigpt
S2 licensed
FINAL VERSION!
Finally, it is done with all features.
2.0.0.0
Changes from 1.5.0.0

Added several configuration options:
-Show Gap Button (for you weirdos that want a pitboard with no gap)
-Show Button Opponent Laptime.
-Show Opponent Name Button.
-Update Gap on crossing of Splits.
-Update Opponent Laptime on Crossing of Splits.

Added a way to save your options, so you dont have to re-do them all over again.
Added a auto load of options on program start.
Added a way to set the insim port from the program: it will add to your autoexec.lfs file in data\scripts the line "/insim=XXXXX", where xxxxx will be the port in the textbox. it SHOULD not do anything if the file already has that line, though. (for security).
Fixed ALL crashes. If it crashes, tell me.

Now with 80% more humor!

1.5.0.0
Changes from 1.1.0.0:
-Configurable button position: Can be on the top or the bottom of the screen.
-Added Lap and Split time display for opponents (can be turned off, defaults ON).
-Added Admin Pass auto-detection. NOTE: This only works IF and only IF you unpack the files do \LFS\ - i.e the LFS directory.
-Major optimizations to the code.
-Fixed several crash bugs due to joining/exiting servers, 1 car in qualifying/practice, etc. Shouldn't crash anymore, ever.
-Fixed display of gap time when time was over 60secs (used to show up 1:08 as 68s) Now displays correct time (up to 99Minutes).

Left to do for 2.0 release
More positioning options for buttons (left/right?)
Add Qualify/practice support (show timediff from leader/guy in front of you)
Saving of program settings
Showing "+1lap" in gap time when opponent is 1lap ahead.

Changes from 1.0.1.0:
--Added a default value for insimport.
--Minor optimizations.

What does it do
Displays on the top of your screen the gap in seconds to the car ahead, and the car behind.
Updates whenever you cross the finishline / split time line.
Obviously, the gap behind only updates when the car behind crosses the same split time

It is still kinda primitive (no way to choose the insimport, no actual interface etc.) But will get there. The core stuff already works well.

Usage:
Unpack somewhere you choose.
Open program, choose thy settings (admin pass - insimport)
Enter LFS, do /insim=whateverPortYouChose
Return to the prog, hit connect.
Profit!


Pic:
http://shiva.no.sapo.pt/ex.JPG - Outdated, new version has an extra button on the left showing the laptime/splittime of the corresponding opponent.
Program Files:
http://shiva.no.sapo.pt/Pitboard.zip

Known Bugs
Program can get shocked and awed if you switch servers and then spectate someone on the new server - sometimes up to the point of a crash. FIXED
Crashes if you use it in practice/qualify and only 1 car is on-track (i.e. when the first car exits pits... BOOM.)FIXED
Odd output if you switch your view to another car - at least for about a split or so.Cant be fixed - untill the cars pass a split, anything goes
If you are the last car, you get a gap to someone else, with an odd number. Don't be last. Apparently Fixed, SOMETIMES bugs out.

Would love some bug-reports in this thread
After race restart, the first splittime is... odd sometimes.
Last edited by Stigpt, .
Stigpt
S2 licensed
big thanxs, very informative indeed.
Java suffered from what I called "Instruction Trains" - which are instructions that due to all the megaclass.class.miniclass.method() etc. created huuuuuuuuuuuuge instruction lines. C# seems even worse on the other hand, you can do sooo much in one line

Now - a bit more help.
In using the lfs external example as a "framework" for my project, the program doesnt exit correctly. Window closes, but the process remains running in the background - though the tcp connection IS closed.
What is wrong?

The only code I got with any mention of closing is this:

private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
InSim.Close();
}

Stigpt
S2 licensed
very possible and easy - just use mci to see what is tha car in last whenever a LAP is sent. The spectate that car. Dunno if you can do that via insim, but i guess you can. Good n easy mod - you try to code it - its a good starting point!
Stigpt
S2 licensed
big thanxs, it does work - but I dont quite understand why.

I guess this line in the documentation-
"Info car info for each player, 1 to 8 of these (NumC)"

Made me think the wrong way.
I though that EACH MCI packet had an array of 8 CompCar structs - meaning each MCI had the info from 8 cars.
And indeed, cycling from 0 to compcar length only cycled from 0 to 7.
numC is the amount of compCar strucs in the MCI packet, and I guess it CAN be greater than 8 - its the actual number of cars in the track, meaning each MCI has the full grid stored in the Info array.

big thanxs.

(and you didnt sound rude at all - you should hear me straightening out freshmen code )

As I said, Im not familiar with C# syntax, or the lib's API - so I Am stumbling along, drunkenly. Which is a lot of fun, btw.
I can now do the full grid, and display it in neat buttons. (though for the project I do not want to display it, just need it
One thing I dunno (yet) is: what is the special character for a newline (so I put a button with 2 lines of text - in java its \n)
And how to color the text in the button/put a special character there. Im guessing its some codes inserted into the string, but I dunno which.

EDIT: Found out what was wrong (and I write here so you all can laugh at my idiocy, and hopefully dont make the same mistake)
I didnt notice the settings had already made the MCI packets sending every 500ms automatic.
Then, the way I had coded it, my big position update method was only using the LAST MCI packet to be received. (the myMCI var)
And since right before I started updating it, I explicitly asked for a new MCI packet, the game would send me ONE packet, not the 2-3 that it would need to show all the cars in the grid. That ONE packet was always the first packet in the list of 2-3, so it was always the same one, so Only the same 8 cars got processed. So removing that request_MCIpacket line would make it work.
Now that I understand the why, Im using the (MUCH better) code by mcgas001.

And for the record I understand now that MCI packets have 8 cars. if more cars are on-track, it sends more packets in sucession.
So its important to make a general method to process the packets - one that just puts the data where the method finds out it should go, not where the programmer guesses it problably is gonna go(which was my mistake) - which in turn is good programming practice anyways
Last edited by Stigpt, .
Stigpt
S2 licensed
I'd propose that we answer ANYONE demanding "I wantz an insimz!!111!!!ELEVEN!"
with
" http://www.lfs.net/file_s2.php?id=80 there ya go. the insim is in ther."
FGED GREDG RDFGDR GSFDG