The online racing simulator
Searching in All forums
(190 results)
yankman
S2 licensed
Well of course measuring the track length with the nodes of the track is not really exact.
It is always in the middle of the track and should be quite inaccurate in tight bends.
On the other hand it is good to use it as some kind of standard cause it is defined through lfs itself and not some AI/WR racingline which might be changing in time.

But if it should be more accurate the direction vector between nodes i - 1 , i - 2 and i, i +1 could be calculated in. To get some kind of bezier curve between the nodes i and i - 1.
yankman
S2 licensed
I once wrote a java program to calculate track length with the pth files.

output for KY1 is
Number of Nodes: 250
FinishLine: 30
Track length: 2980m


import java.io.*;
import java.nio.ByteBuffer;

public class LFSTrackLength {
/*
1) X,Y,Z int : 32-bit fixed point world coordinates (1 metre = 65536)

X and Y are ground coordinates, Z is up.

2) float : 32 bit floating point number


FILE DESCRIPTION :
==================

num unit offset description
--- ---- ------ -----------

HEADER BLOCK :

6 char 0 LFSPTH : do not read file if no match
1 byte 6 version : 0 - do not read file if > 0
1 byte 7 revision : 0 - do not read file if > 0
1 int 8 num nodes : number
1 int 12 finish line : number
......NODE BLOCKS


NODE BLOCK :

1 int 0 centre X : fp
1 int 4 centre Y : fp
1 int 8 centre Z : fp
1 float 12 dir X : float
1 float 16 dir Y : float
1 float 20 dir Z : float
1 float 24 limit left : outer limit
1 float 28 limit right : outer limit
1 float 32 drive left : road limit
1 float 36 drive right : road limit
*/

/**
* @param args
*/
public static void main(String[] args) {
FileInputStream pth = null;
final int NodeLength = 40;
double length = 0;
byte[] buf = new byte[4000];
if(args.length < 1) {
System.out.println("Usage: java LFSTrackLength trackfile.pth");
System.exit(1);
}
try {
pth = new FileInputStream(args[0]);
} catch (IOException ioE) {
System.out.println( ioE );
System.exit(1);
}

if(pth == null) {
System.out.println( "Error gettin access to the file !");
System.exit(1);
}

// read header
try {
pth.read(buf,0,16);
} catch( IOException ioE ) {
System.out.println( ioE );
try {
pth.close();
} catch (IOException ioE2) {}
System.exit(1);
}
// check file description
if(!new String(buf,0,6).equals("LFSPTH") ||
buf[6] != 0 || buf[7] !=0) {
System.out.println("Wrong file type !");
try {
pth.close();
} catch (IOException ioE2) {}
System.exit(1);
}

ByteBuffer wrapper = ByteBuffer.wrap(buf);
wrapper.order(java.nio.ByteOrder.LITTLE_ENDIAN);
int NumNodes = wrapper.getInt(8);
System.out.println("Number of Nodes: " + NumNodes);
System.out.println("FinishLine: " + wrapper.getInt(12));
int NodesLeft = NumNodes;
int NodesRead = 0;
int[] StartPoint = null;
int[] LastPoint = null;
while(NodesLeft > 0) {
int NodesToRead = 0;
if(NodesLeft > 100) // read full buffer
NodesToRead = 100;
else
NodesToRead = NodesLeft;

try {
int BytesRead = pth.read(buf,0,NodesToRead * NodeLength);
NodesRead = BytesRead/40;
} catch( IOException ioE ) {
System.out.println( ioE );
try {
pth.close();
} catch (IOException ioE2) {}
System.exit(1);
}
for(int i = 0; i < NodesRead; i++) {
int offset = i * NodeLength;
int x = wrapper.getInt(offset);
int y = wrapper.getInt(offset + 4);
int z = wrapper.getInt(offset + 8);
// first point on path
if(StartPoint == null) {
StartPoint = new int[3];
StartPoint[0] = x;
StartPoint[1] = y;
StartPoint[2] = z;
LastPoint = new int[3];
} else { // measure distance between points
length += Math.sqrt(Math.pow(LastPoint[0] - x,2) + Math.pow(LastPoint[1] - y,2) + Math.pow(LastPoint[2] -z,2));

}
LastPoint[0] = x;
LastPoint[1] = y;
LastPoint[2] = z;
}
NodesLeft -= NodesRead;
}
length += Math.sqrt(Math.pow(LastPoint[0] - StartPoint[0],2) + Math.pow(LastPoint[1] - StartPoint[1],2) + Math.pow(LastPoint[2] - StartPoint[2],2));

System.out.println("Track length: " + Math.round(length/(double)65535) + "m");
}

}

