Coder Social home page Coder Social logo

realitytracker's Introduction

Click for Example

Reality Tracker

This project provides an easy way to view game recordings created by the realitytracker.py script. The goal is to provide as much data as possible to analyse matches for learning and administration without launching the game to use DICE's Battlerecoder.

It was originally a C# project that automatically uploaded server recordings to youtube but it was decided to make it a portable web application.

See realitytracker in action

You can play a live match from the project reality tournament here. For more you can visit public server's websites or PRT's replay archive.

Usage

  • Clone the tracker or use the github pages hosted master branch version
  • Load one of the example .PRdemo files from examples/
  • Click the stack icon on the right to toggle options
  • Click on the running man in the play bar to set the speed
  • Press 1-9 to select blufor squads and SHIFT+1-9 for opfor
  • Click on vehicles/players icons for more information
  • You can select an entire squad by clicking on it's name
  • Squad leaders have a white circle around them
  • Click on the menus button to open misc menus

Features

  • Recording rewind and speed slider
  • Interactive map
  • Toggleable display options
  • Squad coloring
  • Bookmark interface
  • Player and asset FOV marking
  • Player and vehicle kill feed menus
  • 60FPS support
  • Draggable and toggleable menus
  • Ticket and time count
  • Live kill indication
  • Command markers
  • Accessible parse file format - can be used by any application from statistics to displaying the match in a rotating heightmap

TODO

  • Networking for real time match streaming
  • Administration interface for streamed matches
  • UI and UX upgrades
  • Better documentation
  • Add any data that can be extracted from the game that is useful for the viewer

Tracker protocol

See this spreadsheet for the full protocol documentation. The protocol uses a very minimal implementation because the server side code has to run in the game's mainloop and it's intended to work over bad network.

In each configured game tick interval the tracker sends a single packet/writes to the .PRdemo file with different types of updates. The parser parses the headers of each update and then it's content based on the 'message type' opcodes. Each 'message' is internally cached. For example, if the parser finds MESSAGETYPE_PLAYER_UPDATE(0x10) it will start parsing the following strucutre(you can find it in the PLAYER_UPDATE sheet)

Description Type Length
Update flags PlayerUpdate Flags Enum 2
Player ID Unsigned Byte 1
Team Byte 1
Squad / isSquadLeader Byte 1
VehicleID int16 2
Vehicle Seat Name String Null terminated
Vehicle Seat number (Only [0-2] ) Byte 1
Health Byte 1
Score int16 2
Teamwork Score int16 2
Kills int16 2
Deaths int16 2
Ping int16 2
isAlive bool 1
isJoining (True until player first spawns) bool 1
Position X,Y,Z 3x int16 6
Yaw rotation in Degrees [-179,180] int16 2
Kit name String Null terminated

The update flags uses an enum with bitmasks to mark which fields changed so the parser will only look for those. In addition to that only players that had changes in cached fields will have their updates sent in the first place.

The relevant code is in js/parser.js and js/protocol.js. For the server's side see realitytracker.py.

Repository structure

  • Maps/ - Map images taken from the game's files
  • Graphics/UI/ - Custom icons
  • examples/ - .PRdemo files for testing
  • js/ - Project sources
  • atlas.png - In game asset, flag and marker icons
  • data.json - Generated JSON of kit, vehicle and atlas data

realitytracker's People

Contributors

alontavor avatar cwlowder avatar lennyxc avatar sucharmistrz avatar yossizap avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

realitytracker's Issues

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.