Jump to content
Dante Unbound: Share Bug Reports and Feedback Here! ×

Npc Accuracy


[DE]DanielB
 Share

Recommended Posts

The system should incorporate temporal lag. 

 

Let me introduce the concept of temporal lag: 

 

Critical Targets - initially Tenno and Bosses only - would have a Temporal LOG. On each frame of simulation time, the critical target would be on a specific position, moving on a specific vector at a specific speed. This would be be recorded, with a cap. Let's say the game simulation (and netcode) runs at 30 frames per second, this log will have the same pace. It would be capped though, at 300 frames (or 256 or whatever) to conserve resources.

 

Depending on enemy rank, level, eximus-ness, and any variable you can think of that should affect accuracy, the enemy would either:

 

Use the latest sample from the Temporal LOG;

Use a previous sample from the Temporal LOG, T frames behind.

 

T would be higher depending on the factors penalizing accuracy. 

 

Tenno powers which cause slowness would increase the T penalty.

 

The T-penalty alongside the Temporal LOG would be invaluable to reinforce the importance of Tenno's mobility. A Tenno standing still is filling its Temporal LOG with the same value, wasting a potential debuff to the enemy. The faster the Tenno moves, the more it extracts from this potential debuff. 

 

T can be used in new Temporal-based powers to simulate time drift and make Tennos appear to be somewhere else in the eyes of the enemy, or in Dark Sector PvP. 

 

 

Depending on the resource consumption, the Temporal LOG feature can be added to every enemy. 

 

Exploring and expanding the Temporal LOG (TL):

 

Programming-wise you may want to call it Temporal Buffer, if you will.

 

How much memory would it take? 

 

Assumptions:

 

The simulation runs at 30 fps (regardless of screen fps)

The TL is collected at the same rate as the simulation

The TL has an initial cap of 10 seconds - 300 frames

 

If we consider that each TL entry requires 256 bytes - I think I'm overshooting even, but 8x32 bits seems to be more than enough to store position, direction vector and speed. 7 x 32 bits values should do it, and maybe less it there are tricks involved. But let's go with 256 bits, which are a power of 2, for simplicity.

 

300 frames x 256 bytes =  75 Kbytes per warframe.

 

Considering that the devs have announced 8 player raids, and the boss with the most instances has 4 enemies (Hyena Pack), that would be an initial implementation of 12 instances of TL tracking. 

 

75KB x 12 = 900KB. Less than 1MB of information to keep.

 

Now that we have this figure, we can consider whether it's viable to have all mobs with TL. Let give it a generous cap of max. 120 mobs spawned at the same time. That would be an additional 9MB of data reserved for MOB TL. 

 

Al in all, this information would cost 10MB of memory to keep track of, for 10 seconds of high-resolution positional and vector history. 

It can have its resolution halved and time doubled for the same cost, or 1/3 res. + 3x time. Of have the size just doubled for a history twice as big. 

 

More nerdily, it could have full resolution for the first 2 seconds, half resolution for the next 4 seconds, and quarter resolution for the rest. 

2 second full resolution = 60 frames 

4 seconds half resolution = 60 frames

quarter resolution for the rest = 180 / 7.5 = 24 seconds

TOTAL = 30 seconds of history. 

