Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

slepyii

Wall Detection and FOV (With Image)

This topic is 5448 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi Guys, Just want to bounce an idea I have for Wall detection around. It seems that most everyone has gotten used to the current wall detection setup, but I think it doesn't make much sense. I may be interpreting wall detection completely wrong so this may be a completely moot point. Why can we only see one wall at any given point in time if there are actually two walls in our FOV? I think that walls should be reported at the point where they enter the FOV farthest from the Bot instead of on a perpendicular line. This will allow for two walls to be seen at any given time if you are headed towards a corner. I have a picture of what I am thinking as it can explain what I thinking better than I can in words .    The two red squares would be reported as wall locations by GetObjectInSight in the setup that I am thinking of, as that is where the wall enters the FOV at the furthest point from the bot. The red line should be ignored. Image Key ---------    - Darkest blue is the bot.    - Medium blue, FOV of closest objects (Item only visible if it has moved since last update)    - Light blue is current FOV (Approximation)    - Green arena boundaries (Walls) I know this may be asking allot and better off for the re-write of the Arena core (if and when it happens), but it makes more sense to me, and seems to follow human vision a bit better than the current setup. Feel free to include your thoughts . - Timothy S. edited for wording [edited by - slepyii on August 14, 2003 10:37:48 AM]

Share this post


Link to post
Share on other sites
Advertisement
It makes sense to me to, as we have to change alteast 10 degrees, and up to 90 to see the other blasted wall at the moment .

If it helps, ignore the walls.
If you find a wall, instead of just capping it, just make it a barrier in the bots memory. This way it can be at any orientation (lets say your bot starts look 45 degrees off to the upper left) and the walls will then all be at 45degree offsets. It won''t matter that they are there then. It''s just a fence the bot found which it won''t cross.
Works for mine anyway.

And yes, it is harder to code, but when it works, its happy.

Share this post


Link to post
Share on other sites
oh, btw - to add to that, my idea (makes it really easy) is to basically have gdarena return data for a point on the wall (farthest, closest or left to right, doesn''t matter) and a vector.

That way you know where the wall is and you can see multiple ones at a time.
To make it a bit more human like, you could maybe get two points instead, that way it only shows the section of the wall that you can see. The Bot has to figure out how long the complete wall is by itself, but atleast it can see all the the wall in its fov, not just the closest point.

Share this post


Link to post
Share on other sites
quote:
Original post by slepyii
The red line is where the current GetObjectInSight is returning a wall if I understand things correctly.

Well, if I''m understanding your diagram right, then the red line is not the line used by the arena to tell if a wall is in your FOV.

And so, my own diagram (made in Paint, so forgive the blockiness):
wall detection diagram

In that diagram, the wall on the left can be seen by the bot, because the red line (the line perpendicular to the wall, from the wall to the bot) is within the bot''s FOV. But the wall on the right cannot be seen by the bot, because a perpendicular line from the wall to the bot would not be in the bot''s FOV.

But that''s slightly irrelevant really. I do agree that there is a problem with the current system in that even if a large section of wall is in the bot''s FOV, the bot might still not be able to see it. I''m not sure what the best way of dealing with this is though. Perhaps stick with the current form of information (ie, angle to the wall normal, and distance from the wall) but provide that information whenever any part of the wall is in the bot''s FOV, instead of only when the bot can see the intersection point.

John B

Share this post


Link to post
Share on other sites
Thanks. This proves that I was interpreting what Kevin was stating about wall detection as being incorrect (actually just backwards), so yes, my red line is incorrect and should be ignored.

As for the idea of giving two points on the wall, where it enters and leaves the FOV. My initial feeling is that makes things too easy as you could easily tell which wall you were looking at. If only one point on the wall is given at any one time then it would require a bit more work internally by the bot (though not much) to figure out the orientation of the wall and where the corners of the arena are.

- Timothy S.


[edited by - slepyii on August 14, 2003 10:07:55 AM]

Share this post


Link to post
Share on other sites
without changing the arena core, the most elegant solution is storing the walls'' coordinates, and writing a position detection algorithm, and check the coordinates against that values.

Share this post


Link to post
Share on other sites
I''m just curious, but how many people NEED the walls to orientate their bots? I''m only using them as markers so the bot knows not to run off the edge of the map, other wise they are useless.


Just thought of something. have an out of the ring area. so instead of a wall, its an area around the map that if the bot steps into they get disqualified, or loose maybe 1 health every frame (or maybe 45 frames - ie one second).

Also means we don''t have to worry about bumping in to the walls anymore

Share this post


Link to post
Share on other sites
When I get around to writing my bot, hopefully soon, I''m not planning on using the walls, though things may change. I was just stating how I thought the bot using the current interface setup should detect walls. It makes more sense to me to be able to see the walls if they are in the FOV even if you can''t draw a perpendicular line from the wall to your bot.

Figured this would also give everyone a chance to discuss the wall detection setup as I have seen a few (ok, maybe more ) posts about the current setup.

- Timothy S.

Share this post


Link to post
Share on other sites
quote:
Original post by Dredge-Master
I''m just curious, but how many people NEED the walls to orientate their bots? I''m only using them as markers so the bot knows not to run off the edge of the map, other wise they are useless.


Just thought of something. have an out of the ring area. so instead of a wall, its an area around the map that if the bot steps into they get disqualified, or loose maybe 1 health every frame (or maybe 45 frames - ie one second).

Also means we don''t have to worry about bumping in to the walls anymore


I have my bot detecting when there is nothing or nothing but a wall, in which case, it turns itself. The problem is, in wide areas, it won''t see the other bot between the wall and some object because my bot turns away to quickly.

Share this post


Link to post
Share on other sites
I''ve said this several times.. if you have a truly better way to implement wall detection without requiring major changes to the interface, I''ll consider it. Otherwise, so far, the current implementation is the best solution I have come up with.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!