QoS for LFS
yankman
S2 licensed
I am looking for a way to classify LFS network traffic.
There is an L7 pattern for LFS but it is marked poor.
Also L7 is quite slow in detecting.

So is there another way to classify LFS packets (port-range, ip, protocol) ?

This is of course most important for traffic produced while in race.
I don't care about serverlist .

Thanks in forward
yankman
S2 licensed
Quote from h3adbang3r :I can't even get the WINE installation to even START

Any output from wine ?
Do you run it with X or without ?
yankman
S2 licensed
Clearly the other guys fault.
With some experience he should have known that the XRR is much slower than the FZR, so it is very likely to get passed when starting
with XRR.
Brakeing at the start is not really option, u would cause a crash yourself.
It is only the last chance to avoid a crash.
I wonder how the "oval experts" here can advice such a behavior.
Maybe lifting the throttle was an option, but when scania moved to the inside there was enough room to pass.
Last edited by yankman, .
yankman
S2 licensed
I guess the point is that the car thats been chased gets also faster,
while the car behind it is very close.
You can see this in Nascar races where 2 cars alone can escape the field without passing each other.

But I think the effect will only be seen at very high speeds with cars
the have a lot of air resistance.
yankman
S2 licensed
Quote from niall09 :But will all the cars behind it not crash into it or into eachother?

Well with current state of insim it is not hard to ensure ppl are not exceeding a certain speed limit or overtaking each other.
In case of crashes it is more difficult to maintain the order of cars or even give out penalties.
I have to look in this when serious testing starts.
yankman
S2 licensed
Quote from blackbird04217 :Not flaming or anything I just want to know how the AI behaves like a pace car in the first place? They will want to keep going around the track...

Well I will handle all these things via InSim.
Pacecar is automatically placed in front and leave the race before green flag is given.
The speed will be limited by the set.
Allow AI cars on dedicated hosts
yankman
S2 licensed
I am trying to setup a Pacecar using the actual AI.
However to run a AI u need to be a real player. A dedicated host itself
can't run an AI.
But for a pacecar it would be nice to have it run directly on host rather then client side.
As well as there are probs with selecting different cars/sets/colours for the AI when the player itself is already in the race.
yankman
S2 licensed
I don't know if it is really is a bug, but I think there is need for a workarround.

An AI car was pushed away while pitting and hit the brakes even when leaving the pits. Have a look at R2-D2 in lap 5.
yankman
S2 licensed
Quote from Shotglass :no wonder if you take away all the downforce
his point is still true you can get away with a lot more setup mistakes on the oval then anywhere else and what really matters in terms of performance is weight power and downforce
so you could either makes those nigh on identical thereby turning 3 distinc cars into one or do some silly extreme balancing which wont work anywhere else but the oval

Still not the truth.
Even with adjusted wings there is a big difference in sets and therefore in laptimes, of course the differences in times are much smaller then on circuit tracks.
But the laptimes are smaller too.

Anyway I understood the sense of this thread in posting experience with the new balancing system rather than blaming drivers for whatever they like.

Keeping this in mind, I hope the devs got the information I wanted to give.
I will not argument on the "noobness" of the oval again.
Think whatever u like of it.
yankman
S2 licensed
Quote from Jakg :Extreme as in that handling isn't that important, it's all about the top gear, power on the straights etc.

Your not right at this point.
If u setup the car with hardest possible suspension, lowest wings and lowest ride height, you will not get fast lap times on the oval.
U should give it a try.

