Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARC Positional Logging #304

Open
merforga opened this issue Jun 15, 2018 · 22 comments
Open

ARC Positional Logging #304

merforga opened this issue Jun 15, 2018 · 22 comments

Comments

@merforga
Copy link
Member

merforga commented Jun 15, 2018

ARC has provided test DLL for tracking positions. Nothing needs to be done yet, but just want to be able to see if logging works correctly and if it is usable data:

ARC Position BETA.zip

CBTS_POSITION = 19,
    CBTS_VELOCITY = 20
cast dst_agent to a float[3]

x/y/z stored in binary order
ev->src_agent = ag->m_ptr_agent; ev->time = timegettime64(); ev->is_statechange = CBTS_POSITION; ag->GetPos((D3DXVECTOR3*)&ev->dst_agent);

@immortius
Copy link
Collaborator

I'm going to say... I don't think it is working? I don't see any events of that type from a log from that dll.

@merforga
Copy link
Member Author

Hmm is it not an additional field thingy at the end of current recorded events? I dont think it's it's own event

@merforga
Copy link
Member Author

merforga commented Jun 17, 2018

CBTS_POSITION = 19,
CBTS_VELOCITY = 20
cast dst_agent to a float[3]
if the results look manageable for size and programming ill run it past cc
feel free to share those links with the devs

that was the full thingy from DELTA, what encounter were you looking at for the position data? Also is log larger than what you would expect?

@immortius
Copy link
Collaborator

I created a new golem log.
The description from delta suggests they are new state change events.

@merforga
Copy link
Member Author

merforga commented Jun 18, 2018

Confirmed error with DLL, will need new test logs. Updated DLL attached below. Some source code:

                if (timewithin(ag->m_cbt_lastvelocity_poll, 250)) {
                    D3DXVECTOR3 v;
                    ag->GetVelocity(&v);
                    if (v != ag->m_cbt_lastvelocity) {
                        ag->m_cbt_lastvelocity = v;
                        ag->m_cbt_lastvelocity_poll = timegettime64();

                        /* create event */
                        if (getlock(m_cbtevents_area_hlock, 0, 0)) {
                            cbtevent_extended* ev = &m_ar_cbtevents_area[m_cbtevents_area_tail_raw];
                            ev->src_agent = ag->m_ptr_agent;
                            ev->time = timegettime64();
                            ev->is_statechange = CBTS_VELOCITY;
                            ag->GetVelocity((D3DXVECTOR3*)&ev->dst_agent);
                            m_cbtevents_area_tail_raw = (m_cbtevents_area_tail_raw + 1) % RB_STR_ELEMENTS;
                            postlock(m_cbtevents_area_hready);
                            postlock(m_cbtevents_area_hlock);
                        }
                    }
                }
            /* healthmax update */
            if (m_area_cbt_cid && ag->m_is_in_species_list) {
                float new_healthmax = ag->GetHealthMax(0);
                if (new_healthmax != ag->m_cbt_health_max) {
                    ag->m_cbt_health_max = new_healthmax;

                    /* create event */
                    if (getlock(m_cbtevents_area_hlock, 0, 0)) {
                        cbtevent_extended* ev = &m_ar_cbtevents_area[m_cbtevents_area_tail_raw];
                        ev->src_agent = ag->m_ptr_agent;
                        ev->time = timegettime64();
                        ev->is_statechange = CBTS_HEALTHMAXUPDATE;
                        ev->dst_agent = (uintptr_t)new_healthmax;
                        m_cbtevents_area_tail_raw = (m_cbtevents_area_tail_raw + 1) % RB_STR_ELEMENTS;
                        postlock(m_cbtevents_area_hready);
                        postlock(m_cbtevents_area_hlock);
                    }
                }
            }

ARC Position BETA 0.2.zip

was cleaning up timing stuff
instead of having a hundred if (time < x + something) everywhere
that are sometimes written backwards
simplified to a macro
and
mightve
swapped the < with an >
not even thinking about how it should work
miracle it didnt crash anywhere
Attachment file type: unknown
d3d9_arcdps_buildtemplates.dll
200.00 KB
Attachment file type: unknown
d3d9.dll
472.50 KB
these will be good
pos and velocity every 300ms if changed since previous

@merforga
Copy link
Member Author

20180619-214128.evtc.zip

@merforga
Copy link
Member Author

20180619-215324.evtc.zip

@merforga
Copy link
Member Author

merforga commented Jun 20, 2018

@immortius
Copy link
Collaborator

immortius commented Jun 22, 2018

Draft replay format, in json - json isn't a requirement, but convenient for a web renderer and a decent enough way to explore the structure more of a simple way to consider structure:

