🎉 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

Started by
150 comments, last by khawk 20 years, 12 months ago
quote: Original post by particleG

quote:
hmm u really get negative angles (directly from the interface)??? 4 me its both times positive... new version???


yeah I get negative angles and positive angles, I don't have subtract/add 360 (to fix them) or anything. This is directly from the interface.

Don't know what version I have, I think it's the latest one.

Maybe your doing something wrong, I dunno.


I've tested it extensively and I am definately not getting any negative angles...

What I've done to test it is log the direction of every object that the bot ever sees, then walk him around the map - the direction is invariably positive.

My code is as follows:
int i,nofObjs;float distance,direction,objdirection;int type;nofObjs=g_pCore->GetNumObjectsInSight();ofstream output("log.txt",ios::app);for (i=0;i<nofObjs;i++){g_pCore->GetObjectsInSight(i,type,direction,distance,objdirection);output<<"dir:"<<direction<<" dist:"<<distance<<" objdir:"<<objdirection<<endl;}output.close(); 


I can't see anything that I'm doing wrong... someone who's getting negative angles, what exactly are you doing to get them?





[edited by - HappyDude on August 3, 2003 1:42:05 PM]

[edited by - HappyDude on August 3, 2003 1:43:21 PM]
Advertisement

that''s weird...

does it only do that when a tree is infront of the enemy or always? I know I get negative angles, if I didn''t my bot would probably just run in circles.
I did a similar test but only had mine output when I saw the enemy. I would walk up to a bot that was standing still but keep it out of my view then I would rotate my view clockwise until it hit the right hand side of my view. Then as I continued to move it clockwise so the left side eventually went over the bot standing still. The results started with the right being positive and the angles going down to 0 (straight in front) and then going back positive on the left side.

quote: Original post by HappyDude
quote: Original post by particleG

quote:
hmm u really get negative angles (directly from the interface)??? 4 me its both times positive... new version???


yeah I get negative angles and positive angles, I don''t have subtract/add 360 (to fix them) or anything. This is directly from the interface.

Don''t know what version I have, I think it''s the latest one.

Maybe your doing something wrong, I dunno.


I''ve tested it extensively and I am definately not getting any negative angles...

What I''ve done to test it is log the direction of every object that the bot ever sees, then walk him around the map - the direction is invariably positive.

My code is as follows:
int i,nofObjs;float distance,direction,objdirection;int type;nofObjs=g_pCore->GetNumObjectsInSight();ofstream output("log.txt",ios::app);for (i=0;i<nofObjs;i++){g_pCore->GetObjectsInSight(i,type,direction,distance,objdirection);output<<"dir:"<<direction<<" dist:"<<distance<<" objdir:"<<objdirection<<endl;}output.close(); 


I can''t see anything that I''m doing wrong... someone who''s getting negative angles, what exactly are you doing to get them?





<SPAN CLASS=editedby>[edited by - HappyDude on August 3, 2003 1:42:05 PM]</SPAN>

<SPAN CLASS=editedby>[edited by - HappyDude on August 3, 2003 1:43:21 PM]</SPAN>


quote: Original post by T2k
i dont think i do something wrong, ive the newest version and its a bug of the mainapp, it has to be fixed!!! bcuz its producing bugs like:

\         / \     E /  \T    /   \   /    \ /     V  

ok tree is T, enemy is E, but hey i cant see the Enemy bcuz ur tree is in front of the enemy, this is a REAL Bug (i dont have preconceived it), but if u add negative angles it will be solved!!!
T2k


I have found the same error. You can''t see an enemy "behind" a tree at the same angle. One angle should actually be negative.
It seemed that if I were to run my bot for both players in the arena, the data was shared somehow and many times I was only doing half of what I should be doing (like it''s being split up between the two strangely). As an example, I tried to rotate my bot 360 degrees. When I only ran one of my bots, and the other was the sample bot, it ran fine. But when my bot is running for both players, I only rotate 180 degrees. Is it just me or has anyone else noticed this?

---
Brent Gunning | My Site

quote:
It seemed that if I were to run my bot for both players in the arena, the data was shared somehow and many times I was only doing half of what I should be doing (like it''s being split up between the two strangely). As an example, I tried to rotate my bot 360 degrees. When I only ran one of my bots, and the other was the sample bot, it ran fine. But when my bot is running for both players, I only rotate 180 degrees. Is it just me or has anyone else noticed this?


yes I have also noticed that, for me it was when one bot saw the other bot. Both are running the same dll btw. When BLUE saw RED and RED was facing the other way, RED would think that it had seen BLUE and start searching for it.

also when rotating, sometimes one randomly rotated another way.


quote:
I have found the same error. You can''t see an enemy "behind" a tree at the same angle. One angle should actually be negative.


I just noticed that now, that does seem to be a problem.

I am going to log the angles and see if a negative angle actually turns up. Currently I haven''t checked any angle or logged em, just coded and the bot runs fine (doesn''t get stuck, knows where walls are and attacks). It runs like there are negative angles...

maybe my bot works so good because the angles aren''t negative. Have to see what the logs turn up. I''ll post the results here when I have them.

quote: Original post by Hedos
Why don''t you get a trial version of MSVC ?




Where can i find that? I didn''t see it on Microsoft''s website.

Uh oh, the smallest angle I see is ''0.24''. So there is a problem with negative angles but this doesn''t make sense when my bot runs. My bot runs perfectly, it avoids getting stuck and navigates the map well. It doesn''t just simply turn in one direction...


My suggestion: dont fix the angles, my bot works fine.


I guess my navigation system was better than I though and more unique (even with corrupt data the bot works).

I can probably remove half the code now, where it says if (angle < 0). So thats what, over 70 lines of code gone. Bah, back to square 1 when the angles get fixed.
the shared bot bug is typical in this situation, a dll is only loaded once into memory resulting in all data declared as global or static will be seen in both bots at the same time... to solve this use the main-class and put all ur data in there


Just a laming bot following saved instructions u can download and try it out, but please dont kill my 16kb/s upline Botsname: "eMan", needs e.txt in the gdarena folder or the bot will have no input... if the link is not working dont use it

edit: use 'release' in ur ini, that will disable the timecheck, khawk fixing?


T2k

[edited by - T2k on August 3, 2003 5:12:47 PM]
quote: Original post by Khawk
As for COM, my suggestion is that you read up on it yourself. Its capabilities are beyond the needs of this contest, and considering the point of this contest is to make it as accessible to everyone as possible while keeping it as simple as possible, COM is certainly not an option. What this contest DOES use is a COM-like design. It''s just tailored to the needs of the application. This allows for flexibility in the future, including data collection, easy recording, and other easily added and fancy features that would not otherwise be (as easily) capable if COM was being used.
You inherit from IUnknown, put QueryInterface, AddRef and Release first, and make everything __stdcall. How is this inaccessible? How is this inflexible?
If you want the contest to be accessible to everyone, make it accessible to people who don''t have MSVC 6.

This topic is closed to new replies.

Advertisement