fodev.net

FOnline Development => Share Your Work => Topic started by: Wipe on April 18, 2014, 03:01:14 pm

Title: FOnline status
Post by: Wipe on April 18, 2014, 03:01:14 pm
FOnline status
http://fodev.net/status/ (http://fodev.net/status/)

(http://fodev.net/status/fonline.png) (http://fodev.net/status/)

FOnline servers monitor, working as extension for ServerBoy (http://www.riget.info/index.php?page=fonlineProjects) by Cpt.Rookie (http://fodev.net/forum/index.php?action=profile;u=22) and Vaultman (http://fodev.net/forum/index.php?action=profile;u=337), adding few own features (more informations about ServerBoy can be found here (http://fodev.net/forum/index.php/topic,9231.0.html)). Main differences include:

Current list of servers has been build basing on threads in FOnline-related forums (fodev.net (http://fodev.net/forum/index.php/board,52.0.html) and fonline.ru (http://fonline.ru/forum/forums/62/)), list of servers tracked by ServerBoy and fonline-status.ru (http://fonline-status.run/) (site has closed (?) during development stage of the project), ModDB page (http://www.moddb.com/engines/fonline-engine/games) of FOnline engine, and found FOnline-related channels on ForestNet statistics (http://stats.forestnet.org/).

Librarian

First name of ServerBoy project, back in times, when it was working as IRC bot on #2238 channel. It's also how ServerBoy is referenced on page and its source. As a gratitude of a long service for whole FOnline community, Librarian got his own statistics page, which can be found here (http://fodev.net/status/librarian/) ;).

At this stage, most of data available is taken directly from Librarian, and merged every night with own pings result. Once merging is done, highest amount of players in given day is saved and used during rebuilding of data files. Additionally, rebuilding is done every 10 minutes basing own results plus data merged last night.

Mirrors of ServerBoy database dumps can be found here (http://fodev.net/status/data/database/) or here (http://fodev.net/files/mirrors/riget.info/).

Data files

All exposed data is saved in JSON format (http://en.wikipedia.org/wiki/JSON), what should make further processing easier, despite of used language and platform.
Collected data can be accessed in three different ways:
First option is probably best if you're planning to create third-party application and base on data provided by FOdev. You don't have to worry about parsing config file (which contains only part of URL), as you get result as single JSON object. Not counting config.json and status.json, it's not guaranteed that paths and filenames will stay as they are now - they may change without notice during updates.

Your code is bad, and you should feel bad

https://github.com/rotators/fodev-status/

Just like previous project (http://fodev.net/forum/index.php/topic,29387.0.html) of Rotators, this one is also available for everyone to check and play with. Suggestions, bug reports, and commits are welcome.

At current stage, documentation is close to none, if we don't count source itself. It probably show up at some point, depending if there would be anyone interested in improving/extending page functionality. Code is prepared to work with new sub-pages without need to rework whole thing, thanks to using modules. Each module is "responsible" for serving different part of the page, but they can also request functions from other modules.

As for client-side configuration file parser (which may be required for other options), there is few versions already present, written in Perl (https://github.com/rotators/fodev-status/blob/master/bin/FOstatus.pm), PHP (https://github.com/rotators/fodev-status/blob/master/html/lib/FOstatus.php), and JavaScript (https://github.com/rotators/fodev-status/blob/master/html/js/fostatus.js).
Obviously, last one is most feature-rich, and most frequently updated. All basic functions are written in "clean" JavaScript, so there shouldn't be problems using it together with your favourite framework. If you check end of the script closely, you'll see that functions loading JSON files are separated, pretty simple, and does not require deep knowledge about all other parts of the code. Currently such "extensions" covers jQuery (http://jquery.com/), and partially PrototypeJS (http://prototypejs.org/). Feel free to pull request (https://github.com/rotators/fodev-status/pulls) adding other frameworks! :)
Title: Re: FOnline status
Post by: Wipe on April 18, 2014, 03:05:10 pm
Related project
IRC status

Source code: https://github.com/wipe2238/irssi-scripts/blob/master/fonline.pl (https://github.com/wipe2238/irssi-scripts/blob/master/fonline.pl)

irssi (http://irssi.org) script returning summary of online players across all known servers. Originally created for Street Queens (http://sq.us.to) gang members, which (at that time) was playing on few servers. Script is running since some time on ForestNet (http://forestnet.org/) network, attached to nick Wipe.

Unlike other status checkers on IRC, this one does not provide changing channel topic or announcing when server goes up/down - it is not planned to add them in future too.
If you need such functionalities on your game channel, it's better to contact with jan0s1k (http://fodev.net/forum/index.php?action=profile;u=145) or Misiołap (http://fodev.net/forum/index.php?action=profile;u=508), which are maintaining scripts with such features, or already covering game channel(s) (for example Misiołap is taking care of #reloaded).
Other than that, script does not check servers on its own, but uses data provided by FOdev.

!fonline
Main trigger, returning servers summary similiar to players distribution (http://fodev.net/status/players/) page, just in text form ;)

!status, !s
Returns short status of one server only, depending on channel where its been triggered.
Currently works on: #2238, #AshesOfPhoenix, #FO2

!fonline server [serverId]
Same as !status, but works on all channels.
- serverId is the same as defined in config file (http://fodev.net/status/data/config.json) ("fo2238" for FOnline: 2238. etc.)

!fonline records
List of most populated servers in FOnline history, including closed servers.

List of commands can be also found in source top comment.
Title: Re: FOnline status
Post by: JovankaB on April 19, 2014, 12:44:46 pm
Great tool, congratulations.
Title: Re: FOnline status
Post by: lisac2k on April 19, 2014, 02:37:08 pm
Yes, especially the averaging and trend graphs, they look awesome to me! Lovely 8)
I'll probably burn in hell for all the eternity for rewarding you with a single inverted rotgut only...
Title: Re: FOnline status
Post by: Nykaen on July 03, 2014, 08:25:11 pm
FOnline: New Asylum ip is outdated

should be: fonewasylum.ddns.net
Title: Re: FOnline status
Post by: fonliner on July 04, 2014, 10:11:04 am
Please guys make finally singleplayer game because we have enough good servers to play... We do not need to server with small changes and such as clones where nobody plays. 8)
Title: Re: FOnline status
Post by: Wipe on July 08, 2014, 10:56:46 am
FOnline: New Asylum ip is outdated

should be: fonewasylum.ddns.net

Changed, should be OK once server is back.