Author Topic: game statistics idea  (Read 2110 times)

Calmus

  • Traveller
  • *
  • Posts: 29
    • View Profile
game statistics idea
« 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:


The same statistics could be done with magic, crafts, stats and defensive combat.

The JavaScript library dygraphs 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 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.

Bonifarzia

  • Hydlaa Notable
  • *
  • Posts: 718
    • View Profile
Re: game statistics idea
« Reply #1 on: February 08, 2014, 01:24:27 pm »

Eonwind

  • Developers
  • Hydlaa Notable
  • *
  • Posts: 815
    • View Profile
Re: game statistics idea
« Reply #2 on: February 08, 2014, 07:08:28 pm »
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.

Calmus

  • Traveller
  • *
  • Posts: 29
    • View Profile
Re: game statistics idea
« Reply #3 on: February 09, 2014, 12:23:40 am »
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

Calmus

  • Traveller
  • *
  • Posts: 29
    • View Profile
Re: game statistics idea
« Reply #4 on: February 09, 2014, 12:30:08 am »
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:
Code: [Select]
<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)
Code: [Select]
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

Eonwind

  • Developers
  • Hydlaa Notable
  • *
  • Posts: 815
    • View Profile
Re: game statistics idea
« Reply #5 on: February 09, 2014, 05:59:25 pm »
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 :)

Venalan

  • Global Moderator
  • Hydlaa Notable
  • *
  • Posts: 630
    • View Profile
Re: game statistics idea
« Reply #6 on: February 09, 2014, 09:13:00 pm »
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
..

Mouli

  • Hydlaa Resident
  • *
  • Posts: 189
    • View Profile
Re: game statistics idea
« Reply #7 on: February 10, 2014, 02:06:19 am »
link doesnt work for me... is it working for you ?


[edited] It works sorry... dunno why it didnt work yesterday]
« Last Edit: February 10, 2014, 10:03:53 pm by Mouli »
Too many chiefs, not enough Indians...

zarre

  • Hydlaa Resident
  • *
  • Posts: 91
    • View Profile
Re: game statistics idea
« Reply #8 on: February 10, 2014, 02:10:01 am »
The link works for me.

Calmus

  • Traveller
  • *
  • Posts: 29
    • View Profile
Re: game statistics idea
« Reply #9 on: February 11, 2014, 01:21:08 am »
[...]

this is quite interesting  :)

Hopefully you get accepted to GSoC, then I might apply  ;D (I am a Computer Engineering student...)
« Last Edit: February 11, 2014, 01:49:14 am by Calmus »