Page 4 of 6 FirstFirst ... 2 3 4 5 6 LastLast
Results 31 to 40 of 57

Thread: SUMMARY OF ISSUES

  1. #31
    Basic Member
    Join Date
    Dec 2016
    Posts
    733
    Regarding the 0.03, 0.0333 would work better honestly. This is related to the FPS your dota runs at. The standard (on a decent machine) is 60 FPS. Half the frames are devoted to each team (30 FPS for Radiant, 30 FPS for Dire). time for change from 1 frame to another is therefore 1/30 = 0.0333. It takes 1 frame at minimum for an action to register with the game client. If you run at faster/uncapped frame-rate YMMV.

    Not sure if there is an API to get your current FPS, but if there is (or if there will be) the ideal would be to use action_offset = 1/(getCurrentFPS()/2.0)

  2. #32
    Basic Member
    Join Date
    Sep 2017
    Posts
    56
    Yeah this is just the time till your attack leaves your hero. In case of melee that means it hits, in case of ranged it's the time the projectile is spawned.

    For projectile's I'm using the following before the projectile is spawned, which doesn't seem to be entirely accurate but it's decently close and I couldn't figure out how to make it any better:


    Code:
    local sourceloc = source:GetLocation();
    local targetloc = target:GetLocation();
    local projectilestart = Vector(sourceloc.x,sourceloc.y,sourceloc.z + zSource);
    local goal = Vector(targetloc.x,targetloc.y,targetloc.z + zTarget);
    local dist = Dist3D(projectilestart, goal ) - (sourceMissileSpawnDistance + target:GetBoundingRadius());
    local projectiletime =  (dist / source:GetAttackProjectileSpeed());
    Where zSource is the z position of the projectiles spawn location compared to the units getlocation z position and zTarget is the height compared to the targets location which appears to be the true target of projectiles (they fly to the middle of the model, not to the bottom)
    sourceMissileSpawnDistance is the distance (x,y) from the units center at which projectiles spawn

    Now for these, since I couldn't find exact values, I'm using the following, which seem to work okayish:
    zSource = source:GetGroundHeight( ) *0.75;
    zTarget = target:GetGroundHeight( )/2;
    sourceMissileSpawnDistance = source:GetBoundingRadius();

    With exceptions for:
    Ranged creeps, which seem to have a sourceMissileSpawnDistance around 120
    Towers and siege creeps, with a sourceMissileSpawnDistance around 0

    Based on what I've seen, there are a bunch of other units that don't exactly follow this, but I couldn't be bothered to find the exact values for all. For example contrast huskar and witch doctor, huskars spear appears to be released above his head, perhaps still within the bounding radius, while wds attack is released from somewhere in front of him approx in the middle of the height his model. In the case of obsidian destroyer it doesn't even seem to be consistent among animations where one appears to have its projectile start from way higher, though it may be visual trickery.
    Last edited by Siesta Guru; 11-06-2017 at 11:31 AM.

  3. #33
    Basic Member
    Join Date
    Sep 2017
    Posts
    56
    Tested a bit and you're indeed right nostrademous, turns out it's 0.333
    I'm not convinced it depends on fps though. These are gameticks and should remain the same across all players right? Otherwise you'd have players going out of sync. It definitely doesn't change if you change the host_timescale, which gives insanely high or low fps per game tick.

  4. #34
    Basic Member
    Join Date
    Dec 2016
    Posts
    733
    Cool, good to know my guesses are still accurate at times :P

  5. #35
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,022
    Quote Originally Posted by Siesta Guru View Post
    I'm not convinced it depends on fps though. These are gameticks and should remain the same across all players right? Otherwise you'd have players going out of sync. It definitely doesn't change if you change the host_timescale, which gives insanely high or low fps per game tick.
    Well the tickrate is considered to be the closest thing to a server FPS. In Custom Games there is a FrameTime() function which should do what we need since it's the time between the last frame. Having said that, while we doo need something like GetLastFrameTime(), , ideally we'd also need a GetAverageFrameTime() which should return the average delta within the last minute. This should cover most cases I think. (or GetFPS() since both would get the job done)
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  6. #36
    Basic Member aveyo's Avatar
    Join Date
    Aug 2012
    Location
    EU West
    Posts
    2,929
    ?! tickrate is the server fps and it has been limited to 30 since 2013 (used to be 40). Sure, it falls below it at times specially for custom games, but overall should be considered stable and fixed. What is this talk about client fps? Having higher fps does not accelerate your game / influence cast-points / turn-rates / projectile speed. Just ignore it and consider everything at 30.

  7. #37
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,022
    From a technical point of view, the delta between frames cannot be set to a fixed value, but rather capped, which is why I said it is the closest thing
    Sure, it's been considered a synonym since forever because of the way it works under the hood and been 30 (I admit, I didn't know about the times when it was 40, I thought it has always been 30). The reason the discussion started for FPS is not because it influences cast points or turn rates, but rather a factor to calculate the precise time to last-hit between frames. The reason client FPS was discussed is because they were testing on their own PCs. While bot matches are played on the main servers, especially considering the upgraded horsepower, it can be considered 30 by default, as you said, but I have a feeling Siesta was considering local games as well where the FPS is not always known, since there are people playing on low-end PCs as well.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  8. #38
    Basic Member aveyo's Avatar
    Join Date
    Aug 2012
    Location
    EU West
    Posts
    2,929
    Too much self-aware for them bots.. what's next, considering clock-drift, ping plotting, if we alt-tabbed, os/av updates lowering fps, cosmetics lowering glance-value?

  9. #39
    Basic Member
    Join Date
    Sep 2017
    Posts
    56
    You jest on the glance value but that kind of stuff is definitely a bit of a problem with illusions. The ways bot identify illusions if they do it at all is going to be completely different from players, so will always feel weird. Humans: this unit doesn't move as I expect it to, or: this unit cast an ability while there's 3 copies, or: I just saw an illusion rune, better be careful. Bots: this PL illusion out of 10 others just dealt less damage than expected!!

  10. #40
    Basic Member aveyo's Avatar
    Join Date
    Aug 2012
    Location
    EU West
    Posts
    2,929
    I'm sure one of you guys can code that "this unit doesn't move as I expect it to, or: this unit cast an ability while there's 3 copies, or: I just saw an illusion rune, better be careful" just right!

    But then again, even 10k mmr pro's can be fooled by the way 2k's move on the map

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •