GithubHelp home page GithubHelp logo

xxxxavier / manta Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dotabuff/manta

0.0 1.0 0.0 6.96 MB

Dota 2 Source 2 Replay Parser

License: MIT License

Makefile 0.23% Go 41.44% Protocol Buffer 58.33%

manta's Introduction

Manta

Build Status

Manta is a Dota 2 replay parser written in Go. It targets the Source 2 (Dota 2 Reborn) game engine. To parse Source 1 (original Dota 2) replays, take a look at Yasha.

Project Status:

  • Dota 2 Reborn (Source 2) is now the main Dota 2 client. Yay!
  • Manta is structurally feature complete and in use serving production workloads at Dotabuff.
  • Manta currently handles nearly all packets, including the packet entities.

Getting Started

Manta is a low-level replay parser, meaning that it will provide you access to the raw data in the replay, but doesn't provide any opinion on how that data should be structured for your use case. You'll need to create callback functions, inspect the raw data, and decide how you're going to use it.

Usage

Get the code:

go get github.com/dotabuff/manta

Use it to parse a replay:

import (
  "github.com/dotabuff/manta"
  "github.com/dotabuff/manta/dota"
)

func main() {
  // Create a new parser instance from a file. Alternatively see NewParser([]byte)
  p, _ := manta.NewParserFromFile("my_replay.dem")

  // Register a callback, this time for the OnCUserMessageSayText2 event.
  p.Callbacks.OnCUserMessageSayText2(func(m *dota.CUserMessageSayText2) error {
    fmt.Printf("%s said: %s", m.GetParam1(), m.GetParam2())
    return nil
  })

  // Start parsing the replay!
  p.Start()
}

You cannot import Manta and Yasha in the same binary due to protocol buffer conflicts.

License

MIT, see the LICENSE file.

Help

If you have any questions, you can find us in the #dota2replay channel on QuakeNet.

Authors and Acknowledgements

Manta is maintained and development is sponsored by Dotabuff, a leading Dota 2 community website with an emphasis on statistics. Manta wouldn't exist without the efforts of a number of people:

manta's People

Contributors

invokr avatar jcoene avatar manveru avatar benlubar avatar gu3st avatar

Watchers

Xinhao Zhang 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.