The online racing simulator
Searching in All forums
(328 results)
JackCY
S2 licensed
Quote from Sobis :I wote for "12 Hours of Death Rally".

+1

JackCY
S2 licensed
Not in Insim. You have to get it elsewhere, though unless LFS server log has it as suggested you would basically have to monitor the connections and figure out what user is on what connection from the LFS traffic.
JackCY
S2 licensed
! Acquired LFS world record has invalid format, does not contain 10 space delimi
ted fields:
"56 601 FOX 19740 0 0 46090 513 Pe?a Racing 1327731053"

Can hack around this but I'm probably going to finally rewrite it once more and make it use XML. There can be spaces in names which breaks the use of spaces as delimiters.

BTW the errors reported by pubstat seem to be the same for plain text and XML, just pain text errors. Found these, anybody aware of some other related to reading WR?
Quote :not authed (invalid identkey)
Invalid Ident-Key
Identification is required
can't reload this page that quickly after another

Might add command line options to config file and maybe allow more cmd options, where cmd options would override those in config.

Empty config file, everything alright
LFSStats v2.1
Copyright (C) 2008-2013 Jaroslav Černý

LFSStats comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. Read LICENSE for details.
You should have received a copy of the GNU General Public License
along with LFSStats. If not, see <http://www.gnu.org/licenses/>.


! Config param invalid: host =
! Using default value: host = 127.0.0.1

! Config param invalid: port =
! Using default value: port = 29999

! Config param invalid: tcpMode =
! Using default value: tcpMode = True

! Config param invalid: isLocal =
! Using default value: isLocal = True

! Config param invalid: language =
! Using default value: language = English

! Config param invalid: pracDir =
! Using default value: pracDir = results

! Config param invalid: qualDir =
! Using default value: qualDir = results

! Config param invalid: raceDir =
! Using default value: raceDir = results

! Config param invalid: exportOnRaceSTart =
! Using default value: exportOnRaceSTart = yes

! Config param invalid: askForFileNameOnRST =
! Using default value: askForFileNameOnRST = False

! Config param invalid: exportOnSTAte =
! Using default value: exportOnSTAte = no

! Config param invalid: askForFileNameOnSTA =
! Using default value: askForFileNameOnSTA = False

! Config param invalid: generateGraphs =
! Using default value: generateGraphs = dll
Loading LFSWorld WRs... not loaded (no ID key)
TCP: 127.0.0.1:29999 connecting...
Goodbye.

Hope this thing will be a little more error proof in the end. It should catch wrong IPs and ports as well. Host names are supported too now.

Quote :# Host IP or host name
host = localhost

JackCY
S2 licensed
Never heard of one. You're lucky if LFS reloads the textures and you don't have to restart it with every texture change.
Try ask Lynce or others who made track texture packs.
JackCY
S2 licensed
Quote from vitaly_m :I try to capture info from multiplayer replay file. I tried "utf-8", "ascii",, "cp1251", "cp1252", "cp1253" encodings. Currently "cp1252" works best. But I get this: "12 - R.Kronpu^Bðs" instead of "12 - R.Kronpušs"

(bytes are: 12 - R.Kronpu^B\xf0s\x00\x00\x00\x00\x00\x00\x00)
(49 50 32 45 32 82 46 75 114 111 110 112 117 94 66 240 115 0 0 0 0 0 0 0)

Do I need to interpret ^B as some special character? Or do I need to use some other encoding?

LFS uses escape codes to switch codepages because it does not use UTF8 and has it's own messy playername/message/... encoding.
Colors are fine that's pretty standard but the codepages are certainly not.

Quote from vitaly_m :Thanks Dygear for even more references. For now it works good. In replay file (at least in header) I didn't meet ^8 or ^9 characters (as far as I remember) so if I see ^* I covert 1 letter and then revert back to cp1252.

Maybe in further replay parsing (now I need to find out what players was on starting grid, because they do not get to header if they do not finish).

I would rather say the switch is applied until you encounter another switch that resets the current code page while reading that string or sets a new. Not only 1 character but a whole sequence.

Vitaly: best get a library that converts/handles these custom LFS strings. Reads/writes and strips/converts them.

LFS devs: please use UTF8 or something else that is standardized and supported widely. Even old and simple C has wide chars.
JackCY
S2 licensed
Rewriting the class that collects and calculates individual stats, inevitable.

Sectors named as splits, defined as individual variables instead of indexable arrays or lists.
I'm surprised nobody notified for so many years that the split times in output html are actually sectors.
And yes just found another bug, all best splits(= sectors) apart from the last one show a lap lower by 1 than where they have been done. Saw that in code and verified on v2.0. Set best split times in first lap, it will show 0 as a lap where those splits were done. There is no such thing as lap 0 *laugh* How could we miss this for so long.

Qualification seems a little off as well.

I think the further networking update is going to be v2.2 after this works once again.
Last edited by JackCY, .
JackCY
S2 licensed
Quote from Flame CZE :There is one, called ReadMe_RU.htm.

I appologize but I am blind, where is it?

That's the contents of 0.99b:
LFSState.exe System.Data.SQLite.dll lang sound

./lang:
Czech.lng English.lng German.lng Russian.lng _EncodingHelper.txt

