The online racing simulator
Searching in All forums
(183 results)
MikeB
S2 licensed
Quote from Madman_CZ :
could you please add Dutch Massive Revolution to the database? I think this is what we are registered as.

You're already in
MikeB
S2 licensed
Quote from Ondrejko :i tried this software but i dont know how to use it. could you make simple step-by-step guide please? thanks

It's rather easy Just keep in mind that there is no GUI.

1. Copy mpredit.exe somewhere in your %PATH. ("C:\Windows" will do)
2. open command prompt
3. type "mpredit" and hit return
=> You should see version info etc.

Now to get info about a replay type:
"mpredit path_to_replay.mpr"

This shows you many infos. Interesting is the number of timeframe packages.

To split a replay type:
"mpredit path_to_replay first_frame last_frame path_to_new_replay"

There is also some documentation on the website.
MikeB
S2 licensed
Just added: Formula BMW and South City chicane route :-)
MikeB
S2 licensed
Quote from Dygear :Erm, they kinda did.
http://www.lfs.net/?page=SPR
http://www.lfs.net/?page=MPR
But just the header.

I wonder how hard the devs are laughing at us.

Hehe, course i know the header documentation But the interesting stuff for me is the later, undocumented part...
MikeB
S2 licensed
Quote from mcgas001 :im thinking your best of asking scawen about this, it sounds very complex

Yeah, i know But i do not want to harass the Devs with these questions - and i also don't think they really want to publish info about the replay format in public...
MikeB
S2 licensed
Quote from A.Fedorov :if i press Ctrl+Shift i see date of race. (date and time) may be use this data if it possibly.

Thanks for the tip However it seems that this time information is not stored in the replay data itself - It is generated by LFS in real-time during playback of the replay data... But i need something that is in the raw .mpr data to identify the time/lap progress.
MikeB
S2 licensed
Thats some interesting stuff... This means:
If our assumptions are true, this means the server is basically a braindead package repeater
And each client takes care for
  • track data/layout
  • physics
  • time / split times / results
So, coming back to the original task i have with mprEdit:
That would mean that the packages sent to the client (and then saved as mpr data) do NOT include any sort of time/lap count/... information - This is all calculated on the fly during playback of the replay? Then i will soon be out of ideas how to split a replay at a certain time/lap

The point is that the information i am seeing in the mpr is somehow confusing. I (originally it was WolleT) found the following pattern to occur after all header info:
  • 2 Bytes timestamp (rolling over at 65534)
  • 2 Bytes signature "FC 00"
  • 1 Byte, maybe some kind of type information
  • 1 Byte "00"
  • <actual data, mostly unknown, varying size>
So whenever the replay starts with a timestamp followed by "FC00" it plays back without problem.
The point is that the "timestamp" is not really a timestamp - It is increasing with every packet, but there seems no relation to real timeinformation. It is definitely not milliseconds or sth like that - It seems unrelated to the replay time.
Also the actual data varies in size from a few Bytes to Kbyte...

I would guess that these packets are the "position" or "master" packets, followed by controller input, chat messages etc. of all players. But i did not find any proof for this idea yet

angryAngel, maybe you can find some hintes when analyzing the network traffic - i am unskilled in that area
MikeB
S2 licensed
I'm glad you all like it
I'll keep you posted about the progress of time (or lap) identfication. But so far i did not have much success...
Anyway also a gui is on my todolist
MikeB
S2 licensed
Quote from nikimere :Well in that case i reckon there is actually a little man driving each car

Quote from Bean0 :Magic, maybe pixies as well

Well, at least that's a start for discussion
LFS netcode - how does it really work?
MikeB
S2 licensed
Hiya,

while working on mprEdit i started thinking about the way the netcode of LFS is working. I think most people here agree that lfs multiplayer is working remarkably well, given the nature of the internet.
While i am trying to figure out how to get hands on the lapcount or racetime information i tried to get a bigger picture of the communication.

My theory:
Client sends controller input to server
Server collects all clients controller input
Server sends to all clients the controller input of all other clients
Clients do physics calculation (the actual movement of the cars)

And every now and then (few times a second) there is a "position" packet containing the actual car position from the server to all clients to be sure that each players position is in sync on all clients.

What i am unsure:
Who keeps track of the current standing in the race? Server, Client, both?
Who decides when to display a split time, when a lap is finished, when the pit entry/exit line is crossed? Server, Client, both?

