The online racing simulator
Searching in All forums
(211 results)
w126
S3 licensed
Quote from nikopdr :does this help?

It's probably not that. The question was about contact points, that is how the game checks if a given wheel touches the road or other objects, and at which point(s). There are probably only 2 contact points per wheel.
https://youtu.be/A3Ue0w6b33A?t=70
w126
S3 licensed
RAF format is probably better for this. It has 100 steps per second, suspension travel, wheel rotation speeds, steering angle etc.
w126
S3 licensed
Quote from Big Daddy :Well, I would say no. This kind of shadow is actually also visible in real life. You will notice it when sun sets in the evening or sun rises in the morning. The shadows are sharp then. During the day, the light scatters in the sky and produces the shadows we are mostly used of: Indirect shadows.

Yes, I know there are both direct and indirect (ambient) shadows on the screenshot that I posted. What I meant is that the shape of the indirect shadow is strange, like there were holes in it around the wheels. The parts that may be considered indirect shadows from only the wheels (?) are too narrow and on the outside. BTW, the shapes of indirect shadows are probably not changed from the current public version.
w126
S3 licensed
I know it's not a test patch thread yet Wink , but don't you think these shadows below and around the wheels look strange?
w126
S3 licensed
It seems on https://www.lfs.net/screenshots there are a few new images from Blackwood that were not shown in the report.
w126
S3 licensed
Car shadows are not affected by atmospheric fog. They look a bit strange from a large distance, but I don't know if it's a bug or is as intended for this patch. The quote below might suggest the latter.
Quote from Scawen :Ambient (non-direct) shadow darkness now depends on distance

w126
S3 licensed
Quote from pantiainen :Is there an option that in TVDirector you could have the names on top of the cars while using the software?

Probably not, because it switches LFS into Shift-F mode.
I played with this program months/years ago and was able to run it now. With LFS TV Director GUI you can switch the current car by clicking on the list and then the driver name is shown at the bottom in LFS - see the screenshot.
w126
S3 licensed
Even at low engine RPM, e.g. 2000 RPM, there will be only 3 physics simulation steps (0.01 s) per one crankshaft rotation, so there is not enough "fidelity" for pulsed engine torque.
w126
S3 licensed
For suspension we have Shift-L view, but maybe you meant something more advanced showing how the forces are transferred to car body etc. I vaguely remember some plans for suspension improvements being also mentioned a long time ago in connection with the tyre model.

EDIT: I have found the posts:
https://www.lfs.net/forum/post/1454942#post1454942
https://www.lfs.net/forum/post/1316543#post1316543
Last edited by w126, .
w126
S3 licensed
Things that could help:

- ability to set deadzones inside LFS (this is not available in standard Windows drivers for xbox controllers for many/some (?) configurations),

- even stronger smoothing possible (in Misc options),

- settings for speed-sensitive steering (it seems it is part of what Forza does with controllers),

- maybe some standard steering configuration specifically for xbox controller, considering this https://www.lfs.net/forum/post/1906322#post1906322 .
w126
S3 licensed
Quote from Bmxtwins :I only see one ever used in LFS

The one of Italian origin, racing related? Big grin
https://en.wikipedia.org/wiki/Autodromo_Nazionale_Monza#/media/File:Monza_track_map.svg
w126
S3 licensed
I haven't tried it but maybe it's not so bad at least for someone who likes watching replays from trackside cameras.
https://youtu.be/bLCZ1qo58S0?t=5m5s

Regarding the replays, it seems like Codemasters are more proud of showing side windows, mudguards and trees then their car dynamics. Wink
w126
S3 licensed
Quote from nacim :Autocross layout editor is not a track editor, grass squares and dirt slabs are not needed.

