You are not logged in.
The forum is now configured for sending mails. So you can subscribe to topics and get informed via mail.
We are currently implementing and testing a simple and lightweight player ranking system.
The official HoldingNuts game-server is already running a development snapshot which makes this feature available (and works with current client version 0.0.5). The system uses the client's generated UUID to identify the player and stores its score in a database. You can view the ranking on this website.
For the next release the HoldingNuts client will ask on its first start whether the user wants to generate a UUID or not. If you don't want to participate in the ranking (may it be privacy concerns - although no private data is stored), you need to unset the UUID in your settings (however, the client reconnect feature won't work without it!).
New Gentoo SVN snapshot ebuild
If you're using Gentoo Linux you might be interested in our holdingnuts snapshot ebuild, which allows conveniently building a snapshot from our SVN repository.
Offline
Is it possible to get a copy of the server snapshot and website code for testing?!?
I'm running a server for our local players here in Northern Ireland and the feedback I'm getting is that a leaderboard on our website would make things a lot more interesting.
If not, when do you expect to release the next server version?!?
Thanks,
Kieran
Offline
Hi Kieran,
you can always compile the sources on your own. The so-called trunk of our source-code repository contains the latest version. If you're unable to compile, contact me via email and I'll send you an (unsupported) binary of the latest server.
About the website code: I recently released some of our website code for the statistics in the forum. But the code for the ranking system is somewhat dependent on our whole website (and I don't like to disclose the current php-code (for security reasons). However, it's quite simple code. Here's the idea behind it:
$db_file = '/home/holdingnuts/.holdingnuts/server.db';
$dbh = new PDO("sqlite:$db_file");
$sql = 'SELECT uuid,name,gamecount,ranking,t_lastgame
FROM players
ORDER BY ranking DESC, t_lastgame DESC, gamecount DESC';
foreach ($dbh->query($sql) as $pstat)
print_r($pstat);The server (development version, trunk) writes the ranking into a SQLite database file. This file is read by PHP's Data-Object layer using a trivial SQL query.
Hope this helps you for the start.
Offline
Big thanks for useful info!
Offline
Can some one help me , as i have no idea how to make a stats page with this & the other code on the forum.
Tx
Offline
rascalli wrote:
Can some one help me , as i have no idea how to make a stats page with this & the other code on the forum.
Do you want to build a stats-page OR a ranking-page? For stats-page this is the wrong code; have a look at this one.
You'll need a running holdingnuts-server, a webserver running PHP and customizing the mentioned script.
Does that help?
Offline
I would like a ranking system like you have here : http://www.holdingnuts.net/ranking
Would be only like 20 members, as it's for some friends overseas
but unfortunately I have much idea about code & php
So I tried the php in : http://www.holdingnuts.net/forum/viewto … d=130#p130
But that does nothing for me .. and I had no idea what to do with the "code" that is posted there
So hopefully you can help
Offline
rascalli wrote:
So I tried the php in : http://www.holdingnuts.net/forum/viewto … d=130#p130
But that does nothing for me .. and I had no idea what to do with the "code" that is posted there
This is the code for displaying simple server stats (top-right corner on main-page of this website).
What you need is:
- An own running holdingnuts game-server. The ranking-system isn't included in release 0.0.5 but in current trunk (development-version). So this might be a problem, as there are no prebuilt-binaries. Either you try to compile your own or contact me via mail
- A webserver with PHP (which runs on the same host as the game-server!)
- The PHP code-snippet in THIS thread. You might need to customize some things (e.g. path of the sqlite3 database file).
Please have understanding that this all isn't that easy to setup, but the ranking-system isn't (yet) an official feature of the server. The main purpose was to have a simple ranking for our game-server.
Offline
I have compiled the source from latest svn & it is running
Webserver is also set-u with php.
What do I do with the PHP-code snippet in THIS thread, where do I place it ?
Offline
rascalli wrote:
What do I do with the PHP-code snippet in THIS thread, where do I place it ?
It depends on your setup. Lets say:
- you're using a UNIX-like OS (e.g. Linux)
- you're running the game-server (compiled from trunk and with sqlite3-feature) as user "holdingnuts" -> this means that the database-file is stored in /home/holdingnuts/.holdingnuts/server.db (by default)
- your webserver-root is /var/www -> copy the code snippet to a text file and name it /var/www/ranking.php
- you might need to enable sqlite3 support for PHP as well
$db_file = '/home/holdingnuts/.holdingnuts/server.db';
$dbh = new PDO("sqlite:$db_file");
$sql = 'SELECT uuid,name,gamecount,ranking,t_lastgame
FROM players
ORDER BY ranking DESC, t_lastgame DESC, gamecount DESC';
foreach ($dbh->query($sql) as $pstat)
{
// DO SOMETHING USEFUL WITH EACH ENTRY HERE
print_r($pstat);
// echo $pstat['ranking'];
// uuid is the identifier
// name is the nickname
// gamecount is the number of games the player was involved
// ranking is the current ranking
// t_lastgame is the date of the last game played
}This example code intentionally doesn't include error-/exception-handling and doesn't include cosmetics used on our site in order to keep things simple. Of course you need to customize this script to actually display the ranking.
foreach ($dbh->query($sql) as $pstat)
{
echo "Player " . $pstat['name'] . " has ranking " . $pstat['ranking'] . " and has played " . $pstat['gamecount'] . " games.";
}Hope this helps.
Last edited by datag (2010-06-08 23:24:24)
Offline
Tx for the help , but unfortunately somewhere i do something totally wrong.
As it does not work for me , might be because I am just a noob with linux ;-)
I guess I need to wait till this is included
Any idea on a time line ?
Offline
rascalli wrote:
Tx for the help , but unfortunately somewhere i do something totally wrong.
As it does not work for me , might be because I am just a noob with linux ;-)
What exactly is the problem/error?
rascalli wrote:
I guess I need to wait till this is included
Any idea on a time line ?
Well, at the moment there isn't any development in progress and there is no schedule for a next release. Maybe another dev will be working on this again, but nothing's sure.
Offline
Well basicly I have no idea what to do to make a page that shows stats/ranking from the players.
The database is in : /home/holdingnuts/
But how to make a webpage that reads into that and converts it to statistics ?
Offline
rascalli wrote:
But how to make a webpage that reads into that and converts it to statistics ?
Just copy&paste this code into a file "ranking.php" and place it into your www-root.
<?php
$db_file = '/home/holdingnuts/.holdingnuts/server.db';
$dbh = new PDO("sqlite:$db_file");
$sql = "SELECT
uuid,name,gamecount,ranking,t_lastgame
FROM
players
WHERE
name NOT LIKE '__unknown__'
ORDER BY
ranking DESC, t_lastgame DESC, gamecount DESC";
?>
<table border="1">
<thead>
<tr>
<th>Name</th>
<th>Games played</th>
<th>Ranking</th>
</tr>
</thead>
<tbody>
<?php foreach ($dbh->query($sql) as $pstat) : ?>
<tr>
<td><?php echo htmlentities($pstat['name']); ?></td>
<td><?php echo $pstat['gamecount']; ?></td>
<td><?php echo $pstat['ranking']; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>Offline
You're the best .. tx .. that did it
Offline
someone build me please client and server for windows with ranking system and send me an e-mail.
r5i.alexey@yandex.ru
thanks
Offline
There's a Windows build of revision 750 for the server (including ranking-support):
http://download.holdingnuts.net/builds/ … -win32.zip
You can use the released 0.0.5 client with this one.
Please note that this is not a release and there's no support for it.
Offline
Error opening database ![]()
How to fix?
Offline
r5isc wrote:
Error opening database
How to fix?
Some more information would be helpful. I tested the build on Windows XP and Windows 7. You need to extract all files (the *.dll files need to be in the same directory).
And you need write access to the %APPDATA%\HoldingNuts directory.
Last edited by datag (2010-07-22 21:16:22)
Offline
I have a Windows 2003 Server.
Perhaps because of this error?
At home computer everything works ...
Last edited by r5isc (2010-07-22 22:11:31)
Offline
r5isc wrote:
I have a Windows 2003 Server.
Perhaps because of this error?
At home computer everything works ...
I'm not sure. You could try to run holdingnuts-server.exe from the command-line.
Assumption: You extracted the contents of the ZIP to C:\
> C: > cd \holdingnuts-server-r750-win32 > mkdir config > holdingnuts-server.exe -c config
Offline
Thank you all running!
Offline