So what is your opinion? Do you agree/disagree? Any knowledge? This thread is open for all speculation :-)
MikeB
S2 licensed
Quote from STROBE :My foot is capable, but I doubt my plastic pedals will appreciate it. A pair of plastic Logitech DFP pedals has nowhere near the durability of a real car pedal, and releasing and pressing the pedal fully as quickly as possible on every gear change will reduce the lifespan dramatically. I agree with what I saw Kev post somewhere - by all means give a slight advantage to those with the full 3-pedal & h-gate setups (afterall they should be rewarded for doing more work), but don't castrate those of us with two pedals who would rather not replace them every year and who have to rely on sequential paddle shifters and a button clutch.

Oh come on, this is ridiculous. With this argument you could also blame Microsoft of your failing mouse because you are forced to perform hundreds of clicks a day to use Windows. Like already said before by someone, if the hardware fails during normal use, it is a problem of the hardware because it can not perform the task it is originally designed for.
MikeB
S2 licensed
Let's revive this old thread

You might want to have a look at mprEdit - it should do what you need
Last edited by MikeB, . Reason : added link
mprEdit version 0.4.0 beta
MikeB
S2 licensed
UPDATE - Version 0.4.0 beta available

Finally there is another release of mprEdit!

Download: http://mpredit.origo.ethz.ch/download

Changes since 0.3.3 beta:
=========================

GUI changes:
  • Change semantics of time display to match patch Z replay controls: The times are now always relative to the replay start, not to the race start. => A replay always starts at time 0:00.0, even if the actual race is already running before the replay started.
  • Added event "Body damage" (NOT suspension/engine damage!)
  • You can select different cars for start and end events
  • Selecting events now updates the start and end time controls
  • Splitting is now only happening based on time, not on event index anymore.
  • disable GUI elements when no replay is loaded.
  • add icon.
  • dont add "replay start" and "replay end" event to players
  • Add checkboxes to indicate if splitting should start with replay beginning / end with replay end.
  • show also drivers that dont have any split time recorded
  • add events SPECTATE and FORCED_SPECTATE to selectable events list.
  • fix tab order
  • enable/disable save button depending on the times set - if startTime < saving is allowed.
