🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

My bot ! [Was : All bots so far...]

Started by
62 comments, last by ToohrVyk 20 years, 11 months ago
hehe damn all your bots kill me, but iam working (on something that currently doesnt work...) but u can try to loose against Improoved Stupid eMan he will show u that grenades/cocktails are useless in the current version, bcuz not accurate, need to much time till explosion and do not much damage (enemy shoots my bot 10-20 times before my nade explodes with some 13dmg)... ok hes not really calculating anything, just dancing xD


T2k
Advertisement
Oh man, it sounds like you guys are having so much fun. I hope the compiler issues are fixed soon...

|.dev-c++.|.the gimp.|.seti@home.|.dbpoweramp.|.torn.|.=w=.|

@ToohrVyk:
still with the predicting, it doesn''t seem to work at all when I do more testing (it just worked in one quadrant?), with the other 3 my bot just loses sight of the enemy cause it turns away (due to the aim angle).

This is what I am doing:

aimAngle = EnemyObjDirection + (((EnemyObjDirection - lastEnemyAngle) * EnemyDistance) / 80.0f); 


but the results are incorrect. Also note I am using ObjDirection and not Direction (is this correct?). I have also experimented with just using ''direction'' but same results.


Thank you for your help
hey guys, thanks for posting your bots! i will post mine tomorrow. then i''m gonna take a break at least ''till the wall and the tree line-of-sight bugs are fixed (i predict that when this happens, we will see a huge explosion in our bots potentials! we can actually start doing navpoint systems and stuff!)



A headache, ancillary; an hourglass auxiliary.

"something witty, blah, blah, blah"
--That One Witty Guy (remember? that one dude?)


------------------------------------------------------- A headache, ancillary; an hourglass auxiliary."something witty, blah, blah, blah" --That One Witty Guy (remember? that one dude?)(author of DustBot)
You don''t want to use ObjDirection...

To lay it out clearly : at each moment, you see the enemy at an angle A. You want to fire on that moving enemy, so you need an angle B so that when you fire, the enemy is at a (-B) angle.

Now, you''re expecting to hit him, so you need the enemy to move from (-B) to 0 while the shot is travelling toward him. So he has to run over B degrees in a (Distance/ShotSpeed) time.

What you''re looking for is B, and you have a relationship between B, Distance, and Shot Speed. But that''s not enough. You also need angular velocity, so that :

B = AngularVelocity * (Distance/ShotSpeed).

Of course, you can''t predict exactly what the Angular veolocity of the enemy will be, but you can calculate it each update, like this:

AngularVelocity = Delta(A) / Delta(Time).

Since we get the data each update, we might use Update == Delta(Time), so this becomes:

AngularVelocity = Athisupdate - Apreviousupdate.

This seems correct since Apreviousupdate + AngularVelocity * 1 = Acurrentupdate.

Now, if AngularVelocity stays constant over a time, there are chances it will stay so. We will therefore take into account angular velocity when shooting.

Then, for aiming purposes, always act as if the enemy was at angle (A + AngularVelocity * Distance / ShotSpeed) instead of A, and fire.

ToohrVyk

thank you for that, I had just forgotten that the angular velocity has to stay constant. I was trying to predict at all times.

thanks alot, btw how's 2.0 coming?

EDIT: another question, can you only use prediction if the angular velocity is constant. If I change it to use prediction with a 5% difference, it brakes everything (i.e. I end up facing the wrong angle).


[edited by - particleG on August 6, 2003 10:21:58 PM]
Heh, I just played Devious 1.8 with real-time taunts enabled (v2, debug mode). Love the animation It has inspired me to change my alternately flashing "BRING" "IT" "ON" to a scrolling text field

[twitter]warrenm[/twitter]

In the beginning, I didn''t wait for it to be constant, that is I was coputing it each frame. But when I played against leftie, who frantically switches strafe direction each update, I was constantly shooting too far (it''s moving left, so I''ll shoot left, but then it immediately starts moving right, etc...).

I doubt that Vicious (Devious 2.0) will use prediction. It appears that the 1.9 system ( that''s my 2.0 beta) does not work against HappyBot ( 0% kill rate), but will move a slightly different way which I''m quite proud of

It all came from a bug in my code, and Devious 1.9 began doing funny things. The kind of things that make you say "oh, dirty evil bastard"... So I serialized it, and it became apparent that usually bot''s aren''t coded to react correctly to that situation - unfortunately, while he was better, 1.9 didn''t do it very well either, so he eventually lost himself and happybot was faster in finding him again...

ToohrVyk

I have also removed prediction from my code (just gave up on it). It still didn''t work and I am suspecting VC.NET is at fault. The prediction worked a bit but then for no reason my bot turned to the left or right so that the enemy was at the edge of my FOV (with constant angular velocity). I could never figure out why it did that so it is now gone. I still liked it for long ranges but forcing my bot to turn around scanning for the enemy while the enemy had it in its FOV was killer.

Trying to figure out this prediction has left my bot, well nuetered. I removed so much of the code trying to track that bug that all my bot does now is run up (keep some distance) and attack. No strafeing, no hiding or anything. The FSM is left with 2 states (search + attack_0) when before it had 7. I wish I had a backup of the original.

I dunno if I am gonna fix up my current bot or wait until this contest moves from beta. Too damn much work and I am not looking forward to it.
quote: Original post by particleG
I have also removed prediction from my code (just gave up on it). It still didn''t work and I am suspecting VC.NET is at fault. The prediction worked a bit but then for no reason my bot turned to the left or right so that the enemy was at the edge of my FOV (with constant angular velocity). I could never figure out why it did that so it is now gone. I still liked it for long ranges but forcing my bot to turn around scanning for the enemy while the enemy had it in its FOV was killer.

Trying to figure out this prediction has left my bot, well nuetered. I removed so much of the code trying to track that bug that all my bot does now is run up (keep some distance) and attack. No strafeing, no hiding or anything. The FSM is left with 2 states (search + attack_0) when before it had 7. I wish I had a backup of the original.

I dunno if I am gonna fix up my current bot or wait until this contest moves from beta. Too damn much work and I am not looking forward to it.


Sounds like possible LOS issues. That will be resolved in the next update. You may be more interested in it.. lots of defect fixes.

Admin for GameDev.net.

This topic is closed to new replies.

Advertisement