{
  "info" : {
    "encounter" : "Deimos",
    "time" : "date+time",
    "duration" : 123.5,
  },
  "maps" : [
    {
      "image" : "url",
      "region" : {
        "x" : 2,
        "y" : 3,
        "width" : 100,
        "height" : 100
      },
      "coordinates" : {
        "x" : 200,
        "y" : 30000,
        "width" : 900,
        "height" : 900
      },
      "vertical-range" : {
        "lower" : 200,
        "upper" : 400
      }
    }
  ],
  "actors" : [
    {
      "name" : "Bert",
      "id" : 1,
      "type" : "Class/Enemy",
      "display" : {
        "default" : {
          "icon-texture" : "",
          "icon-region" : {
            ...
          }
        },
        "up" : {
        
        },
        "down" : {
        
        },
        "dead" : {
        
        }
      }
    },
    {
      "name" : "Deimos",
      "type" : "Boss",
      ...
    }
  ],
  "tracks" : [
    {
      "path" : ["Bert","position","x"],
      "data-type" : "numeric",
      "update-type" : "interval"
      "interpolation" : "lerp",
      "start-time" : 10,
      "frequency" : 0.5,
      "data" : [1,1,1,1,2,2,2,2,2,...]
    },
    {
      "path" : ["Bert","position","y"],
      "data-type" : "numeric",
      "update-type" : "interval"
      "interpolation" : "lerp",
      "start-time" : 12,
      "frequency" : 0.5,
      "data" : [1,1,1,1,2,2,2,2,2,...]
    },
    {
      "path" : ["Bert","state"],
      "data-type" : "state",
      "update-type" : "delta"
      "data" : [
        {
          "time" : 0,
          "value": "up"
        },
        {
          "time" : 20,
          "value": "down"
        },
        {
          "time" : 24,
          "value": "dead"
        }]
    },
  ]
}

@deltaconnected
Copy link

i should mention that i don't actually know which coordinate system the ones i report are part of (game internals use something different for rendering/transform raw, skills/map/ui?, and mumble interface/api, in a split that i'm also unsure of)

@merforga
Copy link
Member Author

I'm sure we can figure out...given a relative position XD

@immortius
Copy link
Collaborator

I was assuming I would need to capture some boundary positions and math it out from there anyway, so no worries.

@immortius
Copy link
Collaborator

Demo of progress at http://immortius.net.au/gw2continuumsplit/

@immortius
Copy link
Collaborator

@deltaconnected Is it possible to get facing information, possibly instead of velocity (which isn't as generally useful I don't think, as we can somewhat derive velocity from the change in position, but facing cannot be replicated from velocity)? Facing could possibly use as little as a byte depending on the amount of preprocessing you are willing to do (0-255, with 0 as North, 64 as East, 128 as South etc)

@deltaconnected
Copy link

Sure. I include velocity because I know it's the only way to reliably check if someone got hit by a red orb on xera (dodge and the lift are unique). CBTS_FACING = 21 (next in the enum list), https://pastebin.com/D1XU6XBy for copy pasta code. Included in https://www.deltaconnected.com/arcdps/dev/ which will make it to live... eventually

@merforga
Copy link
Member Author

Released in 18th of July arc update
jul.18.2018: evtc: added facing statechange (21) for players and boss, polled at 500ms, post-encounter logs only.
jul.18.2018: evtc: above use dst_agent as x/y (cast &dst_agent to float*, use as float[2], xy)

immortius added a commit that referenced this issue Jul 20, 2018
 - Added boss damage tracks
 - Display dps metrics in replay
@merforga
Copy link
Member Author

New SH log

20180720-230633.evtc.zip

@immortius
Copy link
Collaborator

Facing in action http://immortius.net.au/gw2continuumsplit/

@deltaconnected
Copy link

Added in pos/vel/fac for some raid mechanic NPC's (seekers, other guardians, spirits, sab phases, matthias spirits, etc.), don't remember which is which as of latest

immortius added a commit that referenced this issue Sep 5, 2018
Added vg
Added support for multiple maps
immortius added a commit that referenced this issue Sep 5, 2018
immortius added a commit that referenced this issue Sep 5, 2018
Added support for cairn, mo, sam, deimos.
Added support for multi-level raids (deimos)
immortius added a commit that referenced this issue Sep 5, 2018
immortius added a commit that referenced this issue Sep 16, 2018
immortius added a commit that referenced this issue Sep 16, 2018
immortius added a commit that referenced this issue Sep 16, 2018
 - Reworked buff stats generation to include 0 stack durations
 - Replay writer collates buff from multiple sources
immortius added a commit that referenced this issue Jan 17, 2019
immortius added a commit that referenced this issue Jan 17, 2019
 - Added boss damage tracks
 - Display dps metrics in replay
immortius added a commit that referenced this issue Jan 17, 2019
Added vg
Added support for multiple maps
immortius added a commit that referenced this issue Jan 17, 2019
immortius added a commit that referenced this issue Jan 17, 2019
Added support for cairn, mo, sam, deimos.
Added support for multi-level raids (deimos)
immortius added a commit that referenced this issue Jan 17, 2019
immortius added a commit that referenced this issue Jan 17, 2019
immortius added a commit that referenced this issue Jan 17, 2019
immortius added a commit that referenced this issue Jan 17, 2019
 - Reworked buff stats generation to include 0 stack durations
 - Replay writer collates buff from multiple sources
immortius added a commit that referenced this issue Feb 5, 2019
immortius added a commit that referenced this issue Feb 5, 2019
 - Added boss damage tracks
 - Display dps metrics in replay
immortius added a commit that referenced this issue Feb 5, 2019
Added vg
Added support for multiple maps
immortius added a commit that referenced this issue Feb 5, 2019
immortius added a commit that referenced this issue Feb 5, 2019
Added support for cairn, mo, sam, deimos.
Added support for multi-level raids (deimos)
immortius added a commit that referenced this issue Feb 5, 2019
immortius added a commit that referenced this issue Feb 5, 2019
immortius added a commit that referenced this issue Feb 5, 2019
immortius added a commit that referenced this issue Feb 5, 2019
 - Reworked buff stats generation to include 0 stack durations
 - Replay writer collates buff from multiple sources
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants