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

Defect Reports v0.2

Started by
89 comments, last by khawk 20 years, 10 months ago
quote: Original post by Dragon88
quote: Original post by Khawk
quote: Original post by Dragon88
I''m not sure if this is the right place to ask this, but here goes. How does one fire a grenade? The code i have essentially calls SelectWeapon(WEAPON_COCKTAIL) (for some reason it doesn''t work as WEAPON_GRENADE) and then Fires(), but instead of firing a grenade it just stands there.


For one, it sounds like you have the wrong version of the arena. WEAPON_GRENADE is in the latest 0.2 release. You have the sequence correct, though. I think the only thing you may be forgetting (or not knowing) is that when you select a grenade, you have a 2 second delay before it can actually fire - this means it will go through the Update() a few times before the grenade is actually thrown.

quote:
Also, is there a way to detect if u are up against the edge of the map? One more thing, why does GetObjectsInSight expect 5 parameters, while readme.txt only lists 4?


Yes and no. If you aren''t getting any objects returned from GetNumObjectsInSight, then chances are you are either in a corner or at the edge, although if you''re at an edge, you should get a return from GetObjectsInSight with one of the objects being a wall.

Also, if the readme.txt you have only shows 4 parameters for GetObjectsInSight, then you definitely don''t have the latest arena version. Make sure to check the sticky thread for the minor update of GDArena v0.2.




I''ve downloaded that minor update twice, and in hasn''t updated it to WEAPON_GRENADE either time, so i don''t know if u uploaded the wrong file, or have a bogus link... When my bot is up against an edge, it doesn''t return anything, as in 0 objects in sight, i don''t know if this is because i''ve used the wrong update, or not... I''m gonna try the file in the other sticky thread...

EDIT: I just downloaded both of the files in the sticky threads and tried each seperately, neither of them changed WEAPON_COCKTAIL to grenade, and neither of them changed the readme to reflect the five parameters for GetObjectsInSight, i''m kinda thinking u forgot something...

EDIT2: However, my bot does throw grenades now.

EDIT3: LOL, yeah, i know. What are direction, and objDirection (in GetObjectsInSight)?


I''ve double checked those zip files, and they all have the updates. Make sure you are overwriting the files if you are putting them in the same folder. Direction is the direction angle an object is located, relative to your orientation angle. objDirection is the orientation angle of an object, relative to your orientation angle, but it''s only useful for enemies because all other objects return 0.0. Of course, objDirection is not working properly right now anyway..

Admin for GameDev.net.

Advertisement
quote: Original post by JohnBSmall
My bot has got stuck on large rocks, twice (doesn''t matter which way my bot turns, it can''t escape). Possibly managing to get into the rock radius and not being able to get out again?

John B


That''s what the problem is. I made a small change in the minor update to the collision checks, so I can remove that change and it will be back to normal.

Admin for GameDev.net.

Just to sum up a few of the wall-detection issues we''ve been seeing so far, most of which have been mentioned here on some post or another:


1. The north, east, and west walls can all be detected from up to 160 units away. The south wall can only be detected from 80 units away.


2. As previously mentioned, a bot''s radar cannot directly detect a wall; it can only detect a point on the wall which is the player''s projection onto the wall. An example of where this becomes a problem: My bot is running northeast (up-right) and runs into the northern (top) wall. He grinds against the wall as he slides along it, but does NOT detect it; this is because the wall itself cannot be detected. The bot''s projected point onto that wall (which lies directly north of the bot, and is the only piece of the wall that can be seen by radar) is outside my east-northeast facing view cone. Thus it is possible to be "facing" a wall, close to it, even touching it and running into it, and yet not detect it even though it is in plain view. This may be a defect or it may be the intended behavior. KHawk''s comments:

"If you aren''t getting any objects returned from GetNumObjectsInSight, then chances are you are either in a corner or at the edge"

and

"I figured that if you are not getting any returns from GetNumObjectsInSight(), then you _have_ to be in a corner."

...seem to indicate that this is as-intended, but his comment:

"although if you''re at an edge, you should get a return from GetObjectsInSight with one of the objects being a wall."

...is slightly confusing since this is not true in the current build (as per my above example). KHawk, can you help clarify the issue at all?


3. Theta angles returned for detected wall objects are given in right-handed polar coordinates (positive yaw to the left) while all other objects are given in left-handed polar coordinates (negative yaw to the left). This seems like a plain-old defect, but KHawk''s comment:

"It''s sort of an experiment. I thought it made a little more sense to have the direction this way for walls, but I wanted to see everyone''s reaction. If people want it to be the same as the other objects, I can do that."

...seems to indicate that it was intentional. Right now I''m simply inverting the theta on any object of type OBJ_WALL I detect, but that seems silly and I was wondering what the benefit was of reversing thetas for wall objects.

Thanks, and keep up the great work!
-sq
quote: Original post by Khawk
Have you tried using mingw with the minor update of GDArena v0.2? It includes the __cdecl, but I was going to try the stdcall next if that didn''t work.


THANKYOU!
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.
quote: Original post by Khawk
They work. That''s all there is to it. A perpendicular line is drawn to the wall and the angle to the wall is based on that line. The line has to be in the bot''s FOV in order for the wall to be visible.

Hm...that seems kinda weird...you could be standing right next to a wall, but if you''re at an angle of more than 40 degrees from perpendicular to the wall you wouldnt be able to see it.
I don''t know if it''s a good method, but one thing I have been doing is keeping track of how far my bot goes before making a turn (which would occur if he is too close to an object) If this distance traveled reaches a certain (somewhat large) number, I can conclude that I am running against something. From there, I can tell my bot to make a 90 or 180 degree turn, and reset the distance traveled to 0. The main reason for this is, of course, problems detecting walls.

Another possible solution I have thought of is to have my bot "recon sweep" every once in awhile, to get a different angle on objects (and hopefully detect the walls)

Just some random ideas.
Peon
How do I set the range the grenade is being thrown to? This should have been included in the readme/icore.h, right?

"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"
Member of the Shove Pouya Off A Cliff club, SPOAC. (If you wish to join, add this line to your signature.)Member of "Un-Ban nes8bit" association, UNA (to join put this in your sig)"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"
I think there's a problem with the field of view. The bot doesn't tend to see objects which are directly in front of it, but the objects need to be detected from either of the edges of the FOV before it sees it, and if another object is detected at the FOV-edge, it stops seeing the former object. Well, my bot's obstacle avoidance is just horrible due to this, and ends up getting stuck in a corner or a cluster of objects most of the time. Anyone else having this problem?

[edited by - liquidAir on August 10, 2003 3:39:19 PM]
The grenedes range is passed on the angle its thrown.

-----------------------------------------------------
Writer, Programer, Cook, I''m a Jack of all Trades
Current Design project
Chaos Factor Design Document


no problems, your navigation system is just broken!

and people stop complaining about walls, you can do away with them. My bot just ignores all walls it sees, you seriously don''t need them for navigating.

This topic is closed to new replies.

Advertisement