5. The Bug modes
Below are the various states of existence for a bug.
SLEEP: the bug is dreaming, waiting for their turn. When they awake, they are set to be in LISTEN mode.
LISTEN: the bug is prepping to fire by listening to the environment. When they are done. They are given a delay time, and set to WAIT.
WAIT: the bug is waiting to fire. When the counter reaches zero, it will FIRE.
FIRE: the bug is firing! The bug then resets the counter with a new delay time. The bugs energy level will be decreased by the decay factor. If the energy level goes below a threshold, the bug is set to go back to SLEEP. Otherwise, it will WAIT to fire again.
prev | home | next