Follow-up Comment #6, patch #1391 (project freeciv):

> This patch for generating a animated statistics from a game
> is exactly a feature I've been looking for, to generate
> post-game statistcs for http://www.freeciv.net/
>
> I'd like to use this functionality to create an animated .gif
> to be displayed on the website after the game is finished.
>
> Do you have any ideas, plans, or code, for how to trigger your scripts
> properly once a game has ended, so that the resulting animated .gif
> will be related to game statistics in a database?
>

At the moment the patch only creates map images. It can be configured to
create different types of images (all players, only one player, ...). The
animated gif (or mpg/avi/flv) is created by a script. If the server exists
after the game ended you could call in a script like

# ./ser
# civstats2anim <options map animation 1>
# civstats2anim <options map animation 2>
#  ...
# civstats2anim <options map animation n>

This way all animated gifs will be created after the server stops.

>
> I've found something similar here:
> http://munk.wtf.la:5560/game_records.php?game_id=11
> Are you the creator of this project also? If so, do you mind
> sharing the source code? Are all these statics automated?

The code for this statistics was created by munk. It is a php script
available in the forum (http://forum.freeciv.org/viewtopic.php?t=6128). I
created the patch after I read the script and ask myself: Why create a parser
for the savegame if we have an excellent one (the freeciv server)?

The patch should be seen as a helper for the script. This way the map images
as well as statistical data (as civscore.log file or *.csv files for each
turn) can be created by the server and used as input for the postprocessing
of the played game.

> I think we should cooperate on this functionality, since
> I'd like something very similar.
>
> On a related note, the Freeciv web client could be used to replay
> whole games, as well. This would involve setting up an observer
> player, which stores JSON in a database, which is then replayed
> to other players when they want a replay.

I'm not familiar with the freeciv web client but I think that it would be
easier to create a save file for each turn and replay the game loading this
files turn by turn and displaying the whole map. This is that the map images
do (missing are the exact information about the units and cities).


    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?1391>

_______________________________________________
  Nachricht geschickt von/durch Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to