[Home]History of MapleValley

Robo Home | Changes | Preferences | AllPages


Revision 7 . . April 23, 2004 0:36 EST by Rational Insanity
Revision 6 . . April 22, 2004 22:39 EST by MapleValley
  

Difference (from prior major revision) (no other diffs)

Changed: 19c19,33
Thanks a lot! I was thinking of the scanner as having a cone shape, but in reality it is more like a real radar where a line sweeps clockwise or counterclockwise, and the arc we see is just the area covered from turning the radar in the last tick. Things make a lot more sense now. -- MapleValley
Thanks a lot! I was thinking of the scanner as having a cone shape, but in reality it is more like a real radar where a line sweeps clockwise or counterclockwise, and the arc we see is just the area covered from turning the radar in the last tick. Things make a lot more sense now. -- MapleValley



<hijack>

Just as a specific to my "sucky" implementation versus my desired implementation which, unfortunately, screws me up: I've been making my bots in a modular fashion lately. As a result I have a "Scanner" class. All it does is manage my radar. When my bot runs the onScannedRobot method, it calls (currently) scanner.onScannedRobot, to which I pass a reference to the ScannedRobotEvent and the bot that's using the scanner. (I could clean this up by giving the bot the scanner is attached to when I initialize the scanner, but I like it this way for now...)

How I would like to do it: onScannedRobot in the Scanner class is a void and does a myRobot.setTurnRadarRight( scanDelta ); For some reason, however, this destabilizes the scanner, causing me to miss scans and have to re-acquire the target. Happens about once every other second. My guess is that a double scan is causing the problem, but I don't know how calling setTurnRadarRight twice can really screw stuff up.

How I currently do it: onScannedRobot in the Scanner class is a double that returns scanDelta. Each round where I saw an enemy (I set a boolean in my Robot's onScannedRobot) I setTurnRadarRight( scanDelta ). This results in me setting the radar turn each tick once and only once.

Some day, I'll release my bot source. (I'll probably release GoofyBot 0.20's source, since I'm supposed to be re-releasing him with better movement.) Then you can see my Scanner implementation.
</hijack>

--Goofy

Robo Home | Changes | Preferences | AllPages
Search: