The online racing simulator
Searching in All forums
(69 results)
Starblue
S2 licensed
Quote from Gil07 :Congratulations to ConeDodgers for the win.

Also, our fastest lap wasn't a 1:09.07, we did much better than that before the disco, IIRC

Lap times are probably from LFS Stats which doesn't show a part of your team race.
Your fastest lap was 1:08:32, 9th overall. Set by J.Montgomery
The tracker has saved all laps (and even splits) so fastest lap times can be updated from that

Starblue
Starblue
S2 licensed
Quote from joshdifabio :Personally, I'd flag a car as a DNF if it hadn't crossed a split line in more than n minutes. This could automatically correct itself if the car resumed racing more than n minutes later.
[...]
Edit: One other point; it would be good if the tracker could be mirrored on other servers to spread the load. It's output could be made available in XML format on the host server, with a generic PHP (for example) script publicly available which would parse the XML file and creates a proper HTML output. This way, anyone could create a mirror without needing to be given direct access to any database.

Nice ideas

Quote from Lotesdelere :
It would be nice to see the number of pit stops done in a future version

It's already on the planned feature list Watching the race without pit stop info was quite exciting though...as I had no clue about who had to pit again, every time the leader stopped I was surprised.."Oh, no he has to pit and lost the lead!"

Starblue
Starblue
S2 licensed
Quote from SamH :As mentioned last night, an AJAX wrapper is a simple addition and would be great for any team not near the top of the list!

I'll have a look at it
I'm using Firefox here and when the page auto-refreshes it stays scrolled where it was, so I had no trouble following teams on the last positions
Temporary workaround for people using the tracker with other "non-scroll-friendly" browsers: reduce zoom / text size in the settings (e.g. View->Text Size->Smallest in Internet Explorer menu) so that you can see all teams without scrolling

Starblue
Starblue
S2 licensed
Thank you Brilwing

Starblue
Starblue
S2 licensed
Hi Brilwing,
I found another problem related to the try/catch in AbstractChannel: sometimes I get this exception:
15:13:58,890 ERROR - Something went wrong!
java.io.IOException: Connessione interrotta dal software del computer host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at net.sf.jinsim.TCPChannel.receive(TCPChannel.java:36)
at net.sf.jinsim.AbstractChannel.run(AbstractChannel.java:60)

The description "Connessione interrotta dal software del computer host" (which means "connection interrupted by computer host software") makes me think that this a particular implementation of an event similar to the ClosedChannelException, for which you had already provided a try/catch:
try {
numberRead = receive(sizeBuffer);
} catch (ClosedChannelException ex) {
// do nothing chase numberRead is already -1
}

Unfortunately, this time it's an IOException so it does not get caught into the ClosedChannelException catch and it goes on to be catched by the generic try/catch you've put at the end of the loop:
while (running) {
try {
[...]
} catch (Exception e) {
log.error("Something went wrong!", e);
}
}

As there is no action in the catch to solve the problem, the thread keeps looping and logging the same error, eventually filling up all the space available on the disk and crashing the program...
(I think this explains my previous problem where I had not enabled logging on disk, so it filled up memory instead of disk space).
I'm going to put a return statement in the generic Exception catch, so that if something "unexpected" happens, the thread stops working (since it is not supposed to be able to "fix" an unexpected event anyway).

Starblue
Starblue
S2 licensed
Nice idea, I'll join

For entering on your own:

LFS Username: Starblue
Race Name: Starblue
Number: 36
Starblue
S2 licensed
Hi Brilwing,
I've found a problem with the MessageResponse class.
I wanted to check what users said so I used getTextStart() to make a substring of the getMessage() and filter their name to get only the actual text they typed.
However, it didn't work for people with "^" in their name.. that's because LFS encodes it with "^^" and getMessage() returns it to just "^"..
So basically the number of characters in getMessage() is not the original one and so the position returned by getTextStart() becomes wrong.
I changed my local copy of MessageResponse constructor like this:

public void construct(ByteBuffer buffer) throws BufferUnderflowException {
super.construct(buffer);
buffer.position(buffer.position()+1);
connectionId = buffer.get();
playerId = buffer.get();
typedByUser = buffer.get();
textStart = buffer.get();
message = getString(buffer, 128);

// Starblue 04/01/2008
// Rewind the buffer and check how long the "pre-message" part really is:
int pos = buffer.position();
buffer.position(pos-128);

String preMessage = getString(buffer,textStart);
textStart = (byte)(preMessage.length()+1);

buffer.position(pos);
}

