The online racing simulator
Searching in All forums
(411 results)
MaKaKaZo
S2 licensed
Quote from Bawbag :Using a macro causes teh clutch to heat up less than normal autoclutch, because the macro changes gear to much faster there is less slipping of the clutch during gear changes which just means less heat.

Have you actually checked this or are you talking just out of "what the physhics should be"? Because two people who have used the macro have already told me that with the macro clutch the temp gets higher. I'm not going to test it anyway.

And now I ask again why would someone need manual clutch in a button. In what circumstances is that useful?
MaKaKaZo
S2 licensed
Quote from [DUcK] :They are also similar because the dogbox lasts longer - as does the macro clutch (it keeps the clutch cooler because the clutch spends less time engaged).

Someone said earlier in the post that the macro clutch makes the clutch heat up faster. Later someone told me that it's not a good choice for races as clutch overheating become a real problem with macro clutch.

In one post someone said that having the clutch in a button is necessary in some situations for people that don't have a clutch pedal. Can anyone explain why? I didn't get what he said, and I have never used the clutch "manually" using a button/key, and I don't see in which situations I would need it.
MaKaKaZo
S2 licensed
About the autoclutch topic. Autoclutch was introduced in LFS as a necessity. We NEED the autoclutch to change gears using most controller configurations. But remember, we are using autoclutch on manual cars. So the devs must find a good autoclutch system that won't give people using it a major advantage over the ones using a clutch pedal. It wouldn't be fair to have an autoclutch system in a manual car that works as good as a pure sequential gearbox. So Scawen tries to tweak the autoclutch so it's well balanced against manual clutching, and people who don't have a clutch pedal don't have a great advantage over the ones who do.

Then button clutch appears as a means to get better shifting times, and turning what is supposed to be a simulation of a driver pressing/releasing the clutch pedal into something more like a full sequential gearbox. So, even if you can do it because the game allows it, it's indeed totally against the spirit of the game. This is not different from making a script that performs perfect gear blips when downshifting, when it was already removed from the game.

Another thing that I'd like to know is if it gives you any advantage in terms of clutch overheating. Does this button clutch cause the clutch temperature to rise less or more than autoclutch? It would be interesting to know.

In my opinion it should be studied and solved somehow. I don't know how, maybe having a static, non-configurable button rate for the clutch button.


Now, about cheating:

Let's think -again- about LFS vs real life driving. We are playing a simulator that tries to portray reality as best as possible. To achieve that we play using several kind of controllers that don't match those used in the cars that we are driving in the game.

Many people -I'd say most of us- have wheels with only two pedals, and don't have a clutch pedal. With those settings we are driving manual cars like XFG, XRG, the TBO class, etc. In real life we would need to press the clutch pedal to shift gears, but as we don't have a clutch we use autoclutch. I think everybody thinks this is ok, as somehow we must be able to shift gears! Now, how many of you use left foot braking with these cars? I'm sure that a lot of people do. Is that cheating?

Things that some people consider cheating:
  • Using a custom view.
  • Left foot braking in manual cars.
  • Up-shifting by pressing the clutch instead of releasing the gas pedal (in cars like the MRT or the FBM).
  • Copying setup parameters available in lfsworld analyser tool.
  • Using less degrees of rotation in your wheel than the actual car.
  • Using paddles instead of a shifter (even if you don't have one, then go and buy it! That's what they say...)
  • Turning smoke/dirt option to minimum in rally races to have a better view.
  • And a long etc.
People should be a little more open minded about cheating. There are a lot of things that will give you an advantage -big or small-, but... is it really worth it? Some of these things don't deserve a single word, but things like button clutch should be discussed seriously, with arguments. There are a lot of words in this thread but very few people tried to give a reason why button clutch should or shouldn't be used.
MaKaKaZo
S2 licensed
From the reference that info must be at the beginning here:
[FONT=FIXED SYS]num unit offset description
--- ---- ------ -----------

