Doc Bot

Download | Tutorials | Instruction Set | Hardware Reference
Introduction | About Doc Bot | Site Map | Search | Use License | Contact Us
Download
Screenshots
Table Of Contents | Addressing Modes | Memory Model | External Ports | Instruction Set | Hardware Reference | Turn Cycles | File format
Table Of Contents | Introduction | Types Of Memory | Special Function Registers | Basic Registers | Addressing Modes | Program Flow | Timers | External Ports | Interrupts | Power Control Modes | Hardware Components
Table Of Contents | Calculate Square Roots | Safe Division

Documentation

small logo

Turn Cycles

There are three different, separate procedures that take place at different intervals to update and process everything going on during a game. The term "Cycle" refers to each of those different procedures, while the term "Sequence" refers to the actual sequence of events that take place during the cycle. Nonetheless they can mostly be used interchangeably to reference the same thing.

First, there is the Microcontroller Cycle. Microcontroller Cycles happen at varying rates depending on the microcontroller's speed, but usually there are between 180 and 260 microcontroller cycles per second. During a Microcontroller Cycle, a sequence is run that executes a single instruction, triggers interrupts and increases by one every timer on the microcontroller.

Then there is the Physics Cycle. Physics Cycles happen at an exact rate of 60 physics cycles per second. During a Physics Cycle a sequence is run that updates the position and heat level of every object on the playing field, checks for collissions between those objects and applies damage where needed.

Finally, there is the Hardware Cycle. Hardware Cycles happen at an exact rate of 6 hardware cycles per second. During a Hardware Cycle a sequence is run that executes the functions of the hardware components of robots, like doing radar scans or firing weapons, reads and receives data for external ports and updates the heat generation and dissipation rates of every hardware component on the robot.

Introduction | About Doc Bot | Site Map | Search | Use License | Contact Us
©2009 Daniel Julivert