The online racing simulator
Searching in All forums
(251 results)
HorsePower
S3 licensed
Wow, I would not have expected that many issues. You seem to have quite a special system there. But it's good, because it reveals all the potential errors.

I'll check it tonight or tomorrow ... If we can get this running for you, it seems to me that we can run it on any server ...
HorsePower
S3 licensed
The $_SERVER["PHP_SELF"] should work, can you replace the $PHP_SELF by $_SERVER["PHP_SELF"], please?

As far as I know the $PHP_SELF is not always defined ...

If this works, I will fix it soon.
HorsePower
S3 licensed
Thanks for the info, that is easily changed ...

EDIT: Ok, removed the private keyword for class variables ... no time to do it for the methods. I will take a more thorough look at the weekend.
Last edited by HorsePower, .
HorsePower
S3 licensed
Too bad. That would have been the easy way (and I didn't want to hurt your feelings, I think everyone using the tracker has to be very smart ).

I will try it tomorrow myself on my private homepage. (Unfortunately I have to race now in the City Liga).

@Community: Has anyone else experienced similar problems?

EDIT: A quick googling let's me think it could be a PHP4 problem. Might well be that you have to use PHP5 for the tracker (I really didn't take too much care about PHP versions ...) You have written above, that you also have PHP5 available? (At the GGC we have version 5.2.6 and it runs fine, just installed yesterday)

EDIT: If this is the case, I will try to find out what causes the incompatibility with PHP4. But I cannot guarantee that I can change it (but I will try). Might well be that we have to rename this thread into PHP5 only ...
Last edited by HorsePower, .
HorsePower
S3 licensed
Can you check if you have forgotten any " when you edited the config.php?

As far as I can see, there's no error in the code at the line. But PHP often is kind of "silly", which here could mean that in fact it could be a mistake in the config.php, which is included in hottrackkerdb.php. PHP supports double- and single quotes for strings.

And the config.php is the only file that needs manual changes, so I would strongly recommend taking a very close look on the syntax of the parts that you entered there (which should be the definition of the constants LINKBASE, IDKEY and the MySQL stuff).

It could also be a good idea to edit the config.php in an editor with syntax highlighting.

If this doesn't solve your problem, we can discuss further.
Last edited by HorsePower, .
HorsePower
S3 licensed
I just saw that there is a default server configuration missing in the the ZIP. I will add this tonight.
HorsePower
S3 licensed
It's done ... for now. Have fun and be gentle
PHP4/5, MySQL - HoT Tracker - PB/HL tracker, online racers, host status and more ...
HorsePower
S3 licensed
Dear Racers,

all's well that ends well. At least I hope so with regard to the new HoT Tracker.

Here it is - maybe it's not yet where I want it to be once, but at least you have something that should be working and useful.

The HoT Tracker is basically a package of PHP scripts providing a framework to access LFS World information and display them easily on any web site. Up to now, the HoT Tracker provides you with lists of online racers, host status and - of course - the tracker list, i.e. the list of personal bests / hotlaps for a given car/track combination.

The installation of the HoT Tracker should be quite easy, but requires a web space with PHP and MySQL support. Apart from that you also need a valid LFS World Pubstats Access ID Key to retrieve any data from LFS World.

If you do not fulfill these requirements, you might as well use any existing HoT Tracker installation as service provider - of course this requires the IP of your web space to be unlocked in the specific installation.

For example in the German Gamers Club we have several LFS teams (Hell on Tyres, Rising Suns Motorsports, ...). There's one central installation of the tracker at http://tracker.g-g-c.de which the teams could use as service provider.

Nearly all features and data of the tracker can be maintained via a web interface (the so-called control center).

For more information on the tracker, consider the documentation (which is contained in the ZIP) or download the package and try it out.

The HoT Tracker download link is: http://upload.g-g-c.de/tracker/hottracker.zip

The HoT Tracker documentation can be found at: http://upload.g-g-c.de/tracker/documentation.pdf