6 char 0 LFSMPR : do not read file if no match
1 byte 6 game version : ignore
1 byte 7 game revision : ignore
1 byte 8 MPR version : ignore
1 byte 9 immediate start : joined already running game
[COLOR=Red][B]1 byte 10 reserved : -
1 byte 11 reserved : -
1 int 12 rules : -
1 int 16 flags : -[/B][/COLOR]
1 byte 20 laps byte : laps / hours (see notes)
1 byte 21 skill : skill level (0,1,2,3,4)
1 byte 22 wind : 0=off 1=weak 2=strong
1 byte 23 num players : players at start of race
8 char 24 LFS version : text, ends 0
4 char 32 short track name : e.g. BL2R
1 int 36 start time (UTC) : seconds from 00:00 1/1/1970
32 char 40 track name : text, ends 0
1 byte 72 config : 1,2,3.. (first config is 1)
1 byte 73 reversed : 0=no 1=yes
1 byte 74 weather : 0,1,2.. (first weather is 0)
1 byte 75 num finished (NF) : players in results table
1 int 76 0 : -
NF result 80 RESULT INFO : (see below)[/FONT]

In my opinion it should one of those fields. Maybe the best thing would be to generate a handful of mpr files and check those values with an hex editor.

Anyway, with practice sessions you can check the number of laps (must be 0), but I don't know if there's any reference on the content of the mpr depending on the type of the session. I think Scawen may be the only one capable of solving your doubts.
Maximum PLID and UCID values
MaKaKaZo
S2 licensed
Hi. In one of my tests I've come to need to track and understand a little PLIDs and UCIDs.

As I'm not going to have AI cars, I'll I have to do is keep a static array that links UCIDs and PLIDs. But I''d like to know what should be the size of that array, and that depends on the maximum UCID value.

Let's say I have this array:
byte PLIDS[47];

(Using C++)

I've used 47 thinking that UCIDs keep it at the minimum possible values, and considering there is a maximum of 47 slots (connections) including spectators.

I use the UCID as the index for the array, and assign to it the corresponding PLID value. But if I ever get an UCID greater than 46 that will produce a violation.
MaKaKaZo
S2 licensed
I can't get the Hello World example to compile either in command line or using Eclipse. I don't care much about command line as I wouldn't be using it, but... damn Eclipse is such a bitch! I don't know how to create a project from an existing java file. The other day I think I got it, but there were errors everywhere and I think it was because I had to link the commons logging jar file to my project, and I couldn't do it. And Eclipse tutorials are quite poor...

Could anyone post a quick guide on running the Hello World example in Eclipse? It could be very useful for beginners in Java like me to get started

