🎉 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, 11 months ago
quote: Original post by Anonymous Poster
Did you set the working directory if you are running the game .exe from the IDE automatically?

I''m not running the .exe from the IDE.

quote: Original post by MDI
Did you change the .ini file accordingly? I''ve change dit, yet it still crashes, both under MSVC 6.0 and DevCPP.

Well, my new DLL had the same name as the old DLL, so I didn''t need to change that... removing ''debug'' from the ini doesn''t help.

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.
Advertisement
The arena crashes when more than one object is seen, while getting the info for the second object.
<CODE>
int num_seen = g_pCore->GetNumObjectsInSight();

int n;
for (n = 0; n < num_seen; n++)
{
int type = 0;
float dir = 0,dist = 0;
g_pCore->GetObjectsInSight(n, type, dir, dist);
}
</CODE>
i think u should NOT rename the dll, has to be same as the botsname, simple edit the ini file (write botsnomae in 1st or 2nd line)

and yes ive a working bot, doing nothing and one following my keyboard orders, but ive some problems with the GetObjectsInSight function, makes some ugly crashes...


T2k
quote: Original post by Anonymous Poster
In the readme.txt it says "Bots cannot see walls (at this time; we''ll see how it goes)."
It would be nice to know where the walls are, but it could be inferred from a lack of obstacles. Perhaps some non-blocking little plants could be added to the arena to give better visual reference to the bots.


I''m leaving it as a challenge for now. Of course it would be nice, but not having wall detection makes for more interesting algorithms. There are ways to detect a wall yourself, but I leave that to everyone else to figure out.

As for the GetObjectsInSight() problems.. I''ll look into it. I haven''t had any problems with that function.

Admin for GameDev.net.

I got this error when adding this code (and only this code) to the update function:

float Angle, Distance;int Type;if( g_pCore->GetNumObjectsInSight( ) > 0 ) {        g_pCore->GetObjectsInSight( 1, Type, Angle, Distance );}g_pCore->TurnRight( 0x20 );   


Sometimes it crashes right away, and sometimes the robot has the time to turn around until it sees something, at which point it crashes.

The same error happens if I try to reach object 0 instead of 1.
Compiling using Visual C++ 6.

EDIT: some more precision. I am logging data to file, in the following pattern:

LOG( "Sighted" )
g_pCore->GetObjectsInSight( 0, Type, Angle, Distance );
LOG( "Done" )

My log reads "Sighted" around 20 times, then "Done". Also, the "Abandon/Retry/Ignore" window does not simply pop once, but rather quickly flashes as if multiple instances of it were appearing.

ToohrVyk



[edited by - ToohrVyk on August 2, 2003 3:36:00 PM]

[edited by - ToohrVyk on August 2, 2003 3:57:15 PM]
quote: Original post by ToohrVyk
I got this error when adding this code (and only this code) to the update function:

float Angle, Distance;int Type;if( g_pCore->GetNumObjectsInSight( ) > 0 ) {        g_pCore->GetObjectsInSight( 1, Type, Angle, Distance );}g_pCore->TurnRight( 0x20 );   


Sometimes it crashes right away, and sometimes the robot has the time to turn around until it sees something, at which point it crashes.

The same error happens if I try to reach object 0 instead of 1.
Compiling using Visual C++ 6.

ToohrVyk



[edited by - ToohrVyk on August 2, 2003 3:36:00 PM]



It could be because there was only one object in sight, in which case you should be using GetObjectsInSight(0,...) instead of GetObjectsInSight(1,...). I''ll need to add a check in there so it doesn''t crash.

Something I should have explained in greater detail.. the object index starts at 0. So object 1 is 0, object 2 is 1, object n is n-1, etc.


Admin for GameDev.net.

quote: Original post by Khawk
Something I should have explained in greater detail.. the object index starts at 0. So object 1 is 0, object 2 is 1, object n is n-1, etc.

And you don''t do range checking?!

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.
quote: Original post by JohnBSmall
quote: Original post by Khawk
Something I should have explained in greater detail.. the object index starts at 0. So object 1 is 0, object 2 is 1, object n is n-1, etc.

And you don''t do range checking?!

John B


Actually, it does do range checking, which is why I''m not sure what the deal is (besides the fact that I _never_ had a problem with this function. Something else must be going wrong.

Admin for GameDev.net.

quote: Original post by MDI
OK, major problem.
I generated a new skeleton, and put the following code in my Update method:

g_pCore->Taunt ("Hello?");

I then copied the resulting DLL that was generated to the "bots" folder, and renamed the extension of the existing DLL there so it would not be found. I then ran the arena, yet upon pressing F5, I get a "Memory Could Not Be Read" error, at 0x000000. I''m using an introductory version of MSVC, and this displays a popup box telling everyone I am so, when any application I generate is run. Normally an application simply displays the box until the user presses OK and then runs the DLL code, but it crashes GD:Arena.

Other than switching over to Dev-CPP to develop in, is there anything I can do?


This is the tale of a Northern Soul, looking to find his way back home


Look at the readme again. You have to specify your bot in the gdarena.ini file, and when doing so, you have to specify your bot''s exact name. The exe will read this ini and look for your bot''s dll in the bots folder. You don''t have to rename other bots. You can have as many as you want in there. You just have to edit the ini file.

Admin for GameDev.net.

quote: the value of ESP was not properly saved during a function call. This is usually a result of calling a function with one calling convention with a function pointer declared with a different calling convention

with
g_pCore->GetObjectsInSight(0, type, direction, distance);

is this a bug of Net2002 ??? or should i ask has anyone got some usable informations with GetObjectsInSight ???


T2k

This topic is closed to new replies.

Advertisement