Minetest statistics

Post Reply
Reedych
Member
Posts: 58
Joined: Wed Aug 03, 2016 08:09
GitHub: SlackCoyote
In-game: SlackCoyote

Minetest statistics

by Reedych » Post

Hello, I've made a MT statistic graph for 10 hours:

Image

As you see, online varies between 275 and 500 players. It's good online for open source game.

This statistic is made using php and gnuplot:

Code: Select all

#!/usr/bin/php7.0
<?php
const OUTPUT = 'data.dat';
const WAIT_TIME = 3600; // 3600
const SERVERLIST = 'http://servers.minetest.net/list';
const DEBUG = true;
const REWRITE = true;

if (!file_exists(OUTPUT))
        $ob_write_header = true;
else
        $ob_write_header = false;

if (REWRITE)
        $ob_write_header = true;

if (REWRITE)
        $fp = fopen(OUTPUT, 'w');
else
        $fp = fopen(OUTPUT, 'a');
if ($fp == FALSE)
        die("Can not open .dat file");
if ($ob_write_header)
        fwrite($fp, "##time clients servers\n");

if (DEBUG)
        echo "Cycle started\n";

date_default_timezone_set("UTC");

while (true) {
        $raw = file_get_contents('https://servers.minetest.net/list');
        if ($raw == FALSE)
                die("Serverlist is not available");
        $raw = json_decode($raw);
        if ($raw == NULL)
                die("Incorrect data");

        $time = time();
        $clients = $raw->total->clients;
        $servers = $raw->total->servers;
        $ready = "{$time} {$clients} {$servers}\n";
        fwrite($fp, $ready);

        if (DEBUG)
                print("Wrote: {$ready}");

        sleep(WAIT_TIME);
}
?>

Code: Select all

#!/usr/bin/gnuplot
reset
set terminal png
set style data linespoints
time = time(0);

plot "data.dat" using (($1-time)/3600):2 title "Minetest Clients"

Slackware64 14.2, MT 0.4.16. My best mod.

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Minetest statistics

by Krock » Post

I also did some fetching of the server list. Here's the popularity of mods used on the announced servers, whereas the player count for each mod is the sum of online players on a server with this particular mod installed.
Data sorted using the formula: 2 * [players on server with mod] + [servers using the mod]

Image
Attachments
test2.png
test2.png (116.51 KiB) Viewed 1542 times
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
domtron vox
Member
Posts: 111
Joined: Thu Feb 20, 2014 21:07
GitHub: DomtronVox
IRC: Domtron
In-game: Domtron

Re: Minetest statistics

by domtron vox » Post

@Krock is your list all mods that are used on all (announced) servers or is there some sort of threshold for either number of servers using a mod or number of clients on a server? I.E is the above list all mods used on servers or just the most used mods on the most popular servers.

Also I noticed default wasn't on the list. I would assume it would be at the top. Did you just remove it or is something else going on?

Just curious. Interesting stuff there.

Thanks!

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Minetest statistics

by Krock » Post

domtron vox wrote:is there some sort of threshold for either number of servers using a mod or number of clients on a server?
All mods which had their value (2 * [players on server with mod] + [servers using the mod]) less than 20 were sorted out. That's a magic number but I had to set a lower limit to not end up with an extra tall list.
domtron vox wrote:Also I noticed default wasn't on the list. I would assume it would be at the top. Did you just remove it or is something else going on?
Almost all minetest_game mods would be on top of the list, so I blacklisted them to show the interesting/relevant mods here.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

Re: Minetest statistics

by Festus1965 » Post

Krock wrote:
Sat May 12, 2018 13:06
I also did some fetching of the server list. Here's the popularity of mods used on the announced servers, whereas the player count for each mod is the sum of online players on a server with this particular mod installed.
...
Can you update or share the code to read it out again as update?
Maybe have to separate mt, from MC and MClone also similar to further ...
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: Minetest statistics

by runs » Post

It is very suspicious that Petz does not appear on that list. It is one of the most popular mods by the way.

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Minetest statistics

by rubenwardy » Post

runs wrote:
Mon Feb 13, 2023 15:08
It is very suspicious that Petz does not appear on that list. It is one of the most popular mods by the way.

Those lists are from may 2018. Petz's first commit was March 2019. So it didn't exist at the time.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
Wuzzy
Member
Posts: 4788
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: Minetest statistics

by Wuzzy » Post

It would be nice to see a new version of the stats.

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: Minetest statistics

by 56independent_actual » Post

I have an intresting idea. We take hourly downloads of the servers.minetest.net/list page and allow people to download these archives?

And then people can download them and perform analysis. I could set it up with crontab on my designated 24/7 machine right now and then begin hosting live statistics, just like Rubenwardy does with their contentDB.

I'm just wondering how important this analysis will be for the community.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests