Giter VIP home page Giter VIP logo

demostatistics-generator's Introduction

demostatistics-generator

Generates some statistics for CS:GO demos.

This project was mainly made as an example for demoinfo-public. If you want to want an entry-code how demoinfo-public should be used, look at the Main()-method. If you think that this code is waaaay to long for what it does look at the version where I stripped it of the boilerplate.

I tried to document everything. If you have useage-questions you can post them here as an issue!

This code only works for Valve demos (i.e. from majors and matchmaking), for other demos all might not work! This is because there might be mutliple match_started events when the match was restarted (lo3), and many of those details. This must all be handled in your application-logic, because the parser can't account for that. It isn't handled in this project because this is only an example to show how the parser is used generally

Example output

(And the raw data)

#Usage of demoinfo-public Include the DemoInfo-Project. You can use the NuGet-Packet

You can then can create an instance of the DemoParser-Class.

DemoParser parser = new DemoParser(File.OpenRead("file.dem"));

Then you can subscribe to events:

parser.TickDone += parser_TickDone;
parser.MatchStarted += parser_MatchStarted;
parser.PlayerKilled += HandlePlayerKilled;
parser.WeaponFired += HandleWeaponFired;

For starting parsing, you first need to parse the Header of the Demo by calling the ParseHeader-Method of the DemoParser. You can either parse the whole demo (then you call parser.ParseToEnd()), or parse tick by tick. (then call repeatedly parser.ParseNextTick () to parse the next tick). The method returns true as long as there is an other tick.

demostatistics-generator's People

Contributors

moritzuehling avatar ejolson9 avatar

Watchers

James Cloos avatar Matthias Feys 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.