GithubHelp home page GithubHelp logo

bakkes / demoinfo-csgo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pmrowla/demoinfo-csgo

0.0 2.0 0.0 143 KB

Modified version of the Dota2 demoinfo program to work with CS:GO demo files

demoinfo-csgo's Introduction

Demoinfo2.exe is a tool that will parse Counter-Strike:Global Offensive demo files (ending in .dem) and dump out every message in the demo. Using this tool, third parties can parse the demo for various game events to generate information and statistics.

You can use demoinfo2.exe by itself and parse the demo. We have also included the source code to the program itself to show how to parse and retrieve information directly.

CS:GO's demo format is built around using Google's Protocol Buffers (protobuf). Protobuf is a message/object serialization language that generates code to serialize the objects efficiently. If you wish to understand more about protobuf, check out http://code.google.com/p/protobuf/

In order to build demoinfo2 yourself, you will need Visual Studio 2010. You will also need to download Google's protobuf and snappy libraries.

  • Extract demoinfo2.zip and it will make a new folder named "demoinfo2".
  • Download protobuf from http://code.google.com/p/protobuf/downloads/detail?name=protobuf-2.3.0.zip Install this directly in the protobuf-2.3.0 directory that was created when you extracted demoinfo2.
  • Open protobuf-2.3.0\vsprojects\protobuf.sln into Visual Studio 2010. You will be asked to convert it, please do so. Once loaded, select Release version from the build target in the toolbar. Build the libprotobuf project by right clicking it in the solution list and hitting "build." You do not need to build the other protobuf projects.
  • Download protoc (the protobuf compiler) from http://code.google.com/p/protobuf/downloads/detail?name=protoc-2.4.1-win32.zip and extract this into the protoc-2.4.1-win32 folder that was created when you extracted demoinfo2. This is the protobuf compiler that parses .proto files and generates C++ code to parse the messages in the demo file.
  • The last library needed is Google's snappy compression library. Download it from http://code.google.com/p/snappy/downloads/detail?name=snappy-1.1.0.tar.gz and extract it into the snappy-1.1.0 folder.

Once those libraries are installed, you can now open demoinfo2.sln and build your own demoinfo2.exe binary. Select the Release build target from the toolbar and hit build! You will have a new binary in demoinfo2\Release\demoinfo2.exe. To parse a demo, just download one in Dota 2. They will be in C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo*.dem. To dump a demo, just run "demoinfo2 xxx.dem" and it will print out all the messages in the demo. Google's protobuf can generate parses in Java and Python using the same .proto files. People proficient in those languages can use protoc.exe to generate code that parses the protobuf messages and parse the demo file in those languages.

For information on the original Dota 2 demoinfo tool, visit the Replay section of the Dota 2 Development Forums at http://dev.dota2.com/forumdisplay.php?f=19.


Copyright (c) 2012, Valve Corporation, All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

demoinfo-csgo's People

Contributors

pmrowla avatar

Watchers

 avatar  avatar

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.