EDIT: Updated the documentation (data directory must allow write access). Added default server configuration and a style for the serverstatus. Removed the .sql-file (which is not needed, since the tracker creates the tables itself).

EDIT 26.03.09: Uploaded new ZIP. Now the various Notices should be gone. Several bugs fixed. MySQL tables will now be created with indizes for faster access (if you update, you should drop all tracker tables first, sorry for the inconvenience)

EDIT 09.04.09:Uploaded the latest version of the tracker and removed the beta tag.


EDIT 14.06.09:Fixed some character-encoding problems in connection to MySQL DB. Characters like "ü" where not written to DB correctly.

Best regards and have fun,

Timo

PS: I will try to give some support and if you have questions you can post them right here. However, at least for the german community (and for the english speaking folks I would also recommend this) there is the Official Support Forum within the GGC Forums. Please use that forum over there because I will most likely not check out all forums frequently.

But of course I will keep this thread up-to-date whenever there are new releases or any other important news.
Last edited by HorsePower, .
HorsePower
S3 licensed
No problem mate,

btw, the new tracker will use the 1.8 version, since for 1.9 the returning arrays have changed a bit (e.g. you already convert team bits in the SDK). Since I store the team bits on DB level in the tracker, I didn't want to change and test everything again.

Other than that I did some modifications on the SDK to better suite my purposes.

But of course I recommend to use your SDK (in what version ever).
HorsePower
S3 licensed
This is just to inform you that I'm currently writing the documentation. The tracker is finished so far ... so expect it to be released on the weekend or during next week.

This weekend it is planned to run some final installation tests which I expect to run fine.

It will be released as BETA since I think there will some minor bug fixing to be done.
HorsePower
S3 licensed
There's a bug in the function get_teams.

Instead of

<?php 
$result
[$i]['info'] = $this->convert_team_bits($data['bits']);
?>

it has to be

<?php 
$result
[$i]['bits'] = $this->convert_team_bits($data['bits']);
?>

Regards,

HorsePower
HorsePower
S3 licensed
Thank you for your understanding, Victor.

Clearly, writing a message to 1000+ people (and getting a few hundred answers in return and checking them all) is a huge task and I can understand that this might not be an option.

So I'm now happy when you will consider activity as well in the future. And if the process of team clean-up is on-going you might also be able to send a few messages - not requesting an answer but simple a note that says something like "Hey your URL is wrong and/or your team members are inactive for several weeks now. Be aware that your team will be deleted by ... if until that point in time your URL is still invalid and no member are active in the mean time".

Nevertheless I would also have appreciated a forum announcement regarding the mass-deletion of teams.

So, I will now register the team again ... file closed as far as I'm concerned.

Kind regards,

Timo

EDIT: Registration has been send.
Last edited by HorsePower, .
HorsePower
S3 licensed
Well, the URL (the one that can be found in my sig) in fact worked until a few days ago, when the team hosting organization (the german gamers club) changed it's servers.

Believe it or not, it was just today that I learned that the URL was not reachable anymore. (Because I already assumed that you had used this as selection criterion).

So apart from the coincidence factor which comes in here I really do not see why a wrong URL is a reason to delete a whole team entry in LFS World. What about teams not even having any URL?

I think the activity of the the official members of a team is a criterion which is much more significant.

And even then, when it is found that all members of an existing team had been inactive for a while, it would be good idea to contact the team administrator before deleting a team.

If you get no answer of the adminstrator in a short time, it might be justified to delete a team.

Of course this is not as easy as looking at a URL, but I wonder how many other racers out there will find their team being deleted.

At least I would have appreciated some kind of announcement from your side, so that people have the chance to check their URL.

As for Rising Suns Motorsport, their homepage has been hosted by a free-of-charge provider which seems to be down meanwhile. The responsible person is inactive since a year, but many team members are still active but do not have sufficient knowledge or permissions to handle the situation immediately.

So all this seems to tell me: Life isn't always as easy as looking at a URL and concluding that a team is no longer existing if the URL is invalid.

I appreciate your work Victor and I'm trying not to be too offensive here. But I had to say these things and I hope you understand my point.

Yours sincerely,

Timo
HorsePower
S3 licensed
To be honest, I'm not amused. :arge:

Victor, how did you decide on which teams to delete?

I know of 3 teams that have mistakenly been deleted (because they have active team members).

My own team including ...
  • Hell on Tyres (ID 137)
  • Rising Suns Motorsport (ID 509)
  • Majestic Dragon Drivers (ID 478)
I was the one with administration rights for Hell on Tyres.

Please bring them back to life again!

Kind regards and many thanks,

Timo
HorsePower
S3 licensed
Hi Victor,

if you really plan to change output formats, I would prefer a new URL and a parallel availabilty of 1.4 and 1.5 for some time.

This would give us the chance to work on our tools while they are still running with 1.4.

Thanks!
HorsePower
S3 licensed
Not recently, unfortunately. As I said in another thread in this forum, there is only very little to do (besides the documentation).

I will abandon the event-stuff that I had in mind for the first release.

At the moment I have to deal with real life issues (normal things such as much work, taking care of wife and daughter ... it's winter time and we get a lot of bad colds).

So I'm sorry that I cannot say anything else than I will finish it soon ...
HorsePower
S3 licensed
Me too! Who is it in the GIF? What movie? Details please!
HorsePower
S3 licensed
Quote from GeForz :

He did the calculations!

You are a genious! Well done!
HorsePower
S3 licensed
The old HoT Tracker is indeed kind of outdated. The good thing is that it didn't need MySQL if you only wanted to show online mates and server status.

Currently I'm developing a new release of the HoT Tracker which is much bigger (and needs MySQL), but should be easier to install and to use.

The real benefit of it is that someone can install it and others can use the functionality (e.g. server status) remotely! Currently I'm running kind of a beta test, i.e. I have the new tracker running on my private webspace and my clan is using the remote server status (simply including a script).

This is what the server status now looks like:

http://www.g-g-c.de/index.php?uid=server&show=lfs

The new tracker allows to configure the look of the server status (i.e. which fields to display, which texts to show) individually. The same holds for colors.

The new tracker should have been released already but as you might know, real life is more important and recently I had not much time to finish the remaining 5% of the tracker. Very few things need to be done (including documentation), so I hope I will be able to release it during march. But don't nail me down in that.
HorsePower
S3 licensed
Practice offline to learn the tracks.

Subrscribe to some league. Practice for the league races. Participate in the league races. Have fun with that. Win. Become famous.
HorsePower
S3 licensed
I think it's a legal question - even if this is private information which we should not be concerned about.

Honestly, who really believes that Eric is working 200 days per year, 8 hours per day on new tracks and cars? If this was true, we would have 20 tracks and 50 cars in LFS by now.

It is well known that Victor has started this LFS merchandising project, so I guess also Eric might do something else. As far as Scawen is concerned I believe he really only works on LFS (and his house and family, which I personally think is ok if LFS pays him enough to have this much "spare" time).
HorsePower
S3 licensed
I just took a quick look.

But since I am using the 1.8 version of your SDK in which I already found some issues, I checked these things in 1.9 and here is my first result:

Number format of lap times didn't work for me so I changed it to %05.2f

<?php 
    
function convert_lfsw_time($time) {
        return 
sprintf('%d:%05.2f'floor($time 60000), (($time 60000) / 1000));
    }
?>

Then, in the flag-conversion method, I missed some flags (SHIFTER and AUTOCLUTCH)


<?php 
    
function convert_flags_hlaps($flags_hlaps) {
        
$data = array();
        if (
$flags_hlaps 1)        $data[1] = 'LEFTHANDDRIVE';
        if (
$flags_hlaps 2)        $data[2] = 'GEARCHANGECUT';
        if (
$flags_hlaps 4)        $data[4] = 'GEARCHANGEBLIP';
        if (
$flags_hlaps 8)        $data[8] = 'AUTOGEAR';
        if (
$flags_hlaps 16)        $data[16] = 'SHIFTER';
        if (
$flags_hlaps 64)        $data[64] = 'BRAKEHELP';
        if (
$flags_hlaps 128)        $data[128] = 'AXISCLUTCH';
        if (
$flags_hlaps 512)        $data[512] = 'AUTOCLUTCH';
        if (
$flags_hlaps 1024)    $data[1024] = 'MOUSESTEER';
        if (
$flags_hlaps 2048)    $data[2048] = 'KN';
        if (
$flags_hlaps 4096)    $data[4096] = 'KS';
        if (!(
$flags_hlaps 7168))    $data[7168] = 'WHEEL';
        return 
$data;
    }
?>

Furthermore, as far as I understood it, I think some of these flags might already be obsolete. According to Victors post we have

<?php 
        1 LEFTHANDDRIVE
        8 AUTOGEAR
        16 SHIFTER
        64 BRAKEHELP
        128 AXISCLUTCH
        512 AUTOCLUTCH
        1024 MOUSESTEER 
*
        
2048 KN *
        
4096 KS *
        (*) if 
not 10242048 or 4096steering is wheel.
?>

Then I didn't like these flag-identifier too much, so I added a function exporting a simple string of letters (which are commonly used I guess):

<?php 
    
function convert_flags_hlaps_to_letters($flags_hlaps) {
        
$string "";
        if (
$flags_hlaps == "" || $flags_hlaps == 0) return;
        if (
$flags_hlaps 1024)    $string .= "M ";
        if (
$flags_hlaps 2048)    $string .= 'Kn ';
        if (
$flags_hlaps 4096)    $string .= 'Ks ';
        if (!(
$flags_hlaps 7168))    $string .= 'W ';
        if (
$flags_hlaps 1)        $string .= "L ";
            else                    
$string .= "R ";
        if (
$flags_hlaps 2)        $string .= "cc ";     // obsolete?
        
if ($flags_hlaps 4)        $string .= "cb ";     // obsolete?
        
if ($flags_hlaps 8)        $string .= "A ";     // Autogear
        
if ($flags_hlaps 16)        $string .= "S ";        // Shifter
        
if ($flags_hlaps 64)        $string .= "bh ";    
        if (
$flags_hlaps 128)        $string .= "cl ";    // Axisclutch (pedal)
        
if ($flags_hlaps 512)        $string .= "ac ";    // Autoclutch
        
return $string;
    }
?>

In your 1.8 version I introduced an optional parameter in the constructor that allows me to avoid the initial 6 second sleep for the first query (of course this should only be used when one is sure to have waited that time before).

So here is my old modification:

<?php 
    
private $timestamp ,
            
$query;
    
    
// Constructor
    
function LFSWorldSDK($idk$ps false$initial_sleep true ) {
        
$this->ps $ps;
        
$this->idk $idk;
        
$this->compression = (function_exists('gzinflate')) ? 0;
        
$this->timestamp time( );
        if (
$initial_sleep == false// this will cause the first query to be done immediately 
            
$this->timestamp -= 5
    }
    
// Core Functions.
    
function make_query($qryStr$file 'get_stat2.php') {
        if (!
$this->ps){
            
$delta time( ) - $this->timestamp;
            if (
$delta 5)         // only sleep if necessary ...
                
sleep($delta);  // ... and only as long as necessary (up to 6 seconds because 5 will fail occasionally)
            
$this->timestamp time( );
        }
        
$data = @file_get_contents("http://www.lfsworld.net/pubstat/{$file}?version=1.4&idk={$this->idk}&ps={$this->ps}{$qryStr}&c={$this->compression}&s=2");
        
$data = ($this->compression) ? gzinflate($data) : $data;
        
$data unserialize($data);
        if (
is_array($data)) return $data;
        return array();
    }
?>

I like the error handling of your new version:

<?php 
    
function make_query($qryStr) {
        if (!
$this->ps)
            
sleep(6);
        
$data file_get_contents("http://www.lfsworld.net/pubstat/get_stat2.php?version=1.4&idk={$this->idk}&ps={$this->ps}&c={$this->compression}&s=2{$qryStr}");
        if (
$this->compression)
            
$data gzinflate($data);
        if (
$this->is_lfsw_error($data))
            return 
$this->make_query($qryStr);
        
$return = @unserialize($data);
        if (
$return === FALSE)
            return 
$data;
        else
            return 
$return;
    }
    function 
is_lfsw_error($data) {
        if (
$data == 'can\'t reload this page that quickly after another')
            return 
TRUE;
        else
            return 
FALSE;
    }
?>

BUT, you really shouldn't call make_query within itself without any fallback, because you could easily end up in an endless-loop.

So I would suggest you introduce some counter or whatever to end that loop after X loops if necessary (just keep in mind that LFS-World could be down or whatever).

I will try to use the 1.9 version in my new HoT Tracker (maybe having it modified a little bit).

Great work!

HorsePower
Last edited by HorsePower, .
HorsePower
S3 licensed
Hi there,

I though it is time to give a status report on the project.

Unfortunately it still takes me longer than I expected (since I have had not much time for developing the last two weeks). Some testing is going on but a few features are still missing. I will make no predictions anymore since they always are wrong.

So let's keep it as the LFS developers: When it's done, it's done.

But it's a matter of a few weeks, not a few months ...

I append some screen shots that show the current look of the main menu and the tracker list test page.

If you do not understand the meaning of some of the menu items, feel free to ask.

Kind regards,

Timo
HorsePower
S3 licensed
I just want to give a proof of life.

Nearly all features are implemented by now, some sort of "closed beta testing" is done at the moment.

There are just a few feature that I still have to implement: Event/League Management, some general options and last, but clearly not least: The documentation.

In fact, the HoT Tracker v2.0 has grown so big that it will be hard to see all the features without any documentation. Installation is not the problem, I guess, but you can maintain nearly everything via web (From LFS-Color replacement to the list of supported cars/tracks, know racers, ingame tags and names, table styles, configurations for online mates, server status and tracker lists ...)

So I really need to write something about the supported features.

The basic idea still is:
  • One super user can exclusively set up styles and configurations and maintain the user database.
  • Administrators can maintain groups and racers and events.
  • Event Managers can maintain events.
  • User can maintain their own ingame namem their own personal information and password.
  • Everyone is allowed to use the tracker features, i.e. everyone can inlcude the scripts generating the output (online mates, server status, tracker list).
So the registered users can maintain the content and the look of the features covered by HoT Tracker, the output can be included everywhere (even remote) by using the generic scripts.

The PHP function to use in order to include the generated output on one's web site is file_get_contents (just similar to the method used for retrieving LFSW data).

Give me another two weeks for testing, implementing the final features and writing some documentation. Then I will release all my stuff right here.

(Well, I hope it will be used at all out there ...)
Last edited by HorsePower, .
HorsePower
S3 licensed
I don't like the idea of releasing an alpha version. At the moment there's a lot of code for the backend and the control center, but not much for the "end user".

On top of that I'm re-implementing already some stuff which I have implemenented at the end of last year.

This project is a bit "dirty". Normally a developer has to sit down and start thinking for a long time about what he will do and how. That is, it all starts with a specification which will result in a design which will result in an implementation. After that comes testing.

Unfortunately, that's not how I work (well, at least for my spare time projects). I think only for a rather short time, start implementing and see what comes out. The price I pay is recoding some old stuff from time to time.

When I'm finished, I will release it for testing. Give me two more weeks.
FGED GREDG RDFGDR GSFDG