With the same 10MB of memory for all units, or a whole minute with 20MB. (and I'm overshooting with the number of bytes required)

 

This short-term memory would be a very useful resource immediately as an extra input for weapon precision.

In the future Tenno Powers - or Boss Powers - can be used to take advantage of that for further, interesting effects. 

Edited by BrazilianJoe
Link to comment
Share on other sites

sounds good until you consider mob scaling , and the rifle / shot gun  short - middle  distance  the graph which wasn't shown 

 

Are the mobs not going to have scaling accuracy i dough  it ?  With scaling accuracy  the problem we currently have are going to just be replicated just this time for every one not just the host . 

 

Plus setting any mob at 100% accuracy at any distance  going to  have issues 

 

if this goes live in it's current form the aim-botting is going to get worst  

Link to comment
Share on other sites

I think you are missing a very important piece to this accuracy formula and that is movement.  If both targets are standing still, then it is fine to hit 100% accuracy, but when the shooter or the target is moving, there should be a scaling accuracy debuff based on movespeed assuming the movement vector is not directly at the target. 

Link to comment
Share on other sites

Enemy accuracy has been a hot topic for some time, so I thought it would be a good topic for a Developer Workshop post to explain how the system works under the hood and what changes are coming in this week’s update on PC.

 

We’ve been using the same system for controlling NPC aiming for quite some time now - all the way back to the original Dark Sector! When an agent wants to shoot at a target, we consider a cone based on the agent’s accuracy, the distance to his target and the size of the target he is shooting at. We calculate a hit chance and then test to see if he should hit or not. If the shot should hit, we aim the shot at the target. However if the shot should miss, we calculate a position for the agent to aim at that should miss the target, but that should be in the target’s field of view. This should make the situation feel more intense with the player seeing ricochets and tracers hitting all around them.

 

[...]

 

-DanielB

 

Why dont you aim hitscan weapons a bit behind a player (relatively to a shooter) to allow moving player a better chance of evading? This simple trick has been used in many games ei as old as Quake1 and doesn't need any complex calculations.

Link to comment
Share on other sites

Has the Grineer accuracy bug been addressed? I mean, we've heard about it (they became super accurate because archwing) and that's why ballistas have been complained about, but no one's ever said a thing about if it has been actually fixed.

This thread is about how the differences in accuracy should be fixed up this week.

Link to comment
Share on other sites

1.  This is why I've said this change needs to happen before DE gives enemies (like Nullifiers) easymode 'tells'

 

2. Can you explain exactly (within reason of course) what you've identified as the problem which created a difference in accuracy when playing as a host/client?

 

This thread is about how the differences in accuracy should be fixed up this week.

Only in the last blurb does he say [oh btw, fixed that thing].

 

I kinda expected this post to explain how they found it, what they did about it, and whether or not there will still be a discrepancy between playing as a host or client.

Edited by Thaumatos
Link to comment
Share on other sites

It is my duty to mention this here that currently the whole new accuracy system appear to work differently to hosts than it works towards clients. It often appears clear that in grineer missions hosts will have enemy accuracy being far higher towards them than towards clients.

Link to comment
Share on other sites

When an agent wants to shoot at a target, we consider a cone based on the agent’s accuracy, the distance to his target and the size of the target he is shooting at. We calculate a hit chance and then test to see if he should hit or not. If the shot should hit, we aim the shot at the target. However if the shot should miss, we calculate a position for the agent to aim at that should miss the target, but that should be in the target’s field of view

 

This has got to be where the issue was.  Was data being misrepresented to the host from clients while moving?  If you move as a client, the AI appears to shoot at it's maximum distance behind you that would still be in your 'field of view' regardless of how close or how far you are to the target.

 

If that was the case, and the data is being represented properly now, the new graphs will work fantastically on hosts and clients as far as making enemies feel different when played against.  If the data still gets misrepresented, you could end up with a situation where clients feel an entirely different game than intended, and not just easymode.

 

DanielB can you shed a little light here?  Is this all a bunch of garbage I've pulled out of thin air or is there any sense to this? :p.

Edited by Thaumatos
Link to comment
Share on other sites

SO...what about "Corrupted Bombard"?

 

does it still have 100% Accuracy and 100% Chasing Ability?

if it does....than this update will be still a joke just like ember's nerf update.

 

and most importantly......

 

Corrupted Nullifier still can  strike me down one shot at 40m range....

 

DOES THIS NORMAL TO THE PLAYERS?

Edited by Diablo-X322
Link to comment
Share on other sites

Hi everyone, 

 

Thanks for the responses, here's a little more info for you.

 

The agent's base accuracy multiplies with the weapon's AimGraph, so we could create a super accurate sniper and we could also create a sniper who can't hit the broadside of a barn! The acrobatics penalty gets subtracted from this hit-chance though, which means that they can have a big impact on the result. The final hit chance is clamped to 0-100%, so that we always have valid numbers to work with.

 

The acrobatics modifiers take into account a number of different things. Your speed of movement will increase the penalty applied to the NPCs. We do take into account any speed mods or powers you use. But more importantly, sprinting directly towards the enemy will have less impact than running across his field of view.

We also take into account different acrobatic moves that the Tenno can peform. Wallrunning, crouching, dodging, jumping and sliding all apply modifiers to hit.

The actual values may be tweaked, however wallrunning gives you the biggest affect, followed by dodging, jumping and sliding and crouch only applies a small amount. The value for speed will depend on your warframe and equipped mods and powers being used, but will ramp up to the same amount as the doding at the highest end.

 

These modifiers all stack, so sprinting in a wall-run across an enemy's field of view and jumping off will greatly reduce the chance of taking hits!

 

The client vs host issue was a result of our AI all running on the host and some network lag. That forum post I mentioned really helped us track down the bug, so thanks everyone for that. Our aiming and hit / miss calculations were being done on the server but if the client was moving and there was a reasonable amount of lag, the aiming would be far off on the client. The shots were actually hitting the client's avatar on the host, but were missing on the client. We feel that as a client, you should only take damage if you the shot actually hits you on your own instance of the game.

We have now moved the hit / miss and aiming calculations to the client, which results in everyone having the same experience.

 

-DanielB
Link to comment
Share on other sites

 

Hi everyone, 
 
Thanks for the responses, here's a little more info for you.
 
The agent's base accuracy multiplies with the weapon's AimGraph, so we could create a super accurate sniper and we could also create a sniper who can't hit the broadside of a barn! The acrobatics penalty gets subtracted from this hit-chance though, which means that they can have a big impact on the result. The final hit chance is clamped to 0-100%, so that we always have valid numbers to work with.
 
The acrobatics modifiers take into account a number of different things. Your speed of movement will increase the penalty applied to the NPCs. We do take into account any speed mods or powers you use. But more importantly, sprinting directly towards the enemy will have less impact than running across his field of view.
We also take into account different acrobatic moves that the Tenno can peform. Wallrunning, crouching, dodging, jumping and sliding all apply modifiers to hit.
The actual values may be tweaked, however wallrunning gives you the biggest affect, followed by dodging, jumping and sliding and crouch only applies a small amount. The value for speed will depend on your warframe and equipped mods and powers being used, but will ramp up to the same amount as the doding at the highest end.
 
These modifiers all stack, so sprinting in a wall-run across an enemy's field of view and jumping off will greatly reduce the chance of taking hits!
 
The client vs host issue was a result of our AI all running on the host and some network lag. That forum post I mentioned really helped us track down the bug, so thanks everyone for that. Our aiming and hit / miss calculations were being done on the server but if the client was moving and there was a reasonable amount of lag, the aiming would be far off on the client. The shots were actually hitting the client's avatar on the host, but were missing on the client. We feel that as a client, you should only take damage if you the shot actually hits you on your own instance of the game.
We have now moved the hit / miss and aiming calculations to the client, which results in everyone having the same experience.
 
-DanielB

 

Will directionality play a part? As described, it sounds like interesting angles of attack(above, from the side, from behind) won't give as much of/any bonus compared to what they used to--moving directly toward someone from the front should give less of an accuracy hit than moving directly towards them from a peripheral location.

 

Also, semi-relatedly, shouldn't visible size count? The notation on crouching makes it seem like cutting the target area in half(by crouching) wouldn't cut the accuracy in half(it should, smaller target, right?). Likewise, taking partial cover would also decrease the amount of available surface area, again, making a smaller target, but as described, it sounds like a tenno with just their foot showing, but standing still(and standing up) would be easier to hit than one running straight at them. That doesn't quite make sense.

Link to comment
Share on other sites

Wow, that is a really interesting workshop. (Workshops are very cool,we should have more of them)

 

I'd just suggest 2 little thing to make enemies shooting greater :

 

1) Why not also pair the accuracy a little with the NPC's level? 'Cause you know, a lvl 1 lancer could have less skill than a lvl 50 lancer.

 

