Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Exporting Civilization V replays as HTML using Canvas (civfanatics.com)
66 points by kmfrk on Oct 7, 2010 | hide | past | favorite | 11 comments


There are few communities as awesome as the Civ modding community. They are one of the biggest reasons that the Civ franchise still exists today (awesome games notwithstanding).


People might pay for this in SC2: a web interface to tournaments and replays.


I've tinkered around with doing something like this for SC2 replays, and it's actually a pretty difficult proposition.

SC2 replay files only store the low-level commands issued by the player: selecting and deselecting units, movement and attack commands, build commands, the like. It doesn't contain any information about resources or units produced, since that's handled by the game engine.

In order to figure out what actually happened in a given replay, you've got to either re-implement the SC2 game engine, or code-inject the SC2 executable to grab the information you want while it's playing the replay file.

Since the first task is monumental, and I have no experience with code injection, I shelved the idea until there's something like the Chaos Launcher[1] for SC2.

[1]: http://wiki.teamliquid.net/starcraft/Chaoslauncher


Did you document your tinkering? Would you care to publish it?


I didn't add anything to what's already out there (I don't exactly have the patience for reverse-engineering). The most comprehensive overview of the replay format is the wiki[1] for Lauri Virkamaki's phpsc2replay project. Head and shoulders above everything else I found, which were mainly random forum threads.

[1]: http://code.google.com/p/phpsc2replay/w/list


It should be easier to do something similar for Star Craft 1 as a proof of concept, first.

You can even recreate the real graphics, instead of the abstractions presented here.


The original StarCraft would almost be too easy: if you look at the system requirements, it's clear that the whole game could be ported to javascript and still run smoothly on modern systems.


Let's do it. (Although the Civilization games shouldn't be too hard on processing power either. There are almost board games [1].)

[1] Extremely complicated board games.


You might be interested in freeciv.net, civilization implemented in html5.


Thanks! I knew freeciv from when I played it on Linux locally years and years ago. Interesting, that they made an online version.


That's freaking awesome.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: