🎉 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!

Walls && Direction == -180

Started by
4 comments, last by CatWoman 20 years, 10 months ago
KHawk, I first want to say thanks for bringing this contest to life, and dealing with all the beta issues in a nice & timely manner. But I have one more thing that I think needs to be resolved. I have a loop that checks the current scan of objects in sight. In this loop I have the bot taunt out if it sees an object in it''s rear view if it sees an object with direction of -180. (I even tested +180 just to be safe.) So, far, so good, except, you cannot detect walls with this. My bot is running backwards and not getting stuck on any other object but only on walls when it runs into one backwards. Please help! >-CatWoman-< >>--Beware of the Cat--<<
>>--Beware of the Cat--<<
Advertisement
Actually, that is done on purpose. Instead of adding walls to the visibility radius, I made walls visible within a 90 degree FOV instead of the 80 degree FOV. Nobody should get stuck with this wider FOV because they should be able to see two walls at the same time.

Admin for GameDev.net.

Actually, I had to work around that because the fov may be at 45 degrees, but you never see the wall at exactly 45 degrees. It appears between 44.5 and 43.5 degrees.

So, with your explanation, this is not substantiated in the actual implementation. I''ve had to keep track of all of the objects in two updates of GetObjectsInSight in order to find both walls at the same time. There are never two walls in my fov in the same GetObjectsInSight, even if my bot is standing directly in the corner looking t the corner, still only one wall is spotted at a time.

With the turning speeds as they are, the degree increments of the registered turn do not allow for each degree to be "seen" in the movement updates.

An fov of +/- 47-50 degrees would fix seeing only one wall per update cycle.


>>--Beware of the Cat--<<
>>--Beware of the Cat--<<
Hello CatWoman and KHawk,
I believe CatWoman is correct, as far as all the testing I've done, only 1 wall is able to be seen during one update cycle. I have a v.4 bot to prove this, walk around and the bot will let you know how many walls it sees.

Also, I believe it disproves your readme file

quote:
"The direction parameter stores an angle in degrees in the range of -40.0 to 40.0. If the angle is less than 0.0, then the object is to the left. If the angle is greater than 0.0, then the object is to the right."


This seems to be reversed. What's going on?
From this test, it shows,
dir<0.0 = right
dir>0.0 = left

Make sure debug mode is enabled so the taunt is enough characters long.

Download http://www.aeroum.com/GDArena/IC1Wall.dll

[edited by - aeroum on September 1, 2003 4:42:50 PM]

[edited by - aeroum on September 1, 2003 4:48:22 PM]
I''ll make the change so the 90 degree FOV is included properly.

The returned wall direction is also purposely opposite of other objects. The thought process behind this is so you know how far to the right or left your bot is in relation to the wall perpendicular, as opposed to how far to the right or left an object is in relation to your bot.

For instance, if you get a return of -30.0 on a wall, then that means your bot is facing 30 degrees to the right of the wall perpendicular. I''ve explained this in another thread somewhere in this forum.

Also, I''ve come up with a solution for walls, but it will not be included in this version of GDArena.

Admin for GameDev.net.

quote: Original post by Khawk

Also, I''ve come up with a solution for walls, but it will not be included in this version of GDArena.


just curious, could you let us know what type of solution you are planning (no need to explain exact implementation details)?

thanks




-------------------------------------------------------
A headache, ancillary; an hourglass auxiliary.

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

(author of DustBot)

------------------------------------------------------- A headache, ancillary; an hourglass auxiliary."something witty, blah, blah, blah" --That One Witty Guy (remember? that one dude?)(author of DustBot)

This topic is closed to new replies.

Advertisement