Difference between revisions of "Thread:Talk:Robocode/Graphical Debugging/Debugging waves with onPaint()/reply (5)"

From Robowiki
Jump to navigation Jump to search
 
 
Line 3: Line 3:
 
The way I do:
 
The way I do:
  
(all events), put all event data in a custom queue, execute() returns, cache battle state to avoid 1000 calls, process event queue and everything else in the order I want: radar, retrieve data from teammates, movement, fire gun, turn gun, send data to teammates, graphical debugging.
+
(all events), put all event data in a custom queue, execute() returns, cache battle state to avoid 1000 calls, process event queue and everything else in the order I want: radar, retrieve data from teammates, movement, fire gun, energy management, turn gun, send data to teammates, graphical debugging.

Latest revision as of 18:22, 17 May 2012

If you fire from run(), graphics can still line up if you also paint from that same run().

The way I do:

(all events), put all event data in a custom queue, execute() returns, cache battle state to avoid 1000 calls, process event queue and everything else in the order I want: radar, retrieve data from teammates, movement, fire gun, energy management, turn gun, send data to teammates, graphical debugging.