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

Questions about GDArena

Started by
59 comments, last by khawk 20 years, 10 months ago
How do we get time?
I usually use timeGetTime()
But I get a linking error when trying to compile :\
Advertisement
quote: Original post by HappyDude
quote: Original post by d000hg
Dead reckoning would require us to know how fast we''re travelling in game units and how much we''ve turned in degrees. Is this information available? Being able to know you''re in a wall is very useful else you''re calculations will be screwed. Otherwise your AI is reduced to spinning round looking for a target, followed by a brief gun-battle rather than a stealthy game of hide ''n'' seek. Aren''t we supposed to be able to see what direction the other bot is facing/moving?


We''re told the direction the other bot is facing through the objDirection output of the GetObjectsInSight method. As for the angles and speeds, testing seems to show values of normal-forward-movement moving at ~0.444units/cycle, fast moving at ~0.888units/cycle, reverse at ~0.555, and rotation moving 2 and 4 degrees for slow and fast respectively. However, in the bot movement thread KHawk said these values are wrong...


I was wrong. Those values are correct.

Admin for GameDev.net.

Hedos, you might want to try QueryPerformanceFrequency() and QueryPerformanceCounter().
timeGetTime() is less much less accurate, but if you really want to use it then you could link to winmm.lib
#pragma comment(lib, "winmm.lib")
Where do those values for speeds/rotation rates come from please?
quote: Original post by d000hg
Where do those values for speeds/rotation rates come from please?


For my values, the speed was taken by finding an object, checking its distance, then walking towards/away from it for a number of cycles and checking the distance again, then calculating the average distance moved per cycle. Angles were done by looking at an object, then rotating left every cycle until the bot was looking straight at it again while counting how many cycles it took.
If we get shot, can we please be told where we are hit - if I git hit in the back it''ll change by tactics to if it''s just out of sight on the right for instance. Obviously for grenades this isn''t logical.
Is there a specific order in which objects are reported to the bot? left-to-right, world-left-to-right, distance-sorted, anything we can count on?

Secondly, if we reverse-engineer the order and rely on it, will that order be changed, or will the game behave the same for the contest?

I like pie.
[sub]My spoon is too big.[/sub]
Second question: What do the bool return values from the Set*, Turn*, etc. calls indicate? Are these useful to check?

I like pie.
[sub]My spoon is too big.[/sub]
From README:
"As you send commands to the GDArena, only the first time a command is sent will it be executed. This means that if you send a TurnLeft() command early on in your processing, and then later send a TurnRight() command, only the TurnLeft() command will be processed by the arena during that Update() cycle. These commands are processed for the current Update() cycle only, and do not persist once that cycle is over."

Exaclly what dose the above mean, that a robot can''t do a TurnLeft and a Fire in the same Update cycle, or what????
quote: Original post by LizardCPP
From README:
"As you send commands to the GDArena, only the first time a command is sent will it be executed. This means that if you send a TurnLeft() command early on in your processing, and then later send a TurnRight() command, only the TurnLeft() command will be processed by the arena during that Update() cycle. These commands are processed for the current Update() cycle only, and do not persist once that cycle is over."

Exaclly what dose the above mean, that a robot can''t do a TurnLeft and a Fire in the same Update cycle, or what????


no, it means a bot cant turn left and right at the same update, so if you send a turn left u cant undo it with a call to turn right! you can still fire and send other commands but they will be ignored when they work against another command you send before...


T2k

This topic is closed to new replies.

Advertisement