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




Ok thanks. Figured that out after my bot was throwing the grenades stright whatever I did.

"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!"
Advertisement
quote: Original post by particleG

no problems, your navigation system is just broken!


Well my code goes something in the Update() function goes like...

int iNumObjsInSight = g_pCore->GetNumObjectsInSight();for(int i = 0; i < iNumObjsInSight; i++){   g_pCore->GetObjectsInSight(i, ObjectType, Angle, Distance, ObjDirection);}switch(ObjectType){   case...   // blah blah blah}


All I need to know is, is the above procedure wrong? If so, then how do I store the object types seen and their properties (angle, distance, etc.)
That will only go through the switch statement for the last item that''s given to you by GetObjectsInSight().

John B
The best thing about the internet is the way people with no experience or qualifications can pretend to be completely superior to other people who have no experience or qualifications.
try something like that

int ObjectType[16];float Angle[16];float Distance[16];float ObjDirection[16];int iNumObjsInSight = g_pCore->GetNumObjectsInSight();for(int i = 0; i < iNumObjsInSight; i++){      g_pCore->GetObjectsInSight(i, ObjectType, Angle, Distance, ObjDirection);<br>}<br><br>for(int i = 0; i < iNumObjsInSight; i++)<br>{<br>   switch(ObjectType)<br>   {   <br>      case…   // blah blah blah}<br>   }<br>}<br> </pre> <br>  </i>  
Ok, thanks.

EDIT: Wow, obstacle avoidance works neatly and perfectly now... except for the walls, which isn't really necessary anymore because my bot can now see the other objects and manouever (sp) around them very well

[edited by - liquidAir on August 11, 2003 2:19:36 AM]
quote: Original post by T2k
quote: Original post by liquidAir
Oh no! I tested my code in the GDArena 0.2, the same I used in 0.1 where it reacted almost perfectly, except for the walls. The thing now is, most of the time, it only sees the walls, but not the objects in it''s fov. You can download my bot from here and test it to see what I mean. I used the taunt function to display the object it''s currently looking at with the angle and distance. And another thing is that it doesn''t react as it did in version 0.1 Is it my code that is buggy? or it''s the Arena''s code???


hmm my code works, so its your bot (iam actually fighting with an error flooding my object-storage ;D but i think i will find it in the next 8 hours, grml... try to use the constant deltatime of 0.02222secs (see readme)

not working, hmm :D clicky
i hope the above picture is working xD


edit: Debug mode causing Timeout ("Bot took to long") xD but only on Player1, nice handicap ...


T2k

[edited by - T2k on August 8, 2003 5:12:14 PM]



T2K, i was wondering how you made that debugwindow run at the same time as the gamedev application! i figure it is a seperate program that loads and uses your bot''s dll at the same time the arena is using it??

if not, how are you doing it?!


A headache, ancillary; an hourglass auxiliary.

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


------------------------------------------------------- A headache, ancillary; an hourglass auxiliary."something witty, blah, blah, blah" --That One Witty Guy (remember? that one dude?)(author of DustBot)
You can just create a separate window with WS_POPUP, in your Init().

What I''m curious about is whether his map is always upright with the world. I''m getting an axially-referenced orientation working, but it has to assume the first wall it sees is the east wall, and reference from there.

I like pie.
[sub]My spoon is too big.[/sub]
duh! why didn''t i just try the simple approach! thanks for reminding me to think simple, render!

got a rudimentary debug window which shows my bot''s internal map going...still need to try and figure out a good way of aligning the map (once the bot finds a wall, line the axis up with the wall?) so as to make it less confusing...anyone have any suggestions? T2K, how did you align your map to the arena?

A headache, ancillary; an hourglass auxiliary.

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


------------------------------------------------------- A headache, ancillary; an hourglass auxiliary."something witty, blah, blah, blah" --That One Witty Guy (remember? that one dude?)(author of DustBot)
quote: What I'm curious about is whether his map is always upright with the world. I'm getting an axially-referenced orientation working, but it has to assume the first wall it sees is the east wall, and reference from there

first wall is south wall and then i use a weighted center of all stored objects (bcuz i was to lazy to inplement something more complex), its just for debugging and the map isnt realigned when the debugwindow is off (no need for it)
you can download it here but its human controled and there is no anti-run-in-unknown-obstacle system (i think my bot wont need it)... to see the map in action you will need to place the bot as the second bot with debug flag (firstbot gets a timeout bcuz lame gdi slowdownd xD) and the window is only active in debug mode...

quote: if not, how are you doing it?!

ive put sources of eMan into his file (hes opening a window and using it for displaying 2bitmaps) clicky

dont hijack the WndProc ;D... you will get a DQ'ed when khawk sees that you slow down the enemy bot to cause a timeout xD


i will also release my bot when there will be some AI in, but now i have to inplement some sort of polygonal scanning stuff...so it will maybe have no AI for a long time...


and sorry for limiting my ftp to 8kb/s, i need the remaining 8 for games xD


edit: clicky
edit2: eMan updated so it will run with the newest version


T2k

[edited by - T2k on August 11, 2003 6:19:32 AM]

[edited by - T2k on August 11, 2003 6:40:31 AM]
quote: Original post by Anonymous Poster
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.


I''ll have to check that.

quote:
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?


The reason you are not getting anything in a corner is because the FOV start point is going beyond the wall. Hence, you will not receive any returns from GetNumObjectsInSight() because there is nothing in your FOV. Now, if you are approaching an edge and facing that edge (my last quoted comment), you should get a value of 1 from GetNumObjectsInSight().

quote:
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.


It was very intentional. Consider this translation to English:

With normal, non-wall objects, returned direction = -30 degrees - "The object is 30 degrees to your left."

With a wall, returned direction = -30 degrees - You are 30 degrees to the left of the perpendicular that goes from the wall to your bot.

Admin for GameDev.net.

This topic is closed to new replies.

Advertisement