![]() |
*BUGBUGBUG* affects all HL bots!!!
...and possibly even the official CS bots too!!
Noticed that today. When you want to make your bot strafe, basically all you do is raising the "strafe_speed" parameter of RunPlayerMove() to the bot's max speed, right ? Well have you noticed the effect ? The bots pass from a 0 velocity to full strafe speed in a fraction second ! Try to make your bots strafe left then right in a loop, to see, and try to do the same as a human player : human players can't strafe that fast !!! Anyone to confirm this behaviour by looking in the engine source code (hint hint, Mike) ? What to do ? How to fix that ? |
Re: *BUGBUGBUG* affects all HL bots!!!
Can't really test with a human since a human can't exactly press the two strafe keys at different times in 0.017 seconds :P
|
Re: *BUGBUGBUG* affects all HL bots!!!
No, what I mean is, try strafing two steps on your left, then immediately strafe two steps on the right ; you'll notice that while your player was strafing on the left it will slow down until standing still and then progressively begin strafing on the right, increasing its speed. Bots don't do that, they begin strafing full speed as soon as they are asked to. This is unfair. Try it.
|
Re: *BUGBUGBUG* affects all HL bots!!!
I've already noticed that on all bots I aready tested.
|
Re: *BUGBUGBUG* affects all HL bots!!!
Are you limiting the sidemove speed to something less than or equal to cl_sidespeed?
Is this in Counter-Strike only or did you try other MODs (Half-Life deathmatch, TFC, etc.)? I assume you are using valid msec values in pfnRunPlayerMove(), but make sure they are correct otherwise you get weird movement results. botman |
Re: *BUGBUGBUG* affects all HL bots!!!
My strafe speed is the same float value that is passed in pfnSetClientMaxSpeed(), which is normally used for setting the client's FORWARD speed... and I believe all bot authors do that too
It affects every MOD for which the strafe speed increases gradually (i.e, when you press on the button, you don't begin to move instantly full speed). I think HLDM is one of the rare that are not concerned (because of no graduation). Are client variables such as cl_sidespeed available on dedicated servers too ? If so, considering no bot author out there use this CVAR to my knowledge, no wonder our bots strafe the way they do !!! |
Re: *BUGBUGBUG* affects all HL bots!!!
My observations of bot movement agree with what PBM is saying. Bots tend to zig-zag from side to side much faster than a human can which makes them tough targets to hit, and very difficult to defeat at close range (if there's no skill penalty).
|
Re: *BUGBUGBUG* affects all HL bots!!!
yes, i have noticed this too. We should probably somehow simulate this as HL does with real players?
|
Re: *BUGBUGBUG* affects all HL bots!!!
and perhaps include it an the skill / personality system, since that reflects different type of users
|
Re: *BUGBUGBUG* affects all HL bots!!!
What I find curious is that the engine DOES filter the forward speed when you pass it in RunPlayerMove() ; if you change your bot's forward speed from 0 to its max speed, the bot's speed will raise PROGRESSIVELY. And it does not when it's the side speed. This is really weird. Do we need to emulate this ourselves or is there something we aren't doing right ?
[edit] and it is NOT the cl_sidespeed CVAR : this one is at 380, which is WAY too much already for a decent strafe speed |
Re: *BUGBUGBUG* affects all HL bots!!!
yes, i think the guys at valve forgot to do the same for strafe speed as they did with the forward speed.
I think contacting them will be one of the sollutions, it will be of no real use to simulate this. The only advantage you will have that it will look a bit more 'normal' but most people don't even notice it. Secondly, when valve DOES fix it, you end up with worthless code. You can spend your time on more urgent matters ;) Perhaps Mike already fixed while we were talking ;) |
Re: *BUGBUGBUG* affects all HL bots!!!
The problem is that I need it quite badly for my BotWalkPath() function... because my bots *do* press the strafe keys almost all the time when wandering around, they don't just have their pEdict->v.angles face the destination waypoint and their pEdict->v.v_angle facing elsewhere, I forbidden that because it was not human-like ; instead the bots zigzag and strafe like humans when walking their path, but when it comes to tight paths the bots need to make slight corrections to their trajectory, and not completely jump out of the path (and eventually fall down the ledge they were walking) each time they try to strafe a bit. Having this fixed would help a lot.
|
Re: *BUGBUGBUG* affects all HL bots!!!
Yeah I do that too PM.. I haven't paid much attention to the bots strafe speed though, I didn't notice much, I'll need to check it out sometime.
|
Re: *BUGBUGBUG* affects all HL bots!!!
As a quick and dirty fix, why not just set the bots maximum speed to a lower value just before each strafe operation?
// before strafe pst_ptrEdict->v.maxspeed = <slower than normal> // after strafe pst_ptrEdict->v.maxspeed = <normal speed> |
Re: *BUGBUGBUG* affects all HL bots!!!
The only quick and dirty fix I can think of would be to record the time at which the bot *started* strafing, and the current time, and compute the difference of both, and apply a filtering function to the maxspeed... which function we'd have to figure out ourselves, and which would obviously be not the same at all than the one players use. I'll try to do that (sampling player's strafe speed first to get an idea of the filtering function) and see what I can get.
|
Re: *BUGBUGBUG* affects all HL bots!!!
Now is it an optical illusion??? o_O
I duplicated a real player's controls (v.button and v.impulse) on a bot's ones, toggling the bot's move_speed and strafe_speed when necessary, and here's what a sampling of the bot's velocity gives when the bot starts strafing, at a 60Hz thinking cycle: Quote:
What I find strange is that when I watched this bot while I was "controlling" it, it didn't seem to strafe abnormally... while I am CERTAIN that my bots strafe abnormally most of the time. WTF ??? o_O |
Re: *BUGBUGBUG* affects all HL bots!!!
Quote:
The bot world cannot be perceived directly, but rather through the use of instruments. And, so, there is a problem with the fact that the act of measuring disturbs the behavior and movement of bots. This is called the measurement problem. - adapted from a book on quantum physics :D |
Re: *BUGBUGBUG* affects all HL bots!!!
LOL :D "the Principle of Uncertainty applied to CS bots"
anyway... I HAVE FOUND THE PROBLEM!!!!! My bots strafe almost exactly like humans now. In fact this problem seems to appear only when a bot zigzags, not when it starts strafing for the first time. When their strafe speed has raised to its maximum, if the bots suddently change their strafe direction, the strafe speed is not decreased to zero then increased again. And actually this is somewhat normal: humans can't press the other strafe key that fast, there is at least 0.2 second between the instant where the first strafe key is released and the second one is pressed, because usually the forward/backwards keys and the strafe left/strafe right keys are opposite altogether relatively to your fingers on the keyboard. My fix only constituted in adding a check for the last strafe time in the function that makes the bots press the movement keys. Not only it fixes things, but it makes the bot's movement look REALLY realistic!! w00t 8D Code:
void BotMove (player_t *pPlayer) |
Re: *BUGBUGBUG* affects all HL bots!!!
what file should we addd this to?
|
All times are GMT +2. The time now is 02:45. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.