.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   Drawing some pretty graphs from scores.html files (http://forum.shrapnelgames.com/showthread.php?t=36847)

lch November 15th, 2007 11:21 PM

Drawing some pretty graphs from scores.html files
 
Heya, I've been writing some script which parses the scores.html files that the game generates if it is run with the --scoredump option. That project was on hiatus for some time, but I've finally invested some time to clean it up and make it accessible for others.

I'll add more info at a later timer. For now, just look at the graphs for my Dom3 multiplayer games here:
http://dom3.servegame.com/scores/

You can get your own graphs that look like this! To make things easier for the non-techie folks, I have moved most of the code out of the PHP script and to Javascript which is handled by the browser. This allows others to use my system like I do and configure it to some greater extend, too.

Long story short: go to the URL above. You'll see a list of my MP games. When you click on one, you see the current graph for the ingame scores. You can get a page like that for your own game if you use the Upload button with your own scores.html files. You can then save the generated HTML file and put it on your own website or send it via email.

Source code is available on request (needs PHP 4/5).

lch November 15th, 2007 11:22 PM

README
 
Space reserved by me.

ToDo:
- make the page not look like ***.
- write documentation about the configuration options
- configuration of the display options via the upload form

lch November 15th, 2007 11:22 PM

Re: README
 
More space reserved by me.

lch November 15th, 2007 11:22 PM

Feedback
 
I'm greedy.

vfb November 15th, 2007 11:57 PM

Re: Feedback
 
I'm probably missing a plugin, but all I see (firefox 2.0, opera 9.1, with flash player 7.0, javascript enabled in both browsers) is:

Provinces
Loading Adobe Flash graph, please wait...
Forts
Loading Adobe Flash graph, please wait...
Income
Loading Adobe Flash graph, please wait...
Gem Income
Loading Adobe Flash graph, please wait...
Research
Loading Adobe Flash graph, please wait...
Dominion
Loading Adobe Flash graph, please wait...
Army Size
Loading Adobe Flash graph, please wait...
Victory Points
Loading Adobe Flash graph, please wait...

Any idea what could be wrong?

lch November 16th, 2007 08:25 AM

Re: Feedback
 
Quote:

vfb said:
I'm probably missing a plugin, but all I see (firefox 2.0, opera 9.1, with flash player 7.0, javascript enabled in both browsers)

I think you need at least Flash player version 8 (current is 9). Try this page, which should tell you what you need to do to get it working: http://blog.deconcept.com/swfobject/expressinstall.html

vfb November 16th, 2007 11:58 AM

Re: Feedback
 
Great, thanks for the help!

cleveland November 16th, 2007 01:12 PM

Re: Drawing some pretty graphs from scores.html fi
 
Very, very impressive. Well done.



Now if there were only a way to track total stale time for each nation......

Kristoffer O November 17th, 2007 06:33 AM

Re: Drawing some pretty graphs from scores.html fi
 
Beautiful!

Have a cake [img]/threads/images/Graemlins/Cake.gif[/img]

lch November 19th, 2007 07:53 AM

Updates
 
Some updates:
- graphs now scale correctly, the Newbies game doesn't look THAT bad anymore for R'lyeh http://forum.shrapnelgames.com/images/smilies/happy.gif
- upload mechanism allows fine-tuning of some options now, for example you can set the colors for a specific game era or turn off some graphs if you want
- source code can be inspected, but beware, it's ugly. I put everything into one big file instead of separating it into different PHP files. The core consists of only a couple dozen lines of code since the Javascript code does the real work, the rest is just HTML for the overview/upload pages.


All times are GMT -4. The time now is 05:46 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.