Robot: Difference between revisions
(Rewrite Robot article.) |
|||
| Line 1: | Line 1: | ||
[[Robot|Robots]] are [[built-ins]] which are capable of executing [[Robotic]] scripts. They are the most powerful type of built-in, and the main power behind all but the simplest [[MegaZeux]] games. | |||
[[Category:MegaZeux]] | Robots are often used to represent objects and actors within the game, to govern effects and changes to the game world, and to implement [[Engine|engines]]. | ||
==Behavior== | |||
Robots execute a number of [[commands]] in their Robotic script every cycle determined by the current value of the [[COMMANDS]] counter. When a command halts the program—either temporarily through a [[cycle|cycle-ending]] command such as [[WAIT]], or indefinitely through [[END]]—or when the commands limit is reached, the Robot automatically yields execution to the next object on the board. This makes Robots analogous to [https://en.wikipedia.org/wiki/Coroutine cooperative coroutines] in other programming languages. | |||
==ZZT connection== | |||
Robots are analogous to Objects in [[ZZT]]. | |||
[[Category:MegaZeux]] [[Category:MegaZeux built-in objects]] | |||
Revision as of 01:00, 29 May 2025
Robots are built-ins which are capable of executing Robotic scripts. They are the most powerful type of built-in, and the main power behind all but the simplest MegaZeux games.
Robots are often used to represent objects and actors within the game, to govern effects and changes to the game world, and to implement engines.
Behavior
Robots execute a number of commands in their Robotic script every cycle determined by the current value of the COMMANDS counter. When a command halts the program—either temporarily through a cycle-ending command such as WAIT, or indefinitely through END—or when the commands limit is reached, the Robot automatically yields execution to the next object on the board. This makes Robots analogous to cooperative coroutines in other programming languages.
ZZT connection
Robots are analogous to Objects in ZZT.