The online racing simulator
Searching in All forums
(12 results)
jur
S2 licensed
Geez, with Lithuanian competition like this I'm never going to make it to the race

Maybe I should just start looking for other, less advanced leagues
jur
S2 licensed
Quote from DarkTimes :Actually it would be quite fun to add a packets per second readout to InSimSniffer, as I have no idea if your figure is correct.

Nah, my figure is wrong. I just figured out, that I remembered the LFS pps, not InSim.
Any way, this library looks good, great job!
jur
S2 licensed

static void insim_PacketReceived(object sender, PacketEventArgs e)
{
// Use reflection to get the packet properties.
var properties = e.Packet.GetType().GetProperties();

// Print out each packet property and its value.
foreach (var property in properties)
{
Console.WriteLine("{0}: {1}", property.Name, property.GetValue(e.Packet, null));
}

// Blank line.
Console.WriteLine();
}

I was referring to this code, where you use reflection to get the properties of a packet. Reflection is a bit slow and it's fine when there are not many calls. But (if I remember correctly) minimum InSim packets per second is 3, so it might be a problem. GetType is probably all right, but GetProperties (and maybe some others) is likely to be slow.
jur
S2 licensed
Looked through the sample code just out of interest and noticed one possible performance issue. Using reflection each time a packet is received doesn't look like a very good idea. I might be wrong though, please correct me in that case.
jur
S2 licensed
Quote from nikka :
(this is C though, don't know how to use static variables in C#)

the same
jur
S2 licensed
from your discussion about the chat range i got confused. can anyone tell me if there's a way to mute the chat / control the messages? if you write !local <message>, is there a way to display it only to people within range, not the global chat? I thought it was impossible.
jur
S2 licensed
Quote from Nadeo4441 :Sorry for OT ( i dont want to make a new thread) , but how to make an "private chat" ? I have seen it an some cruise servers ... How to "mute" a chat message?

AFAIK there is no way to mute a chat message. i've implemented PM's in my insim though. you can do it using the insim info messages (don't remember what packet it is). it looks like this in my insim: "/i pm <nick> <message>"
jur
S2 licensed
I saw someone asking for a way to see if a player gets out of track and takes a wrong route. I've figured this out in my insim. You can check the LFS messages for a string, ending with "took the wrong route", then parse this whole string to get the player name. Afterwards you just find the player with this name and make him "safe", so he's not fined after being kicked to spectate. AFAIK this is the only way. Hope this helps someone.
jur
S2 licensed
well, i've coded my own cruise insim and i have traffic lights in it. i only use lfs buttons and letters R Y G that stand for Red Yellow and Green. when a light turns on, the letter is colored in appropriate color. first time i hear about textures. how do you use custom textures via insim?
jur
S2 licensed
thanks a lot!
jur
S2 licensed
Quote from Aquilifer :Driven meters:
I have made this. I did it by summing distances between successive points where the car has been (IS_MCI). The greater the frequency of the mci packets, the more accurate the distance is. But it is never 100% accurate.

Track lenght:
You cannot really compare the driven meters to the track length. This is because the driver might have been making just donuts and not even trying to drive a lap. Besides the track lenght the game informs is not that accurate and depending on your driving line might be tens of meters off the driven lap distance. If you want to follow the progress around a lap, you should use the nodes.

Thanks for the quick feedback! Now it's getting clearer. Just another question about those nodes. So as I understand InSim informs about driver passing some track node? Where can I get more info on these nodes? Like what are their positions on a specific track? How many of them are there and so on...
Tracking meters driven
jur
S2 licensed
I have a question. I'm using LFSLib to develop my first insim application and I'm stuck on figuring out how i can track a car's driven meters. Also, i wish to have some track length, so i can know how much progress a driver has made through the track. Or maybe there's some other way to have this info. Thanks for feedback, LFS programmers!
FGED GREDG RDFGDR GSFDG