boost-me / engine

2 stars 0 forks source link

RFC: Playback Tick Format #16

Open kasperkronborg opened 5 years ago

kasperkronborg commented 5 years ago

Playback Tick Format (PTF) 1.0

This is a first draft for the data format of playback demo files for BoostMe. Please consider this a very early proposal and suggestions and discussions are very welcome.

Use cases

Presumptions The format will assume that 16 ticks is one (1) second. It's up to the parsing of an actual CS:GO demo file to accommodate this. It's furthermore implied that rounds would be retrievable by knowing the start tick of a round. Please be aware that this is still not part of this first proposal.

Disclaimer Right now the format only contains the very minimum to actually draw player positions.

Format

{
  "ticks": [{
    "teams": {
      "ct": {
        "players": [{
          "name": "Player1",
          "position": {
            "x": 100,
            "y": 100
          }
        }]
      }
    }
  }]
}
casperstorm commented 5 years ago

@egeriis maybe you can write your findings after yesterdays hack? I think it's relevant for this issue.

egeriis commented 5 years ago

x-post https://github.com/boost-me/engine/issues/2#issuecomment-439182289

In addition:

I think saul/demofile is onto something, it an event-driven API and doesn't actually have an intermediate format. Rather you hook into certain events and are able to act on those. For the sake of not having a deep coupling with saul/demofile however, I think it's still sane to have an intermediate layer between their events and what our app hooks into. I.e. we have a layer that translates demofile's events into our own convention. Maybe it's 1:1, but then we'll have a chance to migrate to our own DEM parser easily in the future.