[WIP] Live Timing, Session Results, Track Rendering & League Management [Discontinued]

Discussion in 'Other' started by B1K3R, Apr 16, 2013.

  1. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    OK, np, we will do a Teamview session this week so that I'll analyse what's not working :)
     
  2. LCCMarc

    LCCMarc Registered

    Joined:
    May 16, 2012
    Messages:
    56
    Likes Received:
    0
  3. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    Marc, do you have download links for rFactor 1 mods Megane Trophy 2.02, F1RFT2012 and Enduracer SP2 so that I can test them myself first please?

    Thanks :)
     
  4. Adrianstealth

    Adrianstealth Registered

    Joined:
    May 28, 2012
    Messages:
    4,578
    Likes Received:
    1,072
    Great cheers for the response

    So this isn't for looking at live
    (As all people in server are in sim)
    This is for full results after the session
    (Screen grab then email to each person the server?)
     
  5. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    Adrian, yes, it is for LIVE Timing and after Session results plus statistics as well.

    There is no need to screen grab as it's an online application and users can check the results or live timing anytime, even if they are on the toilet with an tablet ;)
     
  6. LCCMarc

    LCCMarc Registered

    Joined:
    May 16, 2012
    Messages:
    56
    Likes Received:
    0
    Hello B1K3R,

    Here are the links you asked me and it's true that you have easier trying this:






    Megane trophy 2.02 :

    http://www.rfactorcentral.com/detail.cfm?ID=Megane Trophy

    Enduracer SP2 :

    http://dfiles.eu/files/pefke6etc


    F1RFT2012 :


    http://www.mediafire.com/download/hzugtoodh4rqa7y/F1RFT+2012+V2.RAR
    http://www.gphungary.hu/downloads/rFactor/tracks/F1RFT_2012_DRS_TrackPack_1.rar
    http://www.gphungary.hu/downloads/rFactor/tracks/F1RFT_2012_DRS_TrackPack_2.rar

    For F1RFT2012 if it is only for testing, you do not need to download both tracks packs

    thank you
     
  7. Adrianstealth

    Adrianstealth Registered

    Joined:
    May 28, 2012
    Messages:
    4,578
    Likes Received:
    1,072
    Fantastic !

    I'm starting to see the beauty in this now, separate display on a tablet is ideal , will give this a try when I get setup again , thanks!

    Happy days
     
  8. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    Yes, it works on a tablet too, like on any normal browser. I made all components (live timing, map, statistics, results etc) separate, so you can plug and play them as you wish in any html file if need be.

    I did in fact start a tablet app for this, but it's low priority for now.
     
  9. D34N0

    D34N0 Registered

    Joined:
    Oct 5, 2010
    Messages:
    22
    Likes Received:
    0
    Hey B1K3R,

    Your live timing plugin is really coming along. Looking great.

    But I have a HUGE favour to ask ;)

    The Hotlaps page is a little too broken down for what I was hoping.

    Currently it groups by mod, Track, Car, Driver, SessionType.

    For me, I'm not really worried about what mod was running or what the SessionType was. I'm after just a really simple leaderboard that groups by Track, Car, Drivers Best lap (and displays a little bit of info about that lap).

    I've got the SQL statement working. I just don't know how to put it into an ASPX page. That's the bit I was hoping you could help with if you have time (if not that's ok :) ).

    Here's the SQL

    Code:
    select 
    	  si.TrackCourse
    	, di.CarType
    	, si.SessionType
    	, di.DriverName
    	, sec_to_time(dl.Laptime) Laptime
    	, dl.SectorOne
    	, dl.SectorTwo
    	, dl.SectorThree
    	, dl.Fuel
    
    
    from 
    	driver_lap dl
    
    join
    	Driver_Info di
    	on dl.DriverID = di.ID and di.isPlayer = 1 and dl.Laptime = di.BestLaptime
    
    join 
    	Race_Info ri
    	on di.RaceID = ri.ID
    
    join 
    	Session_Info si
    	on ri.SessionID = si.ID
    
    join
    		(select 
    		  min(dl.Laptime) Laptime
    		, si.TrackCourse
    		, di.CarType
    		, di.DriverName
    		
    		from 
    			driver_lap dl
    
    		join
    			Driver_Info di
    			on dl.DriverID = di.ID and di.isPlayer = 1 and dl.Laptime = di.BestLaptime
    
    		join 
    			Race_Info ri
    			on di.RaceID = ri.ID
    
    		join 
    			Session_Info si
    			on ri.SessionID = si.ID
    
    		where
    			dl.Laptime <> 0
    
    		Group by
    		  si.TrackCourse
    		, di.CarType
    		, di.DriverName
    		) bl
    		
    		on dl.Laptime = bl.laptime and si.TrackCourse = bl.TrackCourse and di.DriverName = bl.DriverName
    
    
    where
    	dl.Laptime <> 0
    
    the results look like this

    HotLaps_Example.jpg

    Cheers,

    Dean
     
  10. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    No problem mate :)

    Would it be OK if I make a new page for you with this? As others like it with the mod etc. Then you just use the new page instead.

    What do you think?
     
  11. D34N0

    D34N0 Registered

    Joined:
    Oct 5, 2010
    Messages:
    22
    Likes Received:
    0

    yeah that's perfect, thanks B1K3R. I actually put a page together using PHP for now (I was just interested how to do it so thought I'd have a crack).

    So it's not that big of a rush. Would be nice for people to have a simple Leaderboard as well as more complex BestLap page.

    See here (I haven't styled it much) http://rf2.dean-and-lea.com/leaderboard.php

    Here's the code if anyone is interested :)

    Code:
    <html>
    <style type="text/css">
    table
    {
    font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
    width:70%;
    border-collapse:collapse;
    }
    table td, table th 
    {
    font-size:1em;
    border:1px solid #98bf21;
    padding:3px 7px 2px 7px;
    }
    table th 
    {
    font-size:1.1em;
    text-align:left;
    padding-top:5px;
    padding-bottom:4px;
    background-color:#A7C942;
    color:#ffffff;
    }
    </style>
    <body>
    <?php
    $username="MYSQLUSERNAME";
    $password="MYSECRETPASSWORD";
    $database="MYDATABASENAME";
    
    mysql_connect(localhost,$username,$password);
    
    @mysql_select_db($database) or die( "Unable to select database");
    
    $query="select 
    	  si.TrackCourse
    	, di.CarType
    	, si.SessionType
    	, di.DriverName
    	, sec_to_time(dl.Laptime) Laptime
    	, dl.SectorOne
    	, dl.SectorTwo
    	, dl.SectorThree
    	, dl.Fuel
    
    
    from 
    	driver_lap dl
    
    join
    	Driver_Info di
    	on dl.DriverID = di.ID and di.isPlayer = 1 and dl.Laptime = di.BestLaptime
    
    join 
    	Race_Info ri
    	on di.RaceID = ri.ID
    
    join 
    	Session_Info si
    	on ri.SessionID = si.ID
    
    join
    		(select 
    		  min(dl.Laptime) Laptime
    		, si.TrackCourse
    		, di.CarType
    		, di.DriverName
    		
    		from 
    			driver_lap dl
    
    		join
    			Driver_Info di
    			on dl.DriverID = di.ID and di.isPlayer = 1 and dl.Laptime = di.BestLaptime
    
    		join 
    			Race_Info ri
    			on di.RaceID = ri.ID
    
    		join 
    			Session_Info si
    			on ri.SessionID = si.ID
    
    		where
    			dl.Laptime <> 0
    
    		Group by
    		  si.TrackCourse
    		, di.CarType
    		, di.DriverName
    		) bl
    		
    		on dl.Laptime = bl.laptime and si.TrackCourse = bl.TrackCourse and di.DriverName = bl.DriverName
    
    
    where
    	dl.Laptime <> 0";
    
    $result=mysql_query($query);
    $num=mysql_numrows($result);
    mysql_close();
    ?>
    
    <table class="LeaderBoard">
    <tr>
    <th>
    <font>Track</font>
    </th>
    <th>
    <font>Car</font>
    </th>
    <th>
    <font>Driver</font>
    </th>
    <th>
    <font>Laptime</font>
    </th>
    <th>
    <font>S1</font>
    </th>
    <th>
    <font>S2</font>
    </th>
    <th>
    <font>S3</font>
    </th>
    <th>
    <font>Fuel</font>
    </th>
    <th>
    <font>Session</font>
    </th>
    </tr>
    
    <?php
    $i=0;
    while ($i < $num) {$f1=mysql_result($result,$i,"TrackCourse");
    $f2=mysql_result($result,$i,"CarType");
    $f3=mysql_result($result,$i,"DriverName");
    $f4=mysql_result($result,$i,"Laptime");
    $f5=mysql_result($result,$i,"SectorOne");
    $f6=mysql_result($result,$i,"SectorTwo");
    $f7=mysql_result($result,$i,"SectorThree");
    $f8=mysql_result($result,$i,"Fuel");
    $f9=mysql_result($result,$i,"SessionType");
    ?>
    
    <tr>
    <td>
    <font><?php echo $f1; ?></font>
    </td>
    <td>
    <font><?php echo $f2; ?></font>
    </td>
    <td>
    <font><?php echo $f3; ?></font>
    </td>
    <td>
    <font><?php echo $f4; ?></font>
    </td>
    <td>
    <font><?php echo $f5; ?></font>
    </td>
    <td>
    <font><?php echo $f6; ?></font>
    </td>
    <td>
    <font><?php echo $f7; ?></font>
    </td>
    <td>
    <font><?php echo $f8; ?></font>
    </td>
    <td>
    <font><?php echo $f9; ?></font>
    </td>
    </tr>
    
    <?php
    $i++;}
    ?>
    
    </body>
    </html>
    
     
  12. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
  13. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    Marc, I started testing the rFactor 1 Endurance and it worked perfectly with no errors.

    What error did you get? :confused:


    View attachment 8583

    [​IMG]
     
  14. LCCMarc

    LCCMarc Registered

    Joined:
    May 16, 2012
    Messages:
    56
    Likes Received:
    0
    Hello B1K3R,
    What I like about the error mod "Enduracer" was with MySQL, an error message but I do not know about what.
    On the mod Mod F1RFT there, it seems to work, but after a time, the server crash. and the mod Megane (note that the mod mégane the team cars behave in the name of "quotation marks"), the plugin showed well the state of the circuit but when a pilot came on the server, it was not clearly visible on the server status, he had a driver.

    I'll reinstall and retest with the mod endurance
     
  15. LCCMarc

    LCCMarc Registered

    Joined:
    May 16, 2012
    Messages:
    56
    Likes Received:
    0
    Hello B1K3r,

    Well, I reinstalled and retest the model Megane, same problem as mentioned above. For the mod Enduracer, it seems there is a problem when the session is saved with the "Auto Upload Results" checked. If you save without the box, it seems to work I tested for a two-hour race with AI. For RFT2012, not yet tried.
     
  16. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    Thanks. Can you send me the XML log files please. Only those from this week.

    Cheers
     
  17. LCCMarc

    LCCMarc Registered

    Joined:
    May 16, 2012
    Messages:
    56
    Likes Received:
    0
    Hello B1K3R,

    Here is the link to the XML: Log xml.rar - 529 KB

    For Enduracer, I think the problem is solved by re just starting my machine, but I retesterai with real pilots
     
  18. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    Thanks :) I'll give them a test sometime this weekend.

    Cheers
     
  19. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    Updates coming to the live timing this week:

    1. Currently, if a driver leaves in mid session, the hotlaps are not recorded since they are not present in ISI xml log. The system has now been updated to record the hotlaps (best time, speed etc) during a session, regardless if driver leaves before end of session. This data is then merged with the results/statistics if not present in xml log

    2. User will be able to zoom maps in and out and saved for his/her preference (using cookies). Map can also be dragged around. If too big, it might disappear, but look at the bottom of the page :) You can check it out here:

    3. Hotlaps page as requested by Dean

    4. Some bugs and fixes

    Map Zoom:

    View attachment 8654
    [​IMG]
     
    Last edited by a moderator: Oct 28, 2014
  20. LCCMarc

    LCCMarc Registered

    Joined:
    May 16, 2012
    Messages:
    56
    Likes Received:
    0
    Hello B1K3r,
    Have you tried with three mods?
     

Share This Page