Don't break our hearts. This is a privilege of the devs. Big grin
w126
S3 licensed
Thanks a lot. Much better now. Smile
w126
S3 licensed
I am requesting them once at the beginning and it seems to work except in SPRs (I haven't checked MPRs yet).
Should I request them at other times/events?

Here is my current code (using JInSim):

public class MyInSimTest implements InSimListener {

static String hostname;
static int port;
static String adminPassword;

SimpleClient client;

private String track;
private String layout;
private String camera;
private short flags;
private float replaySpeed;
private int viewedPlayerId;
private int raceInProgress;
private Map<Integer, Car> playerCars = new HashMap<>();
private Map<Integer, Byte> playerPassengers = new HashMap<>();

public static void main(String[] args) {
new MyInSimTest(args);
}

public MyInSimTest(String[] args) {
hostname = args[0];
port = Integer.parseInt(args[1]);
if (args.length > 2) {
adminPassword = args[2];
}

client = new SimpleClient();
try {
client.connect(new TCPChannel(hostname, port), adminPassword, "MyInSimTest",
(short)(InitRequest.LOCAL | InitRequest.RECEIVE_MULTI_CAR_INFO | 512),
1000, 0);
// #define ISF_AXM_LOAD 512 // bit 9 : receive AXM when loading a layout
client.send(new TinyRequest(Tiny.SEND_STATE_INFO));
client.send(new TinyRequest(Tiny.AUTOCROSS_LAYOUT));
client.send(new TinyRequest(Tiny.ALL_PLAYERS));
} catch (IOException e) {
e.printStackTrace();
}
client.addListener(this);
}

@Override
public void packetReceived(InSimResponse response) {
if (response instanceof StateResponse) {
StateResponse stateResponse = (StateResponse) response;
String curTrack = stateResponse.getTrack().getShortname();
if (! curTrack.equals(track)) {
System.out.println("Track changed: " + track + " --> " + curTrack);
track = curTrack;
try {
client.send(new TinyRequest(Tiny.AUTOCROSS_LAYOUT));
} catch (IOException e) {
e.printStackTrace();
}
}
String curCamera = stateResponse.getCameraString();
if (! curCamera.equals(camera)) {
System.out.println("Camera changed: " + camera + " --> " + curCamera);
camera = curCamera;
}
short curFlags = stateResponse.getFlags();
if (curFlags != flags) {
Integer.toBinaryString(flags);
System.out.println(
"Flags changed: " + toFlagsString(flags) + " -->\n" +
" " + toFlagsString(curFlags));
flags = curFlags;
}
float curReplaySpeed = stateResponse.getReplaySpeed();
if (curReplaySpeed != replaySpeed) {
System.out.println("Replay speed changed: " + replaySpeed + " --> " + curReplaySpeed);
replaySpeed = curReplaySpeed;
}
int curViewedPlayerId = stateResponse.getPlayer();
if (curViewedPlayerId != viewedPlayerId) {
System.out.println("Viewed player id changed: " + viewedPlayerId + " --> " + curViewedPlayerId);
viewedPlayerId = curViewedPlayerId;
System.out.println("Current car: " + playerCars.get(viewedPlayerId));
System.out.println("Current passengers byte: " + playerPassengers.get(viewedPlayerId));
}
int curRaceInProgress = stateResponse.getRaceInProgress();
if (curRaceInProgress != raceInProgress) {
System.out.println("Race in progress changed: " + raceInProgress + " --> " + curRaceInProgress);
raceInProgress = curRaceInProgress;
}
}
if (response instanceof AutocrossLayoutResponse) {
AutocrossLayoutResponse layoutResponse = (AutocrossLayoutResponse) response;
String curLayout = layoutResponse.getName();
if (! curLayout.equals(layout)) {
System.out.println("Layout changed: " + layout + " --> " + curLayout);
layout = curLayout;
}
}
if (response instanceof NewPlayerResponse) {
NewPlayerResponse newPlayerResponse = (NewPlayerResponse) response;
int playerId = newPlayerResponse.getPlayerId();
playerCars.put(playerId, newPlayerResponse.getCar());
playerPassengers.put(playerId, (byte) newPlayerResponse.getPassengers());
System.out.println("New player: " + playerId);
}
if (response instanceof PlayerLeavingResponse) {
PlayerLeavingResponse playerLeavingResponse = (PlayerLeavingResponse) response;
int playerId = playerLeavingResponse.getPlayerId();
playerCars.remove(playerId);
playerPassengers.remove(playerId);
System.out.println("Player leaving: " + playerId);
}
}

private static String[] flagsMeaning = { "gam", "spr", "pau", "shu", "suh", "suf", "sun",
"s2d", "fre", "mul", "msu", "win", "mut", "vor", "ibv"};

public static String toFlagsString(short flags) {
StringBuilder result = new StringBuilder();
int powerOf2 = 1;
for (String meaning : flagsMeaning) {
if ((flags & powerOf2) != 0)
result.append(meaning);
else
result.append("---");
result.append(" ");
powerOf2 *= 2;
}
return result.toString();
}

}

Receiving IS_NPL/IS_PLL when playing SPR possible?
w126
S3 licensed
I'm trying to detect a car model of the currently viewed car in a single player replay. I am able to get the state changes with id of the viewed player. However, the only way of mapping this id to a car model (that I know of) is through the data received earlier in IS_NPL packets (new player joining). These packets don't seem to reflect what is happening in a SPR being played, I only get them during an actual race.
w126
S3 licensed
From LFS/docs/Commands.txt :
Quote :Local commands:
---------------
Most of these text commands replicate functions usually controlled by
pressing on-screen buttons but can be useful in other situations, for
example when controlling LFS from an external program using InSim.
...

Maybe it could be used as a workaround and also potentially lead to more efficient way of managing multiple LFS programs.
w126
S3 licensed
I have tested on Linux with Wine and an old mobile Radeon GPU using open source drivers which have poor performance. In the worst places on Westhill from the cockpit view the framerate went up by around 40 % in 0.6H5 when compared to 0.6H (in 0.6H4 it was maybe 15 % better then 0.6H). Very impressive! Thumbs up Smile
w126
S3 licensed
Here is a 0.3 s time difference from that last log:
Quote :22:21:15.675668 sched_yield() = 0
22:21:15.675693 gettimeofday({1432498875, 675702}, NULL) = 0
22:21:15.675719 select(0, NULL, NULL, NULL, {0, 4949}) = 0 (Timeout)
22:21:15.680780 clock_gettime(CLOCK_MONOTONIC_RAW, {417569, 108602728}) = 0
22:21:15.998481 futex(0x110070, FUTEX_WAIT_PRIVATE, 0, {5, 0}) = -1 EAGAIN (Resource temporarily unavailable)
22:21:15.998991 rt_sigprocmask(SIG_BLOCK, [HUP INT USR1 USR2 ALRM CHLD IO], [], 8) = 0

But this does not necessarily mean that clock_gettime system call takes that long. Could you add -T option to strace?
Quote : -T Show the time spent in system calls. This records
the time difference between the beginning and the
end of each system call.

Last edited by w126, .
w126
S3 licensed
The DLLs in ~/.wine/drive_c/windows/ are not the proper DLLs, they are just Wine placeholder DLLs. You need to download the real ones, for example, the files from http://www.dll-files.com look ok - just choose zip version.
Here are the checksums of the files that work with LFS on my Linux:
~/.wine/drive_c/LFS$ md5sum D3D*
1c9b45e87528b8bb8cfa884ea0099a85 D3DCompiler_43.dll
86e39e9161c3d930d93822f1563c280d D3DX9_43.dll

w126
S3 licensed
Maybe you copied 64-bit versions of D3D*43.dll files into LFS directory? Did you copy them from Windows? What version of Windows and which directory under Windows?
w126
S3 licensed
Quote from Gutholz :But one can use coordinates from MCI packets. First drive the route slowly and press buttons to place 'notes', then save the notes, then the notes get played back if you come near their location.

I think the difficult part is that the notes should be played before the place where they were set (for example, during recce you know the turn severity only after driving through it). In addition, how much in advance they should be played depends on how fast the car is and on specific driver preferences (RBR has earlier-later slider in the settings, AFAIR, some version of Dirt, too).
w126
S3 licensed
Seeing that the autocross system had just got new features (not just bug fixes), could we also get the slab object equivalent that has gravel texture and behaves like gravel when driven on?

Some like LFS-Trackmania, some LFS-Minecraft. Why not LFS-RBR? Big grin
w126
S3 licensed
This is great!
But... on such a large drivable terrain I could not find any gravel road section or gravel area. I'm not sure if it's a bug. Wink
w126
S3 licensed
Quote from blackbird04217 :In my first implementation of a GA each gene has a value from -1 to 1. I may later change this to be from 0 to 1, but it seems like a reasonable approach. If the application of a particular gene needs a larger range it can always be multiplied later. If there are 100 reference points along the track, then there would be 200 genes in each chromosome which the driver gets. One for steering input, one for brake/throttle input where negative is braking.

Taking this approach I will then compute the current and next reference points and interpolate their genes for the input of the car.

[...]

Any driver that falls off the track will stop moving, and fitness will remain the distance where they went off the track.

Just a few thoughts... A combination of GAs and racing seems interesting^2.

The approach you described could maybe slightly improve a prescription for already good lap around a track, but I don't think it has a chance to work from a random population. The desired steering inputs at any situation are strongly dependent on the lateral position on the track, car heading (relative to the road axis) and its current speed, not only on the reference points which you use. The "genes" should somehow express this dependence on many parameters. In this way virtual drivers evolved by the GA could be able to recover from errors. This is needed because at the beginning they will almost always be far from the perfect line and speed.

Regarding the fitness function, there should be a penalty for driving off the track, but the simulation of a single driver should not be stopped then. By stopping you are not allowing off-track virtual drivers recover and potentially shine in other places on the track.
Last edited by w126, .
FGED GREDG RDFGDR GSFDG