The online racing simulator
Searching in All forums
(235 results)
yankman
S2 licensed
Well a much easier way than fiddeling with a pic is using a standard usb controller chip. It provides all you need.
I startet building my own gauge some time ago.
I used IOWarrior 24 as base and connected almost straight 16 led to the outputs. Description is here : http://www.code-mercenaries.com/




The chip comes with a small dll, and function description so it is fairly easy to programm.
Next step for me would to attach 8x8 matrix to it and attach 64 leds to it.
Sadely I didn't found suitable leds driver chips so far.

Here is a small movie showing the prototype in action.
http://www.brunsware.de/yankman/USB_GAUGE.wmv
Last edited by yankman, .
yankman
S2 licensed
Does that mean server located in germany have a bad ping in general ?
How much do you know about networking ?

Edit. bad typo
Last edited by yankman, .
yankman
S2 licensed
Quote from Dygear :
SELECT *, UNIX_TIMESTAMP(`date`) AS `epoch` FROM `table`;

To something like this ...
SELECT `id`, `title`, UNIX_TIMESPAMP(`date`) AS `date` FROM `table`;


I think there is a problem putting date in `` if there is date column.
Try it this way:
SELECT `id`, `title`, UNIX_TIMESTPAMP(`date`) AS 'date' FROM `table`;

But be warned UNIX_TIMESTAMP computes the timestamp according to ur timezone.
So check the result before using it, maybe u need to do a little correction.
Last edited by yankman, .
yankman
S2 licensed
Quote from Dygear :What is the best way to handle time, in particular the unix epoch, in a MySQL table? I would think a full int (11), but what's the best way to make it the human readable in PHPMyAdmin. Basically, I just don't like looking at the date in it's raw seconds from in PHPMyAdmin. Any idea how to chance that?

Save it as DateTime rather than int(11) using FROM_UNIXTIME(timstamp).
It is drawn YYYY-MM-DD HH:mm:ss .
If u need a timestamp out of mysql use UNIX_TIMESTAMP(`datetime_column`).
Last edited by yankman, .
yankman
S2 licensed
Of cause u need to run the host and insim on different ports for each host.
yankman
S2 licensed
But there must be an error in your code.
I know it works. I can prove it.
yankman
S2 licensed
Quote from GeForz :Does REO work on singleplayer games?

No idea.
Quote from GeForz : And by "final vote" do you mean the small_vta or the VTN with connid=0?

I used the c# insimlib for this.
I act on vta with connection id 0 which i just realize is always 0 .
Anyhow it does it like that:

private void handler_Vote(InSimHandler sender, VoteEventArgs e)
{
if (typeof(FullMotion.LiveForSpeed.InSim.Events.VoteAction).IsInstanceOfType(e))
{
VoteAction va = (VoteAction)e;
if (va.ConnectionId == 0 && va.Vote == Vote.Restart && !onTrack && !doAdd)
{

onTrack and doAdd are custom booleans.
yankman
S2 licensed
If the host restarts it is to late. The order is already defined at this point.
You have to act on the "final" vote for restart.
yankman
S2 licensed
I have a reordering and it does work no matter if fixed or not.

The order of commands might be important.
First I have set up event handlers for a vote, and reorder.
On vote i check the type of vote and connection id.
If vote is restart and connection id is zero I request the current order.
On reorder I check if it is requested by me, reorder the grid and send it back.

I did this to implement a pace car which always should start in front and it works.
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.
FGED GREDG RDFGDR GSFDG