PlaneShift
Support => Forum and Website Discussions => Topic started by: Calmus on February 08, 2014, 12:53:42 pm
-
Hello there,
I have an idea about game statistics, which I think could be fairly interesting to have. And I also found a way how it should be quite easy to implement these on a (static) website.
Wouldn't it be interesting to have various diagrams with graphs which show the training progress and level statuses? I am thinking on average values, not on per character statistics which would be considerable more hassle and probably better to kept private.
two examples of diagrams:
(http://i62.tinypic.com/2yuhqax.png)
(http://i58.tinypic.com/254y449.png)
The same statistics could be done with magic, crafts, stats and defensive combat.
The JavaScript library dygraphs (http://dygraphs.com) could be used to produce nice visualizations of the data (the example above, makes use of this library). This library can use csv files as data source. So there would be scripts needed to update these csv files periodically, e.g. one time each week.
So if developer or players are interested in such statistics, I could work on a Ruby or Python script which produces CSV files. This script would have to be executed periodically with a cron job on the server. I suppose cron and ruby is available on the server.
I know that all the relevant data to produce these CSV files can be found in the game database. The rest, embedding this JS library (http://dygraphs.com/1.0.1/dygraph-combined.js) and displaying the data on a website is even easier.
A demo diagram using dygraphs is on their webpage I linked above. JavaScript has to be enabled.
-
http://planeshift.teamix.org/index.php?page=stats ;)
-
Hello Calmus,
we already have a system able to provide something like you're suggesting for skills and stats, we recently tried to extract some data to know how long it takes for real to raise a skill and for sure it may require some tweak. The actual system is able to query the DB to gather how many characters created within a given time frame reached a fixed skill level range.
I think everything is already in SVN, and should you be willing to help us improving this tool maybe you can drop by #planeshift-prospects.
-
hi Eonwind,
ah ok, well if improving this tools for statistics requires skills in PHP, I am probably not the right person for this. So considering there is already a statistic system, which basically works and considering it is mostly programmed in PHP, I might find something else to do. :-\
But if it is ever considered to replace the current statistics system with the solution I pointed to above, I would be willing to help. Possible issues I see with the way I mentioned compared to the current system:
- querying for specific data (entering something in a form, and get the statistic for it)
- all statistics public
- requires JavaScript on the client side
- requires cron jobs on the server, to update the csv files
On the positive side:
- any scripting language can be used, to create the (csv) data files for it; if the language is supported on the server
- easier to get nice looking results
-
if anyone wants to test the dygraphs library, I can show a short example. A webserver is not required, as it is just a static webpage.
HTML code:
<html>
<head>
<script type="text/javascript"
src="http://dygraphs.com/1.0.1/dygraph-combined.js"></script>
</head>
<body>
<h1>Training Statistics</h1>
<h2>Active Combat, Status</h2>
<p>[Avg. Levels]</p>
<div id="graphdiv_acs"
style="width:500px; height:320px;"></div>
</br>
<script type="text/javascript">
g2 = new Dygraph(
document.getElementById("graphdiv_acs"),
"combat.csv", // path to CSV file
{} // options
);
</script>
</body>
</html>
csv file example, named combat.csv (in the same directory)
Date,Axe,Knives & Daggers,Mace & Hammer,Melee,Ranged,Sword
2014-1-1,28,15,12,7,30,44
2014-2-1,27,15,14,6,32,43
2014-3-1,27,16,15,6,34,43
2014-4-1,27,16,16,6,37,42
2014-5-1,25,17,18,5,38,42
2014-6-1,26,17,19,5,40,43
-
Our statistic system work but can surely make use of some improvement ;)
I think improving the system instead of making a new one could be the favoured way but I'm not an engine dev so maybe you can hear from them :)
-
A more advanced stats package for PS is part of the GSoC application that we make. You can see it here.
http://planeshift.top-ix.org/pswiki/index.php?title=Analysis_package
-
link doesnt work for me... is it working for you ?
[edited] It works sorry... dunno why it didnt work yesterday]
-
The link works for me.
-
[...]
this is quite interesting :)
Hopefully you get accepted to GSoC, then I might apply ;D (I am a Computer Engineering student...)