Quote from Jakg :The cars have differences, so they will never be balanced everywhere. Catering to making them equal on the oval WOULD make them unbalanced on most proper tracks.

Yeah thats the problem, the oval is far different from the other tracks,
but why not to try to find a good compromise ?
Last edited by yankman, .
yankman
S2 licensed
Quote from tristancliffe :Why? The moderators are just players like you and me. They have no reason to 'behave' differently... Why should they?

I really hope that moderators are players. But in terms of discussion they shall "moderate", rather then starting an old topic, which caused several flame wars.
It not even belongs to this thread.
yankman
S2 licensed
Quote from tristancliffe :
The balancing is more an issue in long (over 50 lap) races, and isn't necessarily just about lap times, but about refuelling times, fuel economy, tyre heat/wear etc. Whilst the FZRs might disappear into the distance, you can hope to catch them with less pit stops or more consistency.

Totally correct, I have even driven a race with 360 Laps on the oval.
If it comes to longer races the XRR is so far clearly the car of choice.
The FZR might be faster but it is not fast enough to give the advantage of an additional pit stop.

The problem here is that the XRR could run >110 laps with R3 tires and the FZR only arround 80 (patch x10).

If u do al little math, the XRR has the pit stop advantage only if a race lasts longer then 240 laps, which is quite a long distance.

So I care more for equal speed rather then fuel consumption.
yankman
S2 licensed
Well the weight penalties that have been given with the patches before greatly helped to equal out XRR and FZR.
I thought, it was also made to have broader variety in gtr cars used on the oval.

If an oval is a proper track or not doesn't really matter.
The devs included an oval in the game, so "it does matter" in all simulation related things as much as the other tracks do.

I am about bit disappointed to get such a reply from a moderator here.
yankman
S2 licensed
Well now it looks like the FZR is ahead of XRR on the oval and FXR is still behind.
The H-Shifter only matters at the start, but XRR's have serious probs getting the power down. So no disadvantage for the FZR.
The early redline in FZR is annoying, but with 5th gear for normal driving and 6th gear for drafting it is not a problem.
Only disadvantage the FZR has is the higher fuel consumption but this only matters on longer distance races.

I still have to check for the tire consumption, but so far I can say the new balancing does not work for the oval.
yankman
S2 licensed
The /autokick spectate command seems to have changed...
before x30 it says /autokick=spectate now it is /autokick=spec.
There server won't start if it's still /autokick=spectate.

EDIT: Sorry, just seen it is already mentioned.
Last edited by yankman, .
yankman
S2 licensed
Happy birthday Scawen,
hope you enjoy the day .
yankman
S2 licensed
Quote from D34N0 :
Apache 2.55

Where can I get this version ?
yankman
S2 licensed
Point is, that windows informs your program of keypresses only , if it has the focus. In your case lfs got the focus, so your program doesn't get informed about it.

I have no idea how it works with blitz basic, but with the windows platform sdk and c++ your can insert your program into the hook chain.

SetWindowsHookEx
yankman
S2 licensed
Well I am just into that cause of the screensaver thingy.
I don't know if insim somehow informs u on that but I think not.
U could setup a keyboard hook, thats gets the keyboard input and reacts on it, or u can inject a dll in lfs process and do your own windowproc which handles the messages lfs gets.
In any case SetWindowHookEx is your friend.
yankman
S2 licensed
Well as far as I can see, there are all things u need to make a screensaver using lfs itself.
Just write a wrapper, that includes the screensaver interface windows needs (config dialog etc.). Start lfs from inside the wrapper and load the suggest replay via insim.
yankman
S2 licensed
Quote from ACCAkut :Can it in his case be a port problem?
Like WinAmp/Shoutcast and LFS are connected to their server, maybe on the same ports, LFS receiving Shoutcast data, crash

The OS should protect the ports from being used twice by different applications, no matter if u listen on a port or sending data.

But the winamp dsp plugin for shoutcast streaming does a reencoding of the audio data to keep at a defined bandwith. This will eat up some of ur cpu power.
yankman
S2 licensed
Merci.
FGED GREDG RDFGDR GSFDG