Bots throw grenades from cover#1651
Bots throw grenades from cover#1651sunzenshen wants to merge 7 commits intoNeotokyoRebuild:masterfrom
Conversation
07498e9 to
ad14b7a
Compare
|
Demo with sv_neo_grenade_debug_behavior enabled: |
| } | ||
|
|
||
| bool bEnemySupportInField = false; | ||
| for ( int i = 1; i <= gpGlobals->maxClients; i++ ) |
There was a problem hiding this comment.
To start the conversation, I wonder if we should check if there are any human non-support players on the bot's team before throwing smoke. Bots don't have too much trouble navigating smoked areas, but I imagine humans could struggle to navigate on maps with fewer routes like bullet.
There was a problem hiding this comment.
One fuzzy measure could be calculating a numeric value for how "useful" the smoke would be, based on number of nearby supports, and whether they are friendly/enemy or bot/human, and try to make it such that smokes that may hinder human friendlies are to be avoided, even if they were marginally useful for some bots. And likewise avoid smokes that give advantage to human enemies based on some metric like that.
There was a problem hiding this comment.
After watching a friend try the game the other evening, I decided that for the scope of this review, I'd like to make the use of smokes somewhat conservative, avoiding disoriented humans and enemies that could exploit the smoke screen. (As one may guess, the very first thing they did was walk into a smoke cloud and then immediately became lost for the duration. 🥲 )
Then another PR could explore a more sophisticated handling of smokes. For example, maybe we could calculate a path to the smoke target, estimate the movement time needed, and figure out if a player could realistically reach and view the smoke based on their class movement.
There was a problem hiding this comment.
We've definitely entered the bikeshed, but: it might be interesting to try a kind of VR Chaperone style effect inside smokes, to represent the in-smoke fumbling player having tactile feedback of physically hitting/brushing against the wall (it's basically solving for the same thing IRL):
I imagine this might be able to reuse the friendly HUD X-ray shader stuff, but I'm not too familiar with that code.
Then another PR could explore a more sophisticated handling of smokes. For example, maybe we could calculate a path the the smoke target, estimate the movement time needed, and figure out if a player could realistically reach and view the smoke based on their class movement.
Definitely, I think we should implement some kind of code to calculate the full flight path of a grenade ahead of time, and that could be used for stuff like these bot throws, but also for training modes to practice nade throws etc like in CS (the smaller PiP screens show where that nade is going to land):
3501a89 to
d0d9fc1
Compare
Description
Bots decide whether they can throw a grenade at a threat after retreating to cover.
Toolchain