fguihen Posted October 19, 2004 Posted October 19, 2004 hi. i have a bot that is moving around between obstacles and other bots. has anyone got an algorithm or ideas on how to do this. the walls and objects are just red rectangles. the bots are just moving yellow circles. i cant do something to detect difference in color, as this requires objects to be touching, but i want my bot to avoid objects before it gets near t Quote
Leaders Iceplug Posted October 19, 2004 Leaders Posted October 19, 2004 http://www.xtremedotnettalk.com/showthread.php?t=89117 Maybe I don't know exactly what you mean by "avoid objects before it gets near t", but preventing the bot from walking past walls is usually enough. Quote Iceplug, USN One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(
fguihen Posted October 19, 2004 Author Posted October 19, 2004 Quote http://www.xtremedotnettalk.com/showthread.php?t=89117 Maybe I don't know exactly what you mean by "avoid objects before it gets near t", but preventing the bot from walking past walls is usually enough. what i mean by avoining objects is like when your walking across a room, and theres a table in your way , when you get within a certain distance of it you start to move either left or right to avoid bumbing into the table, but your still avoiding other objects such as people as you avoid the table. i want to be able to avoid walls, objects and other people by continually adjusting my position left or right. does this make it clearer? its a bit hard to describe Quote
Leaders Iceplug Posted October 19, 2004 Leaders Posted October 19, 2004 Sounds like you want do something like pathfinding. You may want to look up a pathfinding algorithm on the net, like A*. I haven't looked at it yet, but this is probably what you want. Quote Iceplug, USN One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.