EDIT: OK, I finally got it to work I found the way to create a project from existing sources (it wasn't as hidden as I thought, I was just blind), and then I added the common logging JAR, but totally forgot to add the jinsim JAR Anyway, after that Eclipse asked me to move "package net.sf.jinsim.examples.helloworld" and so I did. Then I found how to add arguments to the run call, and there I go with my "driver says: Hello World"

Gonna try the other examples next!
Last edited by MaKaKaZo, .
MaKaKaZo
S2 licensed
Thank you very much for your answer Karl

As I've spent more and more time studying the code of that example I've come to realize that it was made from several pieces of code as you say.

Your answers have clarified my mind and I hope that I can get my library to work today. Yesterday when I finished it didn't work, the select() calls returned either several timeouts or directly an error.

Only one thing that you've misunderstood in your response:

I ask about the use of "socket_file_descriptor + 1" in the recv() call, not in the select() call. I had already checked the man pages for both of them, and I already understood that for select() you must use "the max file descriptor + 1", but I haven't found anything about that for recv(). I have also checked Microsoft's Winsock2 Reference for recv(). If I get my code to work then I'll try changing it, but until then I'll keep the +1 as it works in the original example.

When I finish this stuff I'll probably release it as an example/tutorial for people to laugh at my code

EDIT: By the way, I was recommended Beej's Guide to Network Programming as an introduction to programming with sockets. I found it quite useful. Anyone knows about any other good tutorial out there?
Last edited by MaKaKaZo, .
MaKaKaZo
S2 licensed
This matter is very personal, and you can't say things like "I do it this way because it's the right way to do it". I'm totally against GPL and similar licenses as to me they are the anti-freedom licenses. Yes, the source code is available, but you are not free to use it as you like. I'm all in favour of licenses that give you freedom to do what you like with the code.

Some of you are in favour of everything being released to the community. I'm ok with that, I just don't share that opinion.

Anyway, if I ever release something to the community it will be to ask for help and improvements in the coding style, I'm quite a noob programmer and I'm not gonna make anything worth like some of the cool applications out there I know that if I ever release code I'll feel more embarrasment than anything
MaKaKaZo
S2 licensed
Another new thing I've noticed:

An IS_TINY is sent as a "version packet". There's no checking the version after this. I mean, the version request is sent but the IS_VER packet returned by insim is not processed in any way.

Another thing is that in the current insim version (4) you can request the IS_VER directly in the IS_ISI setting ReqI to non-zero, there's no need to create a whole IS_TINY for that purpose if you are just checking right after the IS_ISI is sent -which is the case-.
MaKaKaZo
S2 licensed
EDIT: The previous question was deleted because I found an answer myself, this is new

I'm going all the way through this C tutorial before looking for a sockets library in order to understand all the process and I have some thoughts:

int retval = recv(s + 1, tbuf + bread, PACKET_BUFFER_SIZE - (unsigned int)bread, 0);

Why do you use the "socket_file_descriptor + 1"? In the reference I've seen you have to use the socket file descriptor as the first parameter, so I don't know why the "+1". Can anyone explian this to me?

More stuff:

int ok = 1;
while (ok > 0)
{
int rc;
// Set the timeout period
struct timeval select_timeout;
select_timeout.tv_sec = IS_TIMEOUT;
select_timeout.tv_usec = 0;

// Setup the file descriptor watches
fd_set readfd, exceptfd;

// Clear them
FD_ZERO(&readfd);
FD_ZERO(&exceptfd);

// Set them to watch our socket for data to read and exceptions that maybe thrown
FD_SET(s, &readfd);
FD_SET(s, &exceptfd);
...
}

All this stuff at the beginning of the main loop could, and in my opinion *should* be taken out of the while. I think the FD_SETs and the timeval struct are defined once and then they keep using the same values during the while, so there's no need to keep that inside.

Another thing I've noticed is that you declare many vars inside the main loop. Those vars get declared and deleted in every iteration. I think those declarations could be made outside the while, making a reference to what they're going to be used to in a comment.

More stuff:
while ((PACKET_BUFFER_SIZE >= (tbytes - bread - (unsigned char)*p)) && ((tbytes - bread - (unsigned char)*p) >= 0) && ((unsigned char)*p > 0))

This is the main while. The condition there... I don't understand the first part:

PACKET_BUFFER_SIZE >= (tbytes - bread - (unsigned char)*p)

Taking a look at the code, "tbytes" max value can be "PACKET_BUFFER_SIZE" (unless i've missed something). So "tbytes - anything" will always be lesser or equal to PACKET_BUFFER_SIZE. In my opinion that condition is always true and therefore can be taken out. I understand the other two parts of the whole expression, but this first part I don't see any sense in it.


I'll report more things like these if I notice anything suspicious
Last edited by MaKaKaZo, .
MaKaKaZo
S2 licensed
Great, many thanks Scawen and folks

A little thing: Scawen, us who have been following patch Y through all of its test patches know about it, but I think you should point out in the first post that this patch is not compatible with hosts older than Y30, and also have a few words about the HLs that are going to be deleted from lfsworld due to changes in the physics of the updated cars.

I just wanted to point it out because people might get confused when most of their servers suddenly disappear after they install patch Z.

Great work!
MaKaKaZo
S2 licensed
BUG:
====

I already said it when Y30 was released but it hasn't been fixed: If you pause the game in hotlapping or single player mode and then go to the pits (either with "esc -> pits" or with "shift+P") the "pause" message doesn't disappear and keeps blinking while in the garage screen, even if you go to the car selection screen it's still there. It only disappears when you join the track again.
MaKaKaZo
S2 licensed
Quote from Hollywood :With most utilities for games, such as LFS, its usually better that the utilities remain OPEN and the source available so if the original author goes away someone else can pick up the reigns.

That is debatable. What many people do is release the code to the public after dropping the project in order to let anyone pick it up, but they keep it private while they are developing it actively. I don't see any problem with that. If I were to release any cool mod for LFS I would probably do it this way.

As someone said earlier in this thread libraries are a different matter, and I would release any SDK library with a MIT or similar license, but an entire application is something that you get attached to easily and possibly you don't do it for people to reuse it, but to enjoy it as you originally created it.
MaKaKaZo
S2 licensed
Ok, thanks for the answer.

So I understand that using code for building websites is something much more flexible than using code for releasing applications.

As long as people don't download your website (or the part that made use of GPL-like licensed code) you are not releasing a product, and thus you don't have to release the code. I think some licenses may have some workaround about this to prevent building websites with licensed code (libraries or snippets or whatever) with intention of making it a commercial "product" -i.e. people being charged for using its services-.

With standalone applications it's completely different as you have to release them to the public for people to download and install/use them. In those cases you have to release the source code if you used licensed code that states so.

So, if I build a website and code my own insim applications that I run in my servers (people don't have to install anything), I can use any library/program under any kind of license that allows me to use and modify the source code, without worrying about having to release my source code, because actually I'm not releasing anything at all, I'm just providing services that people use without having to install or download anything.
MaKaKaZo
S2 licensed
*big-bump*

I had been curious for a while about GPL and other licenses, and as I'm *probably* going to finally start an insim project I'd like to ask some questions that come to my mind.
  • Would it be possible to write commercial applications based on insim? I mean, even if I write all the code myself, after all I'm using insim, which is a part of LFS, which is licensed by Scavier. Could I make a commercial insim application and make money selling it to server admins without any permisson from LFS developers?
  • Something similar with websites. Let's say I build up an entire LFS related website. For this website I use PHP linking to pubstats and also insim applications. This website I run it on my own, I'm not going to 'sell' it to anyone. Do I have to release the source code used if use a GPL licensed library for either the pubstats or insim part? What about if I charge people for using my web (I'm selling a service through that web, not actually selling the web itself as an application)?
These are just things that come to my mind and that I'd like to understand about software licenses. I'm not actually thinking about doing something to make money from, but even if I just make a free of charge insim application or website maybe I won't feel like releasing the source code.
MaKaKaZo
S2 licensed
Quote from Scawen :Not a bug. That change was made some patches back. It was so you can sort of get what you ask for when you press a key. Before, it could be confusing, pressing things and nothing appearing. So now it tries to do the necessary switching off of other features that would prevent you seeing what you requested by your key press.

Related to this, in hotlapping mode, if you go into shift+U and then press shift+P to go to the garage, the car enters the garage but you remain in the track as an spectator with the message "no car on track". You hace to press shift+P again to enter the garage yourself. I guess this is not a new behaviour. Another thing is the "pause" message persisting into the garage if you press shift+P while you are on pause.
MaKaKaZo
S2 licensed
Quote from wsinda :I agree that the timelines should be improved. But IMHO they should be placed early (halfway the straight or a bit sooner), so you have some time to inspect the split time before you prepare for the next turn.

Another problem is that the reverse config uses the same timelines. For instance, on SO2 (Sprint 1) there is a timeline at the start of the flyover. That's fine, but in the reverse direction it's at the same spot (= close to the braking point). I've often missed a turn because I was still looking at the split time.

You are totally right. So right in the middle of straight sections would be a good place.

In fact I thought about this for the first time in the combo I explained in my example: RB4 at BL2R. In BL2 you have the checkpoint right after a corner, which may be allright, but in BL2R I start braking before reaching it and I started braking too late without realizing that I was missing the proper line into the corner just because that way I got a better first split.
MaKaKaZo
S2 licensed
Suggestion: Add readme/instructions file into the zip

EDIT: I spawn at the pits and can't find a way to get out. Is something going wrong or am I just plain blind to not see the exit? Maybe it's because I'm with patch Y30?

AUTO-ANSWER: I found the problem. I had it to 15 min qualifying in single player mode. When I load the external client the number of laps is automatically changed to 1 but the qualifying time remains, and when you enter the server you start from a garage. So, you have to set it to no qualifying in order to start in the right place.

EDIT2: When you pause the game the timer won't stop.

EDIT3: That was fun! A bit easy imo. I did a first run just to check the delivery spots, and in my first attempt using mouse (my wheel is packed right now) I completed it with 3 minutes left. My clutch got pretty hot though 4:06 minutes left in the third attempt (in the second I totally burnt the clutch XD)
Last edited by MaKaKaZo, .
MaKaKaZo
S2 licensed
Quote from MrPDR :I am rly upset because i just used i think my last 2 unlocks im not sure, going TO y30 and seeing 34 servers (makes it almost pointless) and going BAK to Y24 and using another unlock, just to be on other servers with my friends
Im not using it, if it was compatible, or all servers went to Y30 then yeah.

other than that see ya when patch Y100000000000000 comes out ...

This is a test patch and you should read the release notes in the first post before installing it. It says clearly that it is an incompatible patch, and that an unlock is needed. And patch Z is coming next week.
MaKaKaZo
S2 licensed
¿BUG?:
=====

In hotlapping, if you use shift+P while being on pause, the "pause" message keeps blinking in the garage screen.
Adjust some track's checkpoints
MaKaKaZo
S2 licensed
Hi, I have a suggestion that is not listed in the big suggestions thread.

I've noticed that in some tracks the checkpoints are placed too close to corners, sometimes even being in a place that is within the braking zone of that corner. This misleads to 'deceiving' split times, depending on the racing line you take and how you choose to brake and turn into that specific corner.

For example, in BL2R using the RB4 the checkpoint is right at the beginning of the braking zone of an asphalt-to-dirt corner. There are multiple valid lines for that corner, and depending on your timing hitting the brakes you'll get a split time or another. Of course, if your braking is late you'll have a better split time, thus thinking you are doing well, but probably braking so late the only thing you get is a bad cornering line, ruining your global time.

This happens in more combos, and those checkpoints lead to misjudging how well you are actually doing, and sometimes they create a bad habit on people as they get used to drive to get the best posible split time, but they don't realize that they are gaining time entering the corner, but they are losing more time exiting that same corner.

Checkpoints should be placed at maximun speed points at straights, a little before braking points, just like speed traps. Those are the best places to produce the *best* split times, in the sense that you can compare each sector split time with other drivers' without individual driving lines affecting them.
Last edited by MaKaKaZo, .
MaKaKaZo
S2 licensed
Quote from MikeB :Some new things you will be able to do:
  • Split a replay starting few seconds befor a BODY_DAMAGE event to see the crash again

I don't know how this is going to work, but if all damage events are going to be showing in a drop list or similar it should possible to disable damage events as in some combinations there are damage events every single lap. For example with the BF1 your suspensions usually get damaged every 2 or 3 corners, and that would be a lot of damage events for a 30 laps race.

PS: I agree that mpredit is still a great tool to use in conjunction with LFS replay controls.
MaKaKaZo
S2 licensed
Found a litlle thing:

- When watching a replay (at least mpr) you can't use shift+W to restore sound (I have to do this when I change from speakers to USB headphones and just realized that it doesn't work in replay mode). You have to go to any other mode (multiplayer, single player or hotlapping) to do it.
MaKaKaZo
S2 licensed
Will there be a LFS-Stats version in which you don't need to play the mpr replay in-game? Like you just select the mpr file and the program does all the parsing without needing LFS at all. A complete third party application. There's mpredit that already parses mpr files, so it *can* be done
MaKaKaZo
S2 licensed
Great, thanks a lot to both of you guys. I was guessing it would be some kind of IP/port memory with a timer as you just confirmed
FGED GREDG RDFGDR GSFDG