DeviantART and Wacom are proud to present the second Intuos4 "Bring Your Vision To Life" contest! Open to all artists all over the world, we challenge you to show us your dreams and aspirations for the future. Get drawing!

Artist's Comments
Autonomous pursuit and evade.
The two bots start at identical positions with identical velocities, and the target is a moving bot with a constant velocity. The pursue bot alters it's velocity to head towards the target, the fleeing bot away from the target. A cross hair shows where the pursue bot is currently aiming, as it estimates the intersection of the pursuit bot/target bot velocity vectors. Bots implement rudimentary inertia and torque. The demonstration will reset itself when the seeker hits the target. Behaviors are modular and can be added to any bot with no specialized code modifications. This one is a little buggy, and if the bots disappear, you'll need to reload the page. Steering algorithms outlined and adapted from [link] Raw code dump can be found at [link] . Designed to be compiled using the mxmlc compiler, though you could easily integrate it into your .fla files. One day I'll write up a tutorial. Comments
I'm too dumb for this stuff
-- 98% of deviantART posters use a quote like this. If you're one of the 2% that doesn't, copy and paste this into your signature. Go visit *vanlubeck and say, "Hi!" 2D whatnow?
I think you're making up words -- 98% of deviantART posters use a quote like this. If you're one of the 2% that doesn't, copy and paste this into your signature. Go visit *vanlubeck and say, "Hi!" very kewl. AS3?
-- My blog--> [link] Life is a Tale, Told by and Idiot, Full of Sound and Fury, Signifying Nothing. ---Shakespeare thanx.
-- My blog--> [link] Life is a Tale, Told by and Idiot, Full of Sound and Fury, Signifying Nothing. ---Shakespeare You're developing an orbit if you will. Since in this there is something moving seeking something moving, the Pursuer get's 5 pixels away, not enough to trigger it, then the Evaders animation cycle moves it whatever ammount. Pursuer check for hit again, none, so it continues on a velocity that in one cycle over shoots the Evading shuttle past the error margin wherein the evader then makes it's move, then the pursuer "turns around" and over shoots it. and so on and so on. It's never checking for it's hit when it's in range, only when it's slightly out of it. Try trimming you top speed for the Pursuer, or implement a granular simulation, wherin the move function just increments position[0] and position[1] by 1. and just call the move function in a loop that is terminated when the number of times move is called = the velocity. i could write out some pseudo code. but that's your problem. It's a situation that will happen a lot, when a simple hit detection algorithm is used. That's what i get anyway from looking at your code.
-- Courtesy of The Cheshire Catalyst Awesome, thanks very much for the link to that steering behaviors page. Ive been working on a game for a while now and that link will help my AI alot!
-- This guy likes Julie |
|
Critiques
Thank you for your Critique
You are not logged in.