./sound:
CarLeft.wav carinside_79.wav clear_22.wav goodjob_5.wav
CarLeft_2.wav carinside_8.wav clear_23.wav goodjob_6.wav
CarLeft_3.wav carinside_80.wav clear_24.wav goodjob_7.wav
CarLeft_4.wav carinside_81.wav clear_25.wav goodjob_8.wav
CarLeft_5.wav carinside_82.wav clear_26.wav goodjob_9.wav
CarRight.wav carinside_83.wav clear_27.wav greatjob.wav
CarRight_2.wav carinside_84.wav clear_28.wav greatjob_10.wav
CarRight_3.wav carinside_85.wav clear_29.wav greatjob_11.wav
CarRight_4.wav carinside_9.wav clear_3.wav greatjob_12.wav
CarRight_5.wav caroutside.wav clear_30.wav greatjob_13.wav
CarRight_6.wav caroutside_10.wav clear_31.wav greatjob_14.wav
CarRight_7.wav caroutside_11.wav clear_32.wav greatjob_15.wav
ThreeWideMiddle.wav caroutside_12.wav clear_33.wav greatjob_16.wav
ThreeWideMiddle_10.wav caroutside_13.wav clear_34.wav greatjob_17.wav
ThreeWideMiddle_11.wav caroutside_14.wav clear_35.wav greatjob_18.wav
ThreeWideMiddle_12.wav caroutside_15.wav clear_36.wav greatjob_19.wav
ThreeWideMiddle_13.wav caroutside_16.wav clear_37.wav greatjob_1_cp.wav
ThreeWideMiddle_15.wav caroutside_17.wav clear_38.wav greatjob_2.wav
ThreeWideMiddle_16.wav caroutside_18.wav clear_39.wav greatjob_20.wav
ThreeWideMiddle_17.wav caroutside_19.wav clear_4.wav greatjob_21.wav
ThreeWideMiddle_18.wav caroutside_2.wav clear_40.wav greatjob_22.wav
ThreeWideMiddle_2.wav caroutside_20.wav clear_41.wav greatjob_23.wav
ThreeWideMiddle_3.wav caroutside_21.wav clear_42.wav greatjob_24.wav
ThreeWideMiddle_4.wav caroutside_22.wav clear_43.wav greatjob_25.wav
ThreeWideMiddle_5.wav caroutside_23.wav clear_44.wav greatjob_26.wav
ThreeWideMiddle_6.wav caroutside_24.wav clear_45.wav greatjob_27.wav
ThreeWideMiddle_7.wav caroutside_25.wav clear_46.wav greatjob_28.wav
ThreeWideMiddle_8.wav caroutside_26.wav clear_47.wav greatjob_29.wav
ThreeWideMiddle_9.wav caroutside_27.wav clear_48.wav greatjob_2_cp.wav
_SoundsHelper.txt caroutside_28.wav clear_49.wav greatjob_3.wav
carinside.wav caroutside_29.wav clear_5.wav greatjob_30.wav
carinside_10.wav caroutside_3.wav clear_50.wav greatjob_31.wav
carinside_11.wav caroutside_30.wav clear_51.wav greatjob_4.wav
carinside_12.wav caroutside_31.wav clear_52.wav greatjob_5.wav
carinside_13.wav caroutside_32.wav clear_53.wav greatjob_6.wav
carinside_14.wav caroutside_33.wav clear_54.wav greatjob_7.wav
carinside_15.wav caroutside_34.wav clear_55.wav greatjob_8.wav
carinside_16.wav caroutside_35.wav clear_56.wav greatjob_9.wav
carinside_17.wav caroutside_36.wav clear_57.wav slowcar.wav
carinside_18.wav caroutside_37.wav clear_58.wav slowcar_10.wav
carinside_19.wav caroutside_38.wav clear_59.wav slowcar_11.wav
carinside_2.wav caroutside_39.wav clear_6.wav slowcar_12.wav
carinside_20.wav caroutside_4.wav clear_60.wav slowcar_13.wav
carinside_21.wav caroutside_40.wav clear_61.wav slowcar_14.wav
carinside_22.wav caroutside_41.wav clear_62.wav slowcar_15.wav
carinside_23.wav caroutside_42.wav clear_63.wav slowcar_16.wav
carinside_24.wav caroutside_43.wav clear_64.wav slowcar_17.wav
carinside_25.wav caroutside_44.wav clear_65.wav slowcar_18.wav
carinside_26.wav caroutside_45.wav clear_66.wav slowcar_19.wav
carinside_27.wav caroutside_46.wav clear_67.wav slowcar_2.wav
carinside_28.wav caroutside_47.wav clear_68.wav slowcar_20.wav
carinside_29.wav caroutside_48.wav clear_69.wav slowcar_3.wav
carinside_3.wav caroutside_49.wav clear_7.wav slowcar_4.wav
carinside_30.wav caroutside_5.wav clear_70.wav slowcar_5.wav
carinside_31.wav caroutside_50.wav clear_71.wav slowcar_6.wav
carinside_32.wav caroutside_51.wav clear_72.wav slowcar_7.wav
carinside_33.wav caroutside_52.wav clear_73.wav slowcar_8.wav
carinside_34.wav caroutside_53.wav clear_74.wav slowcar_9.wav
carinside_35.wav caroutside_54.wav clear_75.wav stillthere.wav
carinside_36.wav caroutside_55.wav clear_76.wav stillthere_10.wav
carinside_37.wav caroutside_56.wav clear_77.wav stillthere_11.wav
carinside_38.wav caroutside_57.wav clear_78.wav stillthere_12.wav
carinside_39.wav caroutside_58.wav clear_79.wav stillthere_13.wav
carinside_4.wav caroutside_59.wav clear_8.wav stillthere_14.wav
carinside_40.wav caroutside_6.wav clear_80.wav stillthere_15.wav
carinside_41.wav caroutside_60.wav clear_81.wav stillthere_16.wav
carinside_42.wav caroutside_61.wav clear_82.wav stillthere_17.wav
carinside_43.wav caroutside_62.wav clear_83.wav stillthere_18.wav
carinside_44.wav caroutside_63.wav clear_84.wav stillthere_19.wav
carinside_45.wav caroutside_64.wav clear_85.wav stillthere_2.wav
carinside_46.wav caroutside_65.wav clear_86.wav stillthere_20.wav
carinside_47.wav caroutside_66.wav clear_87.wav stillthere_21.wav
carinside_48.wav caroutside_67.wav clear_88.wav stillthere_22.wav
carinside_49.wav caroutside_68.wav clear_89.wav stillthere_23.wav
carinside_5.wav caroutside_69.wav clear_9.wav stillthere_24.wav
carinside_50.wav caroutside_7.wav goodjob.wav stillthere_25.wav
carinside_51.wav caroutside_70.wav goodjob_10.wav stillthere_26.wav
carinside_52.wav caroutside_71.wav goodjob_11.wav stillthere_27.wav
carinside_53.wav caroutside_72.wav goodjob_12.wav stillthere_28.wav
carinside_54.wav caroutside_73.wav goodjob_13.wav stillthere_29.wav
carinside_55.wav caroutside_74.wav goodjob_14.wav stillthere_3.wav
carinside_56.wav caroutside_75.wav goodjob_15.wav stillthere_30.wav
carinside_57.wav caroutside_76.wav goodjob_16.wav stillthere_31.wav
carinside_58.wav caroutside_77.wav goodjob_17.wav stillthere_32.wav
carinside_59.wav caroutside_78.wav goodjob_18.wav stillthere_33.wav
carinside_6.wav caroutside_79.wav goodjob_19.wav stillthere_34.wav
carinside_60.wav caroutside_8.wav goodjob_2.wav stillthere_35.wav
carinside_61.wav caroutside_80.wav goodjob_20.wav stillthere_36.wav
carinside_62.wav caroutside_81.wav goodjob_21.wav stillthere_37.wav
carinside_63.wav caroutside_82.wav goodjob_22.wav stillthere_38.wav
carinside_64.wav caroutside_83.wav goodjob_23.wav stillthere_39.wav
carinside_65.wav caroutside_9.wav goodjob_24.wav stillthere_4.wav
carinside_66.wav clear.wav goodjob_25.wav stillthere_40.wav
carinside_67.wav clear_10.wav goodjob_26.wav stillthere_41.wav
carinside_68.wav clear_11.wav goodjob_27.wav stillthere_42.wav
carinside_69.wav clear_12.wav goodjob_28.wav stillthere_43.wav
carinside_7.wav clear_13.wav goodjob_29.wav stillthere_44.wav
carinside_70.wav clear_14.wav goodjob_3.wav stillthere_45.wav
carinside_71.wav clear_15.wav goodjob_30.wav stillthere_46.wav
carinside_72.wav clear_16.wav goodjob_31.wav stillthere_47.wav
carinside_73.wav clear_17.wav goodjob_32.wav stillthere_48.wav
carinside_74.wav clear_18.wav goodjob_33.wav stillthere_5.wav
carinside_75.wav clear_19.wav goodjob_34.wav stillthere_6.wav
carinside_76.wav clear_2.wav goodjob_35.wav stillthere_7.wav
carinside_77.wav clear_20.wav goodjob_36.wav stillthere_8.wav
carinside_78.wav clear_21.wav goodjob_4.wav stillthere_9.wav