After this change, it became safe to get the typed message like this:
String typedMessage = response.getMessage().substring(response.getTextStart());

Starblue
Starblue
S2 licensed
Hi BlackBird
Sign up!
Playername: Kila Starblue
Username: Starblue

Starblue
Starblue
S2 licensed
Quote from Brilwing :
So here we go: http://liveforspeed.at/download/jinsim-0.5.rc2.zip

Thanks for the update
I'm currently using 0.5.rc2 for a project and I noticed the following behaviour, while connecting with the SimpleClient class:
if an unchecked exception is thrown in the registered listener, the jvm will start increasing its memory without limits, until.... I had to terminate it because my pc was freezing
That happened me twice, once for a mistaken object cast and once because I received a string of unexpected size and went out of bound doing a substring
If I had enabled logging, I guess I would have seen the "Something went wrong!" message of AbstractChannel.java line 122, as I think the exception got caught there.
As it's not nice to have an application crash everything by stealing all the available memory, you may want to change that behaviour..
Maybe you could have a dedicated try/catch around the notify action, like this:
try {
client.notifyListeners(packetData);
}
catch (Exception e) {
log.error("Something went wrong!", e);
}

This way the custom listeners can be wrong and throw whatever they like but it won't crash the whole InSim connection & program.
It's probably not the best way to handle the situation, but I think it may be worth to change it.

Starblue
Last edited by Starblue, .
Starblue
S2 licensed
Quote from Brilwing :new version: http://liveforspeed.at/download/jinsim-0.5rc1.zip

Changes:
* Renamed packages from org.kerf to net.sf
* Fixed camera packet (thx. Starblue)
* UDP communication works now again
* OutGauge and OutSim also works again
* Fixed the not working examples, and all should work now fine.

All I wanted in version 0.5 is now included so this is the first release candidate.

Hi Brilwing,
I get a "page not found" on that link
Two more things I fixed on my local version of 0.4.99:
SetCarCameraRequest: uniqueId and cameraType were inverted, the correct order is:
data.put(uniqueId);
data.put(cameraType);
NodeLap: the Position byte (after PlayerId byte) was not implemented. I added the getter/setter for position and setPosition(buffer.get()); after setPlayerId(buffer.get()); in the constuctor.

Starblue
Starblue
S2 licensed
Quote from Brilwing :I updated jinsim with the minor X30 changes:
http://liveforspeed.at/download/jinsim-0.4.99.zip

Also changed:
* InSim relay support is now included + example program
* Fixes at the comp car and MCI requests
* Fixes a the set camera request
* Added a Track enum so that track codes like 100 or BL1 can be converted in an enum value and then to the real trackname.

I have tested this version only with a X30 Dedi, but it should also work with X10.

Thnx for the update Brilwing!
There's a little mistake in SetCarCameraRequest, line 55:
super(PacketType.CAMERA_POSITION, 8);

it should be:
super(PacketType.SET_CAR_CAMERA, 8);

Thanks again for all your work

Starblue
Starblue
S2 licensed
Quote from franky500 :
[...] it does not display on the graph the users who are on the server, but spectating.. (eg if there are 15 users in the server, and 4 of them are spectating, then the graph will only display 11)

Are you sure this is exactly its behaviour? I opened an host[port].txt and didn't find a way to tell if someone is spectating or not...so it would be surprising if this program would be able to do so by parsing that file
I'm not a C/C++ expert but the reading/parsing of host[port].txt seemed ok.. you might want to put in some debug lines to print intermediate results and see what's going wrong.
Checking .log files would be handy too, so that you can check which drivers are missing.
If the .log files are ok, then you can focus on checking the draw image part
Starblue
S2 licensed
Quote from Scawen :Thank you very much for your stories, comments and test results!

I think you will find the new X36 an improved version. Clutch heating is back to X33 levels but six of the cars have a stronger clutch. The stronger clutch was worked out purely by engine inertia. So clutch strength is now the larger value of that required for engine torque, and that required to deal with the engine rotational inertia.

