Git Product home page Git Product logo

civ5replays's Introduction

A civilization 5 replay parsing web application!

This web application is based mostly on another mans work. Danny Fisher (dannythefool @ civfanatics.com, among other things) created a python script that parses finished civilization 5 replay files into either a fancy HTML5 document or a CSV file with all the events.

Currently i am just putting the entire outputted HTML directly to the web (albeit in a very stupid way at the moment, reading the file!). A better way would perhaps be to include the static generated file (stripping out the html header and footer) and placing the needed javascript in a separate file to be included.

Or i could store the events one by one in a database on a per-game basis? I am using mongodb at the moment so each game could have it’s own collection or something like that. I’m open to suggestions!

Technical details

This application uses Ruby 1.9.2, Sinatra, MongoDb, resque, unicorn and varnish.

I just switched over to use varnish as the frontend instead of nginx and it’s working great so far. I need to work a bit on caching rules (replays for instance could really be cached pretty much forever, they do not change) I’ve also started to use a replica set for my mongodb configuration, it’s currently running on three virtual machines.

There is still lots of work to be done to the parsing python script, the best thing would probably be to make it generate just the data (it can, with CSV) then make a better front end that serves it up here. At the moment i’m storing a entire html file on disk and actually reading it (as you can see). That is ridiculously stupid, i should at least store those in gridfs or something with mongodb, that would probably make more sense + they would be a lot safer being stored across several servers.

Currently there has been about 2600 visits in total since i launched this service in late november. Currently at around 400 visitors per month. Not sure if its gaining popularity or not, I haven’t heard back from more than a few people that seem to like it.

The future

It would be cool if the parser could be extracted/rebuilt as a library to be used from many different languages. One central updated replay parser that would work on all replays and keep up to date with game updates.

This current one is not being maintained by Danny it seems and i do not have the knowledge, the game or the time to keep it working sadly. If anyone would like to help out with anything, please by all means contact me here or anywhere you find me!

The parser will soon (ish) hopefully be updated more as MouseyPounds from the civfanatics forum has agreed to take a look at all the failed parses to fix the script to work with them. He has said that the script will probably not work with the various DLCs unless we rewrite it in a major way.

Time will tell eh?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.