Gerhard Potgieter

The Ultimate Kloon

Nadeo recently launched TrackMania Nations Forever (TMNF), the successor of their previous free racing game TrackMania Nations (TMN).

Being part of CTWUG we have a few avid gamers on the network and one of the games we played allot was TrackMania Nations (TMN). So with the new TrackMania Nations Forever (TMNF) I thought I would give it a go and set up a server, and as with every game on the network users prefer a stats page aswell. So after searching high and low on the web I couldn’t find a stats solutions for TMNF that produced stats based on real time results, the closest I got was TMOS - TrackMania Offline Server, so the obvious thing to do was write my own solution.

Running a dedicated TMNF server required ASECO, Automatic Server Control, to generate statistics in realtime to a online database or local database. It took me about 2 days of programming to get a stable running bug free site. I called it AsecoStats cause it is based on the Aseco 2.1.4 for TMNF.

The index page displays live server stats like how many players are currently online, current track, list all player names and best times that are currently online aswell as the Author records aswell as the best time for the track.

AsecoStats Index Page

The Players page displays all the current players that ever played on the server aswell as their total wins and total time played on the server.

AsecoStats Players

When you click on the player name you will be transfered to a page detailing all the tracks the player has ever raced aswell as their best time for each track and poll position

AsecoStats Player Statistics

On the Tracks page is a list of all the challenges (tracks) ever played on the server with their author, best time and what player achieved this time.

AsecoStats Tracks Page

When you click on the track name you will be transfered to a page that details all the players that ever played that track aswell as their poll position and their time.

AsecoStats Track Details

This is all I did for now as this is the first beta version (v. 0.9b), and what the users wanted to see for now. The pages is written in php and utilizes Aseco 2.1.4 for TMNF’s mysql database. I haven’t decided on a license for it yet but if interest is big enough I will possibly release this under GNU.

For the next release I’m looking into a point system so users can get a overall server position and not just per track. Please leave your comments as to what you guys think of this and any suggestions is also welcome.

  1. Jaypsi Said,

    Nice work. For the overall server position, you could always use the rs_rank table that Aseco uses to calculate the server rank. If you order the results by the avg column, you get the playerIDs in rank order. You get the actual average by dividing the avg column by 10000.
    It is useful to cache these ranks in an associative array with playerID=>(rank, avg). Then, when creating the players list, you can check if the playerID exists in the cache (not everyone gets ranked) and display the rank and average.
    This way Aseco will always keep the ranks up to date and there is no need to do your own calculations.

  2. Gerhard Said,

    Thanks Jaypsi, I actually found that Aseco has a plugin that calculates the server rank. Using that now to calculate the server rank. Will post a updated version of AsecoStats as soon as I finished dev on it.

  3. azalin Said,

    Hey,

    is this downloadable .. or still in dev ? Very good idea to make it though :)

  4. Gerhard Said,

    I have a beta release, will try and upload before the weekend.

  5. azalin Said,

    awesome stuff mate !

    Really like the idea for keeping time records… top positions style setups :)

  6. azalin Said,

    *patiently waiting*

    lol.. keen to get some stats goin for our tm :)

  7. Petervs Said,

    any chance of a release ??
    :)

  8. johan Said,

    i cant get this to work. can you write a manual? i have tested to change in index på its say no connection.

Add A Comment

Subscribe to Gerhard Potgieter