Bugfixes:
  • Add support for "Vote" Event. This fixes issue #7 - "Unhandled spectate Event" (http://mpredit.origo.ethz.ch/node/33). Not handling votes resulted in completely corrupt connection tables - I wonder why this has not been detected earlier ;-)
  • Allow multiple events for one timeframe - This fixes some bugs when within one timeframe more than one driver got a "FORCED_SPECTATE" from the server/admin. Happens e.g. on CTRA servers where people are sent to spectate when joining mid-race.
  • compact connectiontable after all events of a timeframe are handled. Fixes parsing of CD1.mpr, where in one timeframe a driver disconnects and another connects.
  • Improve parsing of Driver changes - now driver change also recognized correctly when dedicated server is NOT used.
  • Add, parse, interpret and set "isServer" char of SERVER_JOIN structure.
  • Support events MODEL_UPDATE and HELMET_UPDATE. Drivers should now always be the correct model and wear correct helmet
  • Filter duplicate timeframes from presplitevents (One timeframe can have multiple events - this resulted in duplicate timeframes before!
  • Only get the last events of type SPLIT_FINISHED, MODEL_UPDATE, HELMET_UPDATE for the presplitevents. Should have the same result, but decreases leadtime of generated replays during playback A LOT.
  • Store the last 3 split_finished events for each driver. So we are sure that the lap information and driver position is correct.
  • Add basic session type (race/qualy/training) detection.
  • Fix patch Z replay controls of created replays: Set the correct replay duration for generated replays.
As you may have read my original plan was to include dynamic mpr header generation so we can get rid of the "message flood" at the beginning of a splitted replay. Although i got that pretty much working there is an issue with the car setup data encryption inside the mpr files. As long as this is not solved it will be impossible to use dynamic header generation. So i moved all that stuff to a separate release branch and switched back to the old method of splitting. Maybe this can be solved in a future release but i need more time to investigate and think about possible solutions...

Have fun

UPDATE - Version 0.3.3 beta available

Fixed a critical bug that prevented splitting of replays with driver changes.
Download: http://mpredit.origo.ethz.ch/download

Changes since 0.3.2 beta:
=========================
Fix Bug #8 reported by DeadWolfBones and Birder.

UPDATE - Version 0.3.2 beta available

Finally supporting time-based splitting! See screenshot and read on for further changes.
Download: http://mpredit.origo.ethz.ch/download

Changes since 0.3.1 beta:
=========================
FEATURES:
- Add correct parsing of race time information.
- Add option to split based on time to GUI.
- Filter special LFS codes (colors, codepage) from driver names.
- Implement suggestion by J.B.: Relabel "save" button to "save as...".
- Add support for InitialRaceState parsing. Currently implemented:
-> Initial number of pitstops
-> Initial number of laps done
- Fix Issue #3 (http://mpredit.origo.ethz.ch/node/29): Last used directory should be stored.

BUGFIXES:
- Small cleanups of parsing code.
- Fix off-by-one error for lap count.
- small GUI cleanups
- some more GUI rework. Finally resizing support
- GUI: Fix tab order


UPDATE - Version 0.3.1 beta available

This is the first release where splitting seems to work reliable in most cases. Therefor I dare to call it "beta" instead of "alpha"

http://mpredit.origo.ethz.ch/download

Important changes since 0.3.0:
  • add "CHANGE_CONTROLLER" Event handling and add it to PreSplitEvents. This fixes cars jumping around on track in splitted replay.
  • Set the correct drivers to driverchange events. (target and initiator were sometimes exchanged)
  • Include localdriverchange in the PreSplitEvents. Otherwise LFS would not recognize changed names.
  • Restore dataEnd pointer after splitting a replay. This fixes the problem that you could only save once, subsequent replays would be missing 4 Bytes after the headerdata.
  • Cancel all driverchange requests on a driver when he issues a dc request for ID 0. This fixes the issue of double Driver change in MoE24h replay (changing car 04 from Weingram top Arens, TimeStamp: 18442)
  • Major changes to fix parsing of 24hr replay (Fix ID changing issues, Dont use drivername to connect car with driver)
  • fix detection of players leaving race
  • Introduce globally unique IDs for Cars and Drivers since the LFS IDs can repeat within a long replay (24hrs...)
  • Don't read the whole file into memory at startup. Instead use memorymapped file access. Surprisingly simple thanks to the great boost library!
  • Further improve memory footprint and parsing speed. Using mem-mapped file access now everywhere where it is possible.
  • display the chat message about mprEdit AFTER the PreDatapackes. Otherwise it scrolls out of screen too fast.
  • add "EVENT_JUMP_TO_PITS" to event selection.
  • Select the first player of PlayerCombo by default.
  • resize and rearrange controls.
  • fix tab-order.
  • dont display save result in status area - This is done through messagebox anyway.
  • Change order of split events so the "replay end" is the last event.
  • Support driver change as selectable event
  • sort drivercombobox alphabetically
  • display all drivers of a car instead of only the first one
UPDATE - version 0.3.0 is now available
http://mpredit.origo.ethz.ch/download
This release of mprEdit contains substantial changes "under the hood", while the GUI is still the same as in the 0.2 series.

Originally I had planned to further improve the GUI and lower the memory consumption. But since the demand for support of driver changes and joining/leaving server was quite high i decided to provide the first release in the current form.

Changes since 0.2.2:
  • Support players joining/leaving server at any time of the replay
  • Support players swapping cars during a pitstop
  • implement "method 2" of splitting to preserver the correct driver and connection IDs of all players. (See http://mpredit.origo.ethz.ch/wiki/How_to_split_a_replay for details)
  • Rewrite of parsing engine - it should not happen anymore that events are not recognized
  • display a chat line "replay created using mprEdit" when a splitted replay is played in LFS.
UPDATE - version 0.2.2 is now available
Changes of 0.2.2:
  • Only open Patch Y replays
  • Improve parsing of playernames
It seems Scavier implemented some slight changes in the mpr format with patch Y that i missed in the first release. Some replays parsed fine, some showed only garbage for the names. This version should fix this issue
Direct download link: http://download.origo.ethz.ch/mpredit/mprEdit_0.2.2.zip

UPDATE - version 0.2.1 is now available

Hello,

i want to introduce to you the project i am currently working on: mprEdit.

As you know there is no way to rewind a replay. So it is very hard for any league admin to review a certain race incident multiple times. mprEdit offers the possibility to split a replay into multiple separate replays. So you can extract the part with the incident and review it multiple times without having to do endless fast forwarding.

Limitations of the current version:
  • mprEdit tries to load the complete replay into memory. This leads to system performance/stability issues when loading large replays (e.g. the MoE replay of 24hrs race is 500MB in size - i did not manage to load it without crash or Windows running out of virtual memory...)

  • Driver change: The GUI displays only the name of the first driver of a car.
    Example:
    Jane is driving 12 laps, then makes a pitstop and Joe is taking over her car, continuing the race another 10 laps until finish. The GUI will only display Jane with a total of 22 laps.
  • Multiple race joins: Whenever a driver joins the race LFS assigns him a "new" car. Therefore during a replay a driver might have many different cars. To distinguish between these different "sessions" each driver is displayed with his car in brackets.
    Example:
    John joins the race from the start. Unfortunately he crashes out in the third lap. He decides to jump to the pits and rejoin the race.
    The GUI will display:
    "John (car 0)": This entry covers laps 1 to 3.
    "John (car 1)": This entry covers the rejoin after the crash in lap 3. (Note that the actual lap count is starting at 1 again!)

    Note: Cars are only displayed if they reached at least the first split of a lap.
Please see the project homepage for further info, documentation and downloads:

http://mpredit.origo.ethz.ch/



This release is still of alpha quality, so i expect that there still are many bugs and issues left. Please report anything that seems wrong here in the forum or open an Issue on the project homepage.
Last edited by MikeB, . Reason : update screenshot
MikeB
S2 licensed
Quote from The Very End :When people say improved collision detection, do you know this for sure, or is the comment based on what you have seen in the video?
Clearly you can see that the car only touches the wall a little, and therfor wouldn`t fly, even with the old system.
But if this is some Scawen has mentioned, then it`s greeeat ;D

There is no mention of it in the vid.
MikeB
S2 licensed
Scipy, i don't like your attitude.
MikeB
S2 licensed
Quote from GrandlHuber :But isn´t it possible to insert all team listed on lfsworld automatically?

Technically it would be possible. However i assume there are MANY unmaintained/abandoned teams in the lfsworld database. So i decided to wait for active requests for added teams. This has the advantage that only the teams are added that are really interested, thus keeping the update delay quite low (Each driver update takes about 7 seconds. With currently 912 drivers a complete update cycle takes about 106 minutes).

Quote from GrandlHuber :If not, plz add: Everlast-Racing.de

Added
MikeB
S2 licensed
Quote from arco :Could you add Fusion Racing (Fusion), please?

Quote from dougie-lampkin :If you get a chance, could you please add TEAM SPIRIT? (see sig)

Teams are added
MikeB
S2 licensed
Site update:
  • Direct linking for all charts. This gives possibility to bookmark certain charts (using "Link url" at the top of every chart)
  • noticeable database speedup
MikeB
S2 licensed
Quote from maczo :Problem:
when you open team details for Pink not Gay, the link is http://http//pinknotgay.awardspace.info which ofcourse does not work. Please correct that if the problem is on your end (on LFSW it links fine, so I hope it's not my fault).
Thanks

Problem solved

Quote from Töki (HUN) :I got the following problem when using these data:
Advanced Sim Racing Hungary - Comboscore ranking - Töki (HUN) - favourite tracks

" Fatal error: Call to a member function getName() on a non-object in /kunden/hausstrecke.net/webseiten/teamstats/script s/MyLFSWorld.php5 on line 423 ,,

I guess this is because of the letter " ö " in my name Works fine with other members

Problem solved

Quote from mobiholik :hey nice site MikeB, but can you add Racing Team Slovenia [RTS] on list ?

Team added
MikeB
S2 licensed
Everything is working fine again

Added teams:
  • Dead Men Racing
  • digiServ Racing Club
  • Independent Slovak eRacing Team
MikeB
S2 licensed
Quote from MikeB :As you may have seen there is a problem with the global comboscores. Since the site grew so fast i am running into provider limitations (namely that one php script call is stopped after 90 seconds).

(Sorry for quoting myself ) Did some refactoring of php code and database structure. Update should now be running safe. Additional bonus: Display of "team ComboScore" and "global ComboScore" for individual racers is now about 100 times faster than before
Sync is currently running, but i expect that in about 1 hour the globalscores should be back again.
Please have a look if everything seems sensible, I'll be AFK the rest of the day
MikeB
S2 licensed
As you may have seen there is a problem with the global comboscores. Since the site grew so fast i am running into provider limitations (namely that one php script call is stopped after 90 seconds).
So currently the global comboscores do not work. Everything else is still available and regularly updated. But i need to do some recoding of the global comboscore calculation which might take some time

After that issue is sorted out i'll take care of other problems and new teams
MikeB
S2 licensed
Quote from SilverArrows77 :Jusr registered out long running servers with a team name - so feel free to add us to if you like- Airattack Racing

You're in
MikeB
S2 licensed
Quote from joshdifabio :MikeB: Did you start collecting PBs a long time ago? Because all of my times show up, even the ones I deleted over a year ago.

Hmm, i just made a quick comparison. In my database you have 52 pbs, and also on lfsworld i count 52 entries. Are you sure you deleted the pbs?
MikeB
S2 licensed
Quote from sidi :This is prob my own fault for deleting my pb's about 3 times over the years. :weeping:

If i look on lfs world my laps are 43931 and when i compare with my teammates i only have 1367 damn your program has turned me into a newbie.

Hehe, yeah thats right. I am currently counting the laps that are reported for each stored pb. But i think it would be better to use the total number of laps as also displayed in lfsworld. Added to my TODO-List

Quote from sidi :Nice site btw some interesting info on there.

Thanks
FGED GREDG RDFGDR GSFDG