Difference between revisions of "Robocode/Game Physics"

From Robowiki
Jump to navigation Jump to search
m
Line 15: Line 15:
 
# All robots perform scans (and collect team messages)
 
# All robots perform scans (and collect team messages)
 
# All robots are resumed to take new action
 
# All robots are resumed to take new action
# All robots are processing their events
+
# Each robot is processing its event queue
 
 
  
 
[[Category:Robocode Documentation]]
 
[[Category:Robocode Documentation]]

Revision as of 15:01, 28 November 2007

This article is a stub. You can help RoboWiki by expanding it.

This page describes the game physics of Robocode

Robocode Game Physics

Robocode Processing Loop

The order that Robocode runs is as follows:

  1. Battle view is (re)painted
  2. All robots execute their code until they take action (and then paused)
  3. Time is updated (time = time + 1)
  4. All bullets move and check for collisions
  5. All robots move (heading, accelration, velocity, distance, in that order)
  6. All robots perform scans (and collect team messages)
  7. All robots are resumed to take new action
  8. Each robot is processing its event queue