for so many sound options though, so it does not seem repetitive.


Apart from the false positives it gives and bugs it's nice, a good addition if one wants some of the features.
LFSStats v2.1 (work in progress)
JackCY
S2 licensed
Hi everyone,

this is a continuation of previous LFSStats v1.xx that was developed by Gai-Luron. I've made an updated version v2.0 a long time ago that was submitted in previous thread and it seemed to be used. It had mainly cosmetic fixes at the time as it was otherwise working well. LFS has changed though and the old base code of LFSStats started to be outdated.

Now I wanted to practice and make it usable again so I've started to make an update v2.1 almost 2 months ago. Working on and off on it as I have time.

There are going to be major changes and hopefully a completely new network layer with a working TCP. Swapping the networking to InsimDotNet. Added all fixes I could find that Luron made but none seem to work very well, they work but TCP still does not work flawlessly.

See change log below to see what updates have been made:
(I'm not even sure it has them all, there is unlikely to be a part of code I did not change by the end.)

Changelog:
==========
v2.1
----
* Graphs:
* Adding option to generate graph from DLL or EXE and adding Yamakawa's YGraph as an option
* Updated NPlot library to 0.9.10.0 and due to NPlot a .NET 4.0 Client Profile is not enough and a full .NET 4.0 is needed
* Changed default graph config to not output unused images
* Changed default graph background to transparent
* Networking:
* Fixed new Insim flags (AXIS_CLUTCH / THROTTLE, ...), proper names and exporting all of them, including SwapSide
* Changed them to be displayed via CSS3 - easy to modify at any time
* Added changes from Luron's v1.12 in Insim4.cs but TCP is still buggy
* Added changes from Luron's LFSLapper update tcp.cs/GetPackFromInsimServer, it could now support TCP better
* (InSim.Decoder.PIT.PIT) Pit flags text but still needs localization I think
* Ohter:
* Looked up and commented out some unused code
* Fixed {*Conditions} "Sunny,no wind" formatting to "Sunny, no wind"
* Added a few language file substitutions
* LFSStat changed to .NET 4.0 Client Profile and update some outdated code for better performance and conventions
* Cleaner version reporting and maintaining in the project
* Removed #MONO and #WINDOWS from source files since these are supposed to be defined elsewhere, in build/compiler options,
and not in source files, just change the #IFs back to #IF MONO and define #IF at build/compile level not in source files
* Command line options with help text and usage
* Customizable program ouput verbosity
* fixed 45 sec. penalty string
* Config errors are not reported but wrong values are set to default
* IMPORTANT: the application is now multithreaded, uses .NET tasks for exporting the collected data,
removes slight application hang up while exporting, thus main thread = networking runs continuously and exporting is asynchronous
* All command line interaction removed except when config defines to ask for filename, it should not hang up anywhere and should
quit on errors
* Fixed some of the weird exceptions that were happening because Insim does not report well session states, thus things were being
accessed while a session did not even start yet. It should be safe now to browse LFS without LFSStats crashing.
* Cleaner and formatted output to command line and console title
* Exit codes: 0 success, 1 network error, 2 connect timeout, 3 template error
* Fixed LFS World links, HTML link encoding
* Fixed car plate export, HTML encoding
* Updated export of statistics to accomodate template changes = more freedom when making templates
* Rewrote the configuration importer that now contains the loaded settings and comments starting with '#' can be anywhere on a line
* Templates:
* Changed template names to .html for easier processing
* Added back to templates what Yamakawa decided to throw away but LFSStats can export and is useful, like driver swaps!
* LBL integrated in template
* LBL colors are HSLA, partly transparent and colors change continuously not discretely, saturation and alpha can be changed in tempplate
in code easily, want only 2 colors sure, want crazy mixed rainbow with 100 colors and all the way to 2000% best laptime? sure!
Just type it in there.
* More sensible html titles (16 laps of Fern Bay Green)
* Tag start "[-" disables output of that tag content, ends normally with tag end "]", used on [Include in the template for example
* Chat integrated in template

v2.0
----
* Nickname colors - fixed
* Nickname 2 HTML - fixed
* Chat 2 HTML - fixed
* Some minor renaming of templates and generated files
* Changed templates (hope old templates will still work), more space saving, added link to Chat
* When exporting on STAte changed (leave, exit) added option to CFG yes/no/ask to decide if export.
* When exporting on Race STart (race [re]started, mpr [re]starts from begining) added option to CFG yes/no/ask to decide if export.
* Question for name of stats instead of generated time, for STA and RST separatedly
* Globals in templates now work for chat to.
* Chat template and language files updated.
* StartOrder Nickname link to LFSW - fixed
* Dns.Resolve() changed to Dns.GetHostEntry()
* integrate Graph.exe (got original src files for v1.20 )
* integrated as .DLL
* fixed .TSV path
* added option to LFSStats.CFG, generate automatically YES/NO
* fix some tables in templates, no white backround
* update Console.WriteLine() stuff (names, emails, ...)

Command line usage:

LFSStats v2.1
Copyright (C) 2008-2013 Jaroslav Černý

Usage: Statistics [options]

-c, --config (Default: LFSStats.cfg) Config file.
-i, --interval (Default: 100) Insim refresh interval: [1-1000]ms.
-v, --verbose (Default: 1) Verbose level: [0-4] Program, Session, Lap,
Split, Info.
--version Display version information.
--help Display this information.

I'm not sure what are valid Insim interval times, anybody knows?
The rest of configuration is per usual in a config file.

---

OLD version 2.0 (temporary hosting, same release only config changed to UDP mode):

binary
source


v2.1

I'll get the newer versions on one of the open source project hosting sites sourceforge, github, codeplex or similar once it's done and releasable.

---

The templates are made new from scratch, HTML5 and CSS3, not finished yet with Qualification, Practice and CSS. Here is a preview of LBL colors that LFSStats generates so it's something not changeable in CSS completely.



The colors are continuous and can be redefined in source code easily if needed. Any other colors are only temporary in CSS.

I'm thinking of changing the menu once again, right now it works the same way as Yamakawa's template that is via JavaScript showing and hiding parts of the webpage but it's not very user friendly to be honest. Thinking of switching it to scrolling down and up with the header and menu being fixed on top and possibly avoiding JavaScript.

This is the current HTML5 outline of race statistics template:


If you wish for a different order or grouping in navigation, let me know below.
Update: Splits were changed to sectors.

---

Please keep bug reports for later when v2.1 is released, a lot has been already fixed.
Can't help you with bugs of older versions made by Luron, please report those in his thread.
Last edited by JackCY, .
JackCY
S2 licensed
I think I only run GTM and finished once and not in top 5.
That makes me Bronze and AM right?

Who said it is hard to find Bronze drivers? I think the majority is actually Bronze.
Unless you guys just want to run AM class with drivers who regularly attend and finish top places in very competitive leagues. Then yes that's not AM that's PRO class.

So you would need a third class for PRO (Gold-Gold, Gold-Silver).
Because the highest seems to be PRO-AM here which is up to Gold-Silver but also all the way down to Bronze-Bronze which is strange. Why are not the AM omitted from PRO-AM?
JackCY
S2 licensed
Quote from MousemanLV :I really liked these series. I used to practice for this fairly a lot in the very beginning, although as soon as school came by, my chance to attend a race just died. I would definitely race every single round if the timezone was right for me, but since it wasn't exactly fine for me, I just had to sort of decline my attendance to the race.

Thanks for bringing really, really great racing series. 1st and 3rd round was the best for me.

Portugal or Latvia almost the same time like middle of EU, that was evening races on Sunday and the rest was 24h qualification from evening to evening.

---

Only 5 cars finished round 6?
That's like 50% crashed, retired?


The beginning of league was insane, then it got easier and easier to get into the race and number of people reduced and the lap times increased.
Though to go from what? 160 in R1 to 10 in R6? In just 3-4 months?
Guess people quit LFS...

It was good, apart from the unrealistic qualification.

Starts were very messy with the flying start. Cars too close, causing collisions.

Races were long and fine for the amount of cars at the beginning.
A little too much for me personally at the end of league to drive over an hour somewhere alone with mouse. It's boring and tiring for hands.
So I skipped races of the last rounds and worked on LFSStats instead.


Thanks for organizing though!
JackCY
S2 licensed
Quote : I agree with you, but Lexanom is not that good in English, so he'd need a Russian translator who could translate the readme into English first.

Even a Russian one would be at least something (we can Google translate, just put it there)

Quote :There is a pitboard which shows you how far ahead/behind are your closest opponents. It also shows the PB difference on splits at the top. But it doesn't have the difference meter or how much you gained on people around you at each split.

LFS has a board that shows distance to others though it only shows the time when you cross the split or so, I think it does not show it always, only on split updates of you and your opponents.
That difference meter on top reminds me of Rally games
Like CMR and RBR.

Quote :Last lap? Is that necessary? Does it work with time based races?

Sometimes I forget it's the last lap, when I am in a big fight and I am not focused on the lap counter. Could be made optional (ability to turn it off), though.

Ah true. It would be neat if it could say last lap when you get lapped. As you will not have time to drive all lets say 40 laps but only 39 so it would tell you in 39th that it's your last.

Guess for those who like to see overload of laps and split times it can be useful. I prefer to check those afterwards. During race what I find useful is to know how much time/laps to catch up somebody or how much time/laps before somebody catches up with me.

Lets say car behind is driving faster and will get close to overtaking based on previous progress in last few laps in 6 laps. Drives 1s faster and the gap is 6s, so 6 laps to catch.
Comes handy to do in endurance races. If it's worth it to speed up and catch somebody, speed up to not get caught or to drive a little more safer and bring the position home.
JackCY
S2 licensed
Quote from Litro :Wow, this version works! Thank You!

That's the v2.0 that was here before, same archive, I've only changed the mode to UDP in config and zipped it again.

Well even the latest v2.1 (in TCP mode) I have still crashes on occasion because of how the internals were made, which is a bit of a guess and it seems one needs to check everything and everywhere as packets and information gets built for the stats in an unknown order.

Joined online server with v2.1 running, shortly after crash. User sent message and it has to translate user ID to nickname but there was no entry yet in the translation dictionary for this ID ==> :hbomb:
Will have to look into it later when rewiring things.
Right now it works fine so I'm waiting if it crashes again.
...
Hmm so far it's running fine.

Only error in stats is that it lists some best possible laps of people who did not make a lap but did a split or something. Making a note to check it later.

---

Changing the internals a LOT.
Even configuration and stuff. Can't work with it much unless things are nicely separated.
Last edited by JackCY, .
JackCY
S2 licensed
Quote from Litro :Well...your version also did the same.

Very likely, did not fix the network back then and the network was also working with older LFS much more. v2.0 fixes and updates were more cosmetic than changing the inner operation of LFSStats.

Will make a new thread and repository for the code with new version.

I think TCP is a necessity here for LFSStats to create valid results so I have another big thing to update = remove the whole "network layer" and wire it to InsimDotNet.

I'm not sure there will be much left from the original LFSStats anymore.

---

OLD version 2.0 (temporary):

binary
source



Will try to get the new one out once it makes an output that is usable.
Still missing Q and maybe practice, need to make CSS to style the whole thing.
Then I can publish and fiddle with TCP/InsimDotNet.
JackCY
S2 licensed
Make the connection time out longer, before LFS starts and I can make it open insim, LS stops connecting and I think it did not shutdown either.

Giving it a try, though I rather prefer to drive and see the road than read while racing

Is slow car ahead just a copy of yellow flag?

Add a readme, there is nothing about configuration if it's needed or not and neither I see where and how to connect so it works with default 29999 but nothing else?
Yes something gets printed into console but I'm likely to have that on background and LFS in fullscreen and not notice some special commands printed into console. But would read a readme in advance to see what to do and how clearly at any time, not only after connecting to LFS.

Make the buttons "save&close" and "cancel".

The default positions of GUI are over mirrors! I don't know how about others but I do use them.

Moving the GUI from left to right is a nightmare of 1000 clicks. Make it more easy to move around. Or allow arrow keys for movement, just hold a key and move it. Ok found it, CTRL+Click and it jumps a lot, could be a little less.

Also I'm driving first after start in XRT, others have STDs so are behind quite a bit. Approaching first corner and I hear loud slow car in front blah blah and text flashing at least 2 times. While there is nobody in front obviously.

Is there volume control?

Don't we get these split times and such already from server Airio on those that have it?

Is the GUI configurable per car?

Turned off sounds but cross a finish line and hear voice again, no idea what it says though. Not understandable.

Diffline does not show with semi-transparent background.

Standings with time 0 show on top instead of bottom or rather being omitted from the results.

GUI is kind of confusing, good, awesome etc. when I drive pretty crappy laps. Guess it's not comparing to laptimes of others but to mine?
WE1 RAC, first in race, nobody near and nobody even near after u turn, crossing finish line it yells at me car in front car in front etc. like every lap it reports some fake yellow stuff. There is no yellow flag yet the system yells there is a car, slow, in front, etc.

standings and relative contains cars that do not race, shows them on top, should be removed alltogether.

What is Opt under the PBs?

Wasn't there already a LFSSpotter? This does reports cars nearby ok, but the fake collision prevention reports are annoying.
Relative and standings can be handy, though I would probably like them to be visible after key press not always.

Spotter seems ok, though it's hard to tell without any close racing how accurate it is.

Last lap? Is that necessary? Does it work with time based races?

Does this all work in qualification and practice reasonably?

When switching to another driver via the provided GUI it does not show laps etc. as in it does not collect these and only start collecting from that point = useless half the time. Does not change this following based on what car you're viewing with an optional lock.

Looking at a replay, the spotter tells it late, after I have 1/3 of a car on side already overlapped. Thus if I had steered we would already collide before the spotter reporting. It could be handy to have this for rights in a corner though where an overlap is needed to have a right. Relying on it seems risky though.

And I think I just crashed it while browsing a replay and trying to get to SHIFT+B again. It closed, no idea what error since the console closed as well with it.
Last edited by JackCY, .
JackCY
S2 licensed
Quote from Litro :error
I see something similar to this https://www.lfsforum.net/showt ... php?p=1758174#post1758174 but where to move that folder? Tried another direction...didnt helped.
When i use spr replays it gets stats.

Dunno, that looks like Luron's v1 so expect a lot of bugs.
That one fails to create a class of IS_STA packet while trying to read some [S]WORD (Int32)[/S] I mean USHORT (uint16) which in Insim is named as WORD

But yeah this is one of the things that can still go to hell because of how the Insim was coded and handled. I may switch it to InsimDotNet if that one does work. The plan was to not rewrite network layer if necessary but it's something that needs to be done nonetheless.

It's probably one of Luron's early programming projects so it looks like it. There is no checking and safety, it assumes everything is always ok, well it is not and then it crashes instead of recovering.
JackCY
S2 licensed
Quote from Gutholz :thanks for reply and your work

There was this replay I could not generate stats from:
https://drive.google.com/folde ... 2cbH56Sx8ndWRjdW53WGxhRzQ
It crashed at end and the generated stats were "empty" (everybody DNF etc) Not sure if it was just bad luck but tried 2-3 times and did not work. (It worked for some other replays)
(sorry, do not remember more details than "it crashed" or I'd give error message)


Only just started with insim and did not test it, but maybe this?
ISP_RES, // 35 - info : result confirmed
At least for quali & race, practice maybe has no results.

Let me check if it works with the latest version on UDP when jumping the replay to the end. Yes both replay work and generate. Though there is an issue that the results may miss a lap or something because it's on UDP and my hardware is a little old. So the results are not correct to the race due to the network transfer. That's why having TCP is better to have the results correct even if something slows down, nothing gets lost.
And I don't know about a mechanism in Insim that would handle lost packets.

IS_RES is only reporting result of a race and in Q it gets sent with every finished lap and IS_LAP.

Yes the only way seems to stop (and start) on IS_RST and the other options is to monitor IS_STA. I think I have it now, at least it reports all P,R,Q start and end all the time. But it could be made cleaner and easier to find those states of a track session.

Quote from Litro :INSIM ERROR : WOULDBLOCK
This appears in LFS when i run LFSStats. And then LFSStats close auto. What could be a problem?

No idea, never saw it.

If it's with version 2.0 and it prints some exception or log into console then I could check.

I've bullet proofed things a bit in v2.1 so all the old code from v1 that is causing these errors is easier to catch and find. Or was already fixed when I saw it in code.

WOULDBLOCK might mean that something would block or maybe overflow the TCP/socket buffer in LFS. Though there hardly anything gets sent from LFSStats, only a few requests to get connections and players and such. Otherwise it just sends ACK to reply to LFS to keep the connection alive and that's usually about it.

The TCP only goes down for me when I try to jump in replay, well it is up but LFS does not send anything and does not close it either. So it just lingers half open.

I've now closed LFSStats while I've closed LFS earlier:

Goodbye.

! Unhandled exception:
! System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.ReceiveFrom(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint& remoteEP)
at System.Net.Sockets.UdpClient.Receive(IPEndPoint& remoteEP)
at InSim.Connect.Receive()
at LFSStatistics.LFSClient.Loop(Connect insimConnection)
at LFSStatistics.LFSClient..ctor(String configFileName, Int32 refreshInterval, Verbose verbose)
at LFSStatistics.LFSStats.Main(String[] args)

I still can't get it to show code lines though, it should show them but maybe I will have to disable optimization for it to do so, which I don't want to do. Or it can't show for unhandled exceptions. Who knows, would have to test.

Guess I should suppress these errors when it's shutting down on my command.

---

HTML5 outline of race stats:

LFSStats log of Gutholz's replays.

LFSStats v2.1
Copyright (C) 2008-2013 Jaroslav Černý

LFSStats comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. Read LICENSE for details.
You should have received a copy of the GNU General Public License
along with LFSStats. If not, see <http://www.gnu.org/licenses/>.


Loading WR... Not loaded
UDP: Connecting... OK

Product: S2 Version: 0.6E InSim Version: 5
LFSStats is running...


Race start: 38 laps of AS3
Result: 1. THR Mazdarati/1
Result: 2. BWR-Black/1
Result: 3. [CR]Bandes/2
Result: 4. ERR|?nyle/2
Result: 6. MZRtoberkel/1
Result: 7. Cruel Garfield/4
Result: 8. [MRc] Michal/4
Result: 9. [RfB]alex/4
Result: 10. [GRT] Wheldon 77/3
Result: 11. TcL Knistling/3
Result: 12. [RfB]dan/4
Result: 13. TcL Gutholz/3
End of race by Race STart

Race start: 38 laps of AS3
> Race Stats exported (627ms)
> Graph.dll graphs generated (2321ms)
End of race by STAte

Goodbye.

---

LFSStats v2.1
Copyright (C) 2008-2013 Jaroslav Černý

LFSStats comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. Read LICENSE for details.
You should have received a copy of the GNU General Public License
along with LFSStats. If not, see <http://www.gnu.org/licenses/>.


Loading WR... Not loaded
UDP: Connecting... OK

Product: S2 Version: 0.6E InSim Version: 5
LFSStats is running...


Race start: 36 laps of WE1
Result: 1. LLM C.Dalda/1
Result: 2. MTDZX-Antti/1
Result: 3. THR Mazdarati/1
Result: 4. S M.Kapal/4
Result: 5. [CR]Bandes/2
Result: 6. BWR-Black/1
Result: 7. Camoradi/2
Result: 8. THR Daniel /1
Result: 9. [GRT]LRK-racer /1
Result: 10. MZRtoberkel/2
Result: 11. ERR|?nyle/2
Result: 12. BHAtmack/3
Result: 13. Cruel Garfield/2
Result: 14. TcL Knistling/3
Result: 15. [GRT] Wheldon /2
Result: 16. TcL Gutholz/3
Result: 17. BHAgredghog1/3
Result: 18. ERR| Jamo /2
Result: 19. Migpha/4
End of race by Race STart

Race start: 36 laps of WE1
> Race Stats exported (508ms)
> Graph.dll graphs generated (572ms)
End of race by STAte

Goodbye.

Yeah the call to Graph.dll takes some time the first time sometimes. Guess it gets loaded or something or it just gets scheduled later. The export is now run in parallel so it does not affect the rest of the application at all. It could take 5min to export and have another export to be done already executed as well, it would still work. Should Never tested but it should work.

---

The new Lap by lap, everything apart from menu layout and colors of the laptimes is going to change since it's not styled yet.
The times are colored continuously now.



Yes it is more green than the old one since anything in the range of 101.5-103% is green-yellow.
The same for other colors. The bar under menu shows the preview at predefined percentages. Can add more or change colors anyhow. This seemed the best.
It's 100+0.5+1.0+1.5+2.0+2.5 for the percentages.
Last edited by JackCY, .
JackCY
S2 licensed
And it's missing corner distance markers.
JackCY
S2 licensed
How many qualified and confirmed people so we have a race?
Half the grid? 15?

I'm not sure it will be much fun if we are all spread out around the track for 1 and half hour in a small amount of cars.

Might set a lap just to see and decide later.

Will it end at 20 UTC as well?
JackCY
S2 licensed
Quote from Flame CZE :InSim.txt in data/docs folder is not a sufficient documentation for the needs of this app?

Well not much, it mostly defines what it sends, how the data is layout. It's basically a header file with comments, nothing more.
Does not define when it sends what packets and how the communication goes. A little is in the comments of the header file and that's about it.

That's why I think using another project that handles the insim communication might be better than trying to keep with the changes that are made to API/insim and break backward compatibility. Though that probably does not solve the issues of properly detecting states.

Yes people say: insim.txt
Have they tried to use it themselves though?

What defines a session (race, qualification, practice) end?
As far as I've seen nothing. It's basically hacked around to detect it via starting a new session, etc.

---

Why are there so many null errors in LFSStats? Because it was coded previously without checking for nulls and they do happen to pop up, same goes for index out range. I'm adding checks and fixing things where I find it.

Right now, I'm in TCP mode and got IS_SMALL with a length of 4 instead of "always 8" as insim.txt says. And other junk. Don't get it in UDP and don't get it consistently in TCP either. Have a log of it now, caught it once in debug and the IS_SMALL was [4,4,4,4], Size 4 ok but invalid for IS_SMALL, Type IS_SMALL, ReqI 4, SubT 4, and nothing for UVal that is on positions 4-7 and those are missing.
Don't need IS_SMALL, it doesn't work for what I hoped so I can remove it but why do I also get:

Packet head: 114
Unknown packet received: 114
Packet head: 48
Unknown packet received: 48
Packet head: 145
Unknown packet received: 145
Packet head: 83
Unknown packet received: 83
Packet head: SMALL
SMALL

48 is OK, anything under 55 is defined. The rest is not though. So right before the invalid IS_SMALL it also receives some other junk. Only in TCP and only sometimes. Not fun to debug.

Another:
TCP, the moment I click to fast forward a replay, TCP returns nothing as if no packets are sent to the stream. While they do get sent in UDP and do get sent in TCP while not fast forwarding. From that moment on, the stream reads nothing. And I bet it would yell at me with some kind of fatal error if the stream got closed and I was reading from it, which does get caught. It's as if LFS does not write to the stream anymore.

This last thing was originally implemented with an Exit, the application just shut down when LFS would do this. For me it gets hanged in an infinite reading of empty TCP stream over and over, trying to get packets but none are coming.

Found another fix from Luron, from LFSLapper so I'll try it, it's the same part of code so we will see if this finally fixes the TCP for what ever reason. But is shouldn't from what I see, as it only throws an exception, that's what I had here right now, it spawns the console with exception, the exit is better.
The fix might work on something else though. Like the above log of messy packets.
Last edited by JackCY, .
JackCY
S2 licensed
Quote from Gutholz :Hi
I wanted to use this program but encountered a problem.
Using LFSSTAT1.12.zip from http://cgtavc.monespace.net/la ... d/lfsstat/LFSSTAT1.12.zip
(link of first post in thread)

LFSStat.cfg is set to TCPmode = false

Start LFSSTat.exe, in LFS type /insim 2999
LFSstats says "Connection OK" but when unpausing the replay it gives an error:
http://pastebin.com/3GBR92AN

"Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt." roughly translated:
"The object referenz was not set to object instanz"

The JackCY Moded Version 2.0 links are dead

Is there a newer/working version or am I doing something wrong?

Hi, yes I'm working on it currently as I need to practice. This type of error should be fixed and if it is unknown it should be possible to find out what caused it. Guess I should enable debug so it shows the code lines in the messages even release version. This type of bug you encountered is usually caused by how Insim sends packets and the use of UDP. Or just bad luck when clicking around in LFS was causing this. I've done some more on this today or yesterday, found new bugs and basically disable handling Insim packets except 2 until a session is started.

Yes sources are down, something was rehosted but I did not rehost them yet, I've put a link there when I found out, so it goes to Yamakawa's host. Later I started to update it again so I can practice.

I'll move it to github or similar site so it will have it's own webpage or at least a definite download place for everything.

I can rehost the 2.0 version quickly somewhere, maybe I've set Luron links to update the front page but I'm not sure. Nobody sent me a PM so I did not see a need to rehost or even knew it's down already.

Yes Yamakawa's version is a copy of my version 2.0 with his new graph.


Here is a sneak peak of changes, I may try to change the rubbish TCP, I just found a fix for LFSLapper so I will try it. The problem is that Scawen changes Insim and there is no documentation of Insim, after the last couple days I basically hate how he sends Insim messages. Such a mess that we causing LFSStats to crash. Like getting a YellowFlag FLG after race end and returning to a host screen, made LFSStats look up a player that did not exist anymore. TCP should be better in avoiding something random like this but Scawen introduced something in LFS that broke the TCP completely with a random error by shutting the connection down or some such.
Changelog:
==========
v2.1
----
* Graphs:
* Adding option to generate graph from DLL or EXE and adding Yamakawa's YGraph as an option
* Updated NPlot library to 0.9.10.0 and due to NPlot a .NET 4.0 Client Profile is not enough and a full .NET 4.0 is needed
* Changed default graph config to not output unused images
* Changed default graph background to transparent
* Networking:
* Fixed new Insim flags (AXIS_CLUTCH / THROTTLE, ...), proper names and exporting all of them, including SwapSide
* Changed them to be displayed via CSS3 - easy to modify at any time
* Added changes from Luron's v1.12 in Insim4.cs but TCP is still buggy
* Disabling TCP in code for now
* (InSim.Decoder.PIT.PIT) Pit flags text but still needs localization I think
* Ohter:
* Looked up and commented out some unused code
* Fixed {*Conditions} "Sunny,no wind" formatting to "Sunny, no wind"
* Added a few language file substitutions
* LFSStat changed to .NET 4.0 Client Profile and update some outdated code for better performance and conventions
* Cleaner version reporting and maintaining in the project
* Removed #MONO and #WINDOWS from source files since these are supposed to be defined elsewhere, in build/compiler options,
and not in source files, just change the #IFs back to #IF MONO and define #IF at build/compile level not in source files
* Command line options with help text and usage
* Customizable program ouput verbosity
* fixed 45 sec. penalty string
* Config errors are not reported but wrong values are set to default
* IMPORTANT: the application is now multithreaded, uses .NET tasks for exporting the collected data,
removes slight application hang up while exporting, thus main thread = networking runs continuously and exporting is asynchronous
* All command line interaction removed except when config defines to ask for filename, it should not hang up anywhere and should
quit on errors
* Fixed some of the weird exceptions that were happening because Insim does not report well session states, thus things were being
accessed while a session did not even start yet. It should be safe now to browse LFS without LFSStats crashing.
* Cleaner and formatted output to command line and console title
* Templates:
* Changed template names to .html for easier processing
* Added back to templates what Yamakawa decided to throw away but LFSStats can export and is useful, like driver swaps!
* LBL integrated in race.html
* LBL colors are HSLA, partly transparent and colors change continuously not discretely, saturation and alpha can be changed in tempplate
in code easily, want only 2 colors sure, want crazy mixed rainbow with 100 colors and all the way to 2000% best laptime? sure!
Just type it in there.
* More sensible html titles (16 laps of Fern Bay Green)

Any known bugs that you guys can't live with?

Another option to solve the screwed Insim is to use InSimDotNet.

Latest InSim version is 5, at least on a client 0.6E and the older version in LFSStats is a version 3 updated to version 4 or something like that. + the fixes I made to mostly visual appearance, flags etc.

Basically, 2.1 has completely new templates in HTML5 and CSS3 with JavaScript.
I just have to do part of the HTML, qualification and chat. Then the new CSS for all. Menu works already that is in JavaScript.
The rest is endless programming and fixing.
Quote :Statistics (LFSStats) 2.1.223.264 (X86)

^264 builds since I changed the versioning in 2.1

Race HTML goes fine, as long as Insim does not screw it up, probably due to the UDP or some packets getting lost. I had a lap fall out of the stats sometimes, when replay jumping.
Last edited by JackCY, .
JackCY
S2 licensed
Looks canceled? 6 confirmed people?

Anyway, thanks everyone for organizing, it was killer at the beginning and we can only guess what has happened over the summer that LFS dies basically day by day.
JackCY
S2 licensed
Seemed to me like a wrong grid, reported on grid formation, grid was fixed up front, but not all the way back, I think it was a wrong grid. 68 started right but then was on grid again on right so there had to be a mistake in front. Probably due to a car falling out and they took the place of the car that crashed on formation lap. Changing the sides for the rest behind.

And some people should learn to drive straight and not change lines way too much. Pick a line and stick to it.
JackCY
S2 licensed
JackCY, Jaroslav Černý
JackCY
S2 licensed
Nothing much to add to the U collision.
I've made an overtake the previous lap or so at the same place with #21, which was close move from me to fit in there. My apologies.

Unfortunately #21 tried the same move next lap at the same place, which I saw and did not leave room. That meant #21 hitting me which would have spun me if there wasn't #42 on the outside, at least it seemd so, I hit #42 with the other side of car because the previous contact propelled me and that put my car back in straight line. Damage visible but not fatal. Both other cars were affected by the collision and had to recover to race pace.

Nothing I could do really, sorry. My sincere apologies if #21 had right of room on the inside, it did not appear at the moment to be so and I did not intend to let #21 repeat the same move I've used and saw #21 in advance to try it back and drove accordingly to prevent it, staying inside line.

---

Otherwise a race without collisions or being affected by flying or rolling tyres. Only a spun car in the U that I had to pass right behind at the end of race. Otherwise driving mostly alone at 6th place.
Start laps were a little strange, many collisions ahead in the chicane because cars were probably driving close to each other and tyres were hit.
Last edited by JackCY, .
JackCY
S2 licensed
Yeah memory can be an issue but it does not occur to me that LFS would be that memory hungry. Plus nothing else runs.

My old connection wasn't good and I knew that, I can test it. This new one is fine. I have connections open for several hours and I do know when they drop. They don't drop with the new provider.

Guess it's LFS disliking the older computer then.
FGED GREDG RDFGDR GSFDG