I loaded all the cars and found that these ones were changed : UF1 / XFG / XRG / LX4 / LX6 / FZ5

I did again the "High Gear Start Clutch Burnout Test" with X36 and here's the results:


Steps for the test:
1) Wait for the green lights to start the race
2) Shift-up to the highest gear without touching throttle (using autoclutch)
3) Floor down the throttle
4) Drive around the oval keeping max throttle until the clutch burns out or until it becomes stable orange

Tested all cars except MRT.

Notes:
1) All cars except UF1 and RAC reach "red heat" during the test.
2) Excluding single seaters, only UFR, XFR and FZR manage to completely burn their clutch during the test. It looks like GTR cars haven't got a clutch strong enough for this test. FXR and XRR probably save themselves as the turbo cannot give full power at low rpms and so they have a "softer" start.
3) I noticed a bug with FZ5: during the slow start the clutch "fluctuated" (instead of reducing gradually) and at the same time the throttle "flickered". While I think the clutch can behave "as it wishes" being an autoclutch, I was keeping my throttle pedal floored all the time, so I don't think the throttle power should have flickered.
I tried the FZ5 start many times and it always produced this behaviour (and it was the only car which did it).
4) Among single seaters, FOX was the only one which didn't burn its clutch.
5) BF1 was the only car which took several laps to completely burn its clutch: the clutch of all the other cars, when reaching a certain "temperature threshold" (about half the bar) would "give up" and you would see the rpms suddenly burst high as the engine is "set free" by the transmission and clutch burns out rapidily. The BF1 instead kept a balance between "slipping/transmitting the power" even at high temperatures and the clutch only slowly overheated to the full bar.

Replay of the FZ5 bug attached
Starblue
S2 licensed
Quote from Scawen :Please try to answer the question I've asked. [...] I need to know which cars (if any) suffer more clutch overheating than others, on road or rallycross tracks, so I can hopefully start to see a pattern.

I've tried a "burn clutch" test on different cars, I hope it can help you in seeing a pattern.

The tests were done on Kyoto Oval with these steps
1) Wait for the green lights to start the race
2) Shift-up to the highest gear without touching throttle (using autoclutch)
3) Floor down the throttle
4) Drive around the oval keeping max throttle until the clutch burns out or until it becomes stable orange
5) Watch the replays and note down how many seconds it takes to make the clutch red / how many seconds it takes to completely burn the clutch.

It is obviously an "unrealistic" test since no-one would start the car in highest gear but I hope it helps in showing the differences between the cars.
Results:
Note 1: all cars were using their "default/hard track" setup
Note 2: some cars reached "red" temperature and then cooled down
Note 3: I did 2 tests on XFR, one with 5th gear, one with 6th


Cars which fully burnt the clutch: XFG, UFR, XFR, XRG, FBM
Cars where clutch became red but didn't burn out: FXO, LX4, LX6, FZR
Cars which run fine: UF1, RB4, XRT, XRR
Untested cars: RAC, FZ5, FXR, MRT, FOX, FO8, BF1
Last edited by Starblue, .
Starblue
S2 licensed
Starting a new host doesn't give the option to enable BF1
Starblue
S2 licensed
Quote from Storm_Cloud :I hope everyone can recognise all the work you are putting in and will repay this commitment by turning up for as many races as they possibly can.

I'll do

I really look forward to the trial event, I think it will be important to see "in practice" how it will work out with the rules and the different types of cars on the track.
Actually I hope that there will be occasions to have mixed FOX/FO8 practice on Gentlefoot's server even before the official trial event
Starblue
S2 licensed
Add a FOX for me
Little bug in Qualification stats
Starblue
S2 licensed
I've downloaded the latest attached version and I've noticed a little bug in the qualification stats: in the "Best possible lap" section, the WR gap is calculated not between the WR and the Best Possible Lap, but between the WR and the best qualification lap.

Example:
http://content.faculty.de/lfs/piostats/owrl/f1a/f1ar1q.html

HuskyGoalie best lap is 1:16.47, WR +0.64
His best possible lap is 1:16.44 and WR is still +0.64, but it should be +0.61

Anyway, thanks for this wonderful program, it's very useful
FGED GREDG RDFGDR GSFDG