2) Can sniper units get a nearly invisible laser attached to their scope? Enough to make you notice that you're being aimed at, without making it too telegraphable.

 

Good news, this may really be the year of quality you're talking about!

Bolded cause I really like that idea.. and wish it in the game. Their other comment applies as well.

 

I think you are missing a very important piece to this accuracy formula and that is movement.  If both targets are standing still, then it is fine to hit 100% accuracy, but when the shooter or the target is moving, there should be a scaling accuracy debuff based on movespeed assuming the movement vector is not directly at the target. 

I would also like to see armor weight come into this.. which might make them 'slower' to aim, if they have more armor (Heavy Gunner) But if they are a Lancer then they would aim faster.  (Shield Lancers have heavy shields would make them slower and also random aim as they can't see over shield.)

Link to comment
Share on other sites

Additionally, the agent’s accuracy now will take some time after spotting you to ramp up to his maximum. No more sneaking up on a sniper only to have him spin around and instantly shoot you in the head!

 

Does this "spotting" ramp-up also apply to re-spotting?  If Loki comes out of invisibility or Ash suddenly teleports behind the line of snipers, they shouldn't immediately know where he is let alone have perfect aim.

Edited by Amarsir
Link to comment
Share on other sites

can you confirm or deny sir,

 

that as the enemy difficulty goes up the likelyhood of being shot by that enemy also increases. 

 

Prior to reading this post it has always felt that the enemies are much quicker to shoot at me (regardless of what theyre doing) the higher up in level the enemy is. 

 

 

A player suggested it was just the fact that their damage is so high that im imagining it, but i almost feel as tho the enemies will recognize you sooner and react faster the tougher they are..

Edited by T4LCOMX
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...