Difference between revisions of "Talk:Robocode/FAQ"

From Robowiki
Jump to navigation Jump to search
(answer to difference between frame and tick)
(formatting change)
Line 1: Line 1:
 
'''What is the difference between frame and tick in robocode'''
 
'''What is the difference between frame and tick in robocode'''
A: A tick refers to one unit, which is also called a Turn in Robocode.  During one turn, you may perform one action as a Robot, or multiple (independent) actions as an AdvancedRobot.  A frame is a unit of drawing to the Robocode client interface.  If you are processing turns slowly, you will get one frame per tick / turn.  However, if you up the turns per second beyond your computer's ability to render the frames, you will miss some frames of animation.  This won't affect the robots' behavior, unless you foolishly added code in your <nowiki>onPaint( Graphics2D )</nowiki> method that alters your bots behavior.  In that case, your bot will behave differently depending on whether or not the Paint button has been enabled, and if the framerate can keep up with the turnrate. -- Martin
+
 
 +
Answer: A tick refers to one unit, which is also called a Turn in Robocode.  During one turn, you may perform one action as a Robot, or multiple (independent) actions as an AdvancedRobot.  A frame is a unit of drawing to the Robocode client interface.  If you are processing turns slowly, you will get one frame per tick / turn.  However, if you up the turns per second beyond your computer's ability to render the frames, you will miss some frames of animation.  This won't affect the robots' behavior, unless you foolishly added code in your <nowiki>onPaint( Graphics2D )</nowiki> method that alters your bots behavior.  In that case, your bot will behave differently depending on whether or not the Paint button has been enabled, and if the framerate can keep up with the turnrate. -- Martin

Revision as of 04:43, 19 March 2008

What is the difference between frame and tick in robocode

Answer: A tick refers to one unit, which is also called a Turn in Robocode. During one turn, you may perform one action as a Robot, or multiple (independent) actions as an AdvancedRobot. A frame is a unit of drawing to the Robocode client interface. If you are processing turns slowly, you will get one frame per tick / turn. However, if you up the turns per second beyond your computer's ability to render the frames, you will miss some frames of animation. This won't affect the robots' behavior, unless you foolishly added code in your onPaint( Graphics2D ) method that alters your bots behavior. In that case, your bot will behave differently depending on whether or not the Paint button has been enabled, and if the framerate can keep up with the turnrate. -- Martin