calling execute() every tick

Jump to navigation Jump to search
Revision as of 17 June 2012 at 20:28.
The highlighted comment was edited in this revision. [diff]

calling execute() every tick

I notice you only call execute() once during your run() method, not in a loop. Is that new? Don't you need to call execute() or another blocking method every tick?

    Voidious22:01, 17 June 2012

    That execute() was just an instance of me trying to stop the do-nothing-this-round bug. When deBroglie does nothing on a round, the radar isn't spinning.. despite the infinite radar spin in run().. yet onSkippedTurn is still never triggered.


    I don't have any calls to execute(). Everything is in onScannedRobot()

    Question: in a 1v1 match, can onScannedRobot trigger more than once? That right there might be a source of some of my problems.

    deBroglie's structure would allow a movement(), gun(), execute() loop in run().. and just update the Universe object in onScannedRobot. I think some of my bullet/wave code would need tweaking because the gun and movement might be operating on a one-tick-old Universe.. but I think that can be dealt with.

      Tkiesel22:16, 17 June 2012
       

      I don't think you should get 2 scans in one tick, but I did find oldwiki:DoubleScanning the other day, where David Alves said: "f you skip a turn before handling the ScannedRobotEvent for that turn, you'll get 2 ScannedRobotEvents on the next turn. You only miss lose events if you skip 2 or more turns in a row, if you miss one you'll just get extra events on the next turn."

      My guess is that this is likely to have long ago been fixed, but I don't know for sure. It seems like Wompi and I have found some similar issues recently, so maybe something like that could be happening?

      Having everything in onScannedRobot except a turnRadar in run() makes sense, but I thought you'd still need the turnRadar in a loop, wouldn't you? If you skip a turn and your radar slips, will it ever move again?

        Voidious22:23, 17 June 2012

        No, if the radar slips, I'm well and truly out of luck. Interestingly enough, my weird rounds (when I have battles slow enough to observe visually) seem to happen right from the word go.

        might be worth exploring the idea of getting a non-onScannedRobot Universe update method, and put everything I can in run()?


        Those rumble rounds (with about 6 bots on my rumble client, MN's and KID's it looks like) with completely zero score are concerning to me too.

          Tkiesel22:27, 17 June 2012