<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.digitalmzx.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Cycle</id>
	<title>Cycle - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.digitalmzx.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Cycle"/>
	<link rel="alternate" type="text/html" href="https://www.digitalmzx.com/wiki/index.php?title=Cycle&amp;action=history"/>
	<updated>2026-06-22T22:10:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>https://www.digitalmzx.com/wiki/index.php?title=Cycle&amp;diff=7953&amp;oldid=prev</id>
		<title>Kuroneko at 11:02, 20 July 2012</title>
		<link rel="alternate" type="text/html" href="https://www.digitalmzx.com/wiki/index.php?title=Cycle&amp;diff=7953&amp;oldid=prev"/>
		<updated>2012-07-20T11:02:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:02, 20 July 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A [[MegaZeux]] '''cycle''' is essentially one frame of MZX execution, in which all [[robots]] on the board may execute some code, all objects on the board that move can move one space, and some amount of time passes according to the current [[mzx_speed|MZX speed]].  MZX programmers most often think about cycles as they relate to robot execution, particularly in the areas of [[busyloop|busyloops]] and [[commands]].  In the past, most people didn't worry about this, because the only way it really showed up in games was a hard limit of how much a robot could do in a certain amount of time.  Since the advent of the &amp;quot;commands&amp;quot; counter, which allows the number of commands a robot CAN execute per cycle to be set in the billions, MZXers have paid much more attention to ensuring that robots only execute as many commands per cycle as they need to, so that all robots get a chance to execute their programs within a reasonable amount of time.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A [[MegaZeux]] '''cycle''' is essentially one frame of MZX execution, in which all [[robots]] on the board may execute some code, all objects on the board that move can move one space, and some amount of time passes according to the current [[mzx_speed|MZX speed]].  MZX programmers most often think about cycles as they relate to robot execution, particularly in the areas of [[busyloop|busyloops]] and [[commands]].  In the past, most people didn't worry about this, because the only way it really showed up in games was a hard limit of how much a robot could do in a certain amount of time.  Since the advent of the &amp;quot;commands&amp;quot; counter, which allows the number of commands a robot CAN execute per cycle to be set in the billions, MZXers have paid much more attention to ensuring that robots only execute as many commands per cycle as they need to, so that all robots get a chance to execute their programs within a reasonable amount of time.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There is also a command in MZX called &amp;quot;cycle&amp;quot;, which sets the number of cycles between execution for the given robot.  For a long time, [[MZXers]] considered this command largely useless, since it is almost never desirable to have a robot that doesn't execute every cycle (cycle 1), and that is the default behavior.  (The same command exists in [[ZZT]], but the default there is #cycle 3, where an object executes code every three cycles.)  However, [[Wervyn]] pointed out that a side-effect of the command is to end the current cycle, and to do so without invoking a command that could span multiple cycles.  &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;This makes &amp;quot;cycle &lt;/del&gt;1&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;quot; a better candidate for a busyloop terminator than the previous standard of &amp;quot;wait &lt;/del&gt;1&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;quot;, because it avoids a peculiar edge case that can arise when sending [[subroutines&lt;/del&gt;]&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;] to robots.  Since then&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;quot;cycle 1&amp;quot; has become the recommended terminating instruction &lt;/del&gt;for &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;busyloops&lt;/del&gt;, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;since it &lt;/del&gt;is &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;similar enough in syntax to &amp;quot;wait 1&amp;quot;, and also suggests its function: to end the current cycle and wait X cycles before resuming execution&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There is also a command in MZX called &amp;quot;cycle&amp;quot;, which sets the number of cycles between execution for the given robot.  For a long time, [[MZXers]] considered this command largely useless, since it is almost never desirable to have a robot that doesn't execute every cycle (cycle 1), and that is the default behavior.  (The same command exists in [[ZZT]], but the default there is #cycle 3, where an object executes code every three cycles.)  However, [[Wervyn]] pointed out that a side-effect of the command is to end the current cycle, and to do so without invoking a command that could span multiple cycles.  &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[http://www.digitalmzx.net/forums/index.php?showtopic=15350 The pros and cons of WAIT &lt;/ins&gt;1 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;vs CYCLE &lt;/ins&gt;1 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;are discussed at length here&lt;/ins&gt;], &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;but &lt;/ins&gt;for &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;casual use&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'''WAIT 1''' &lt;/ins&gt;is &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;preferable&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:MegaZeux]][[Category:MegaZeux Commands]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:MegaZeux]][[Category:MegaZeux Commands]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kuroneko</name></author>
	</entry>
	<entry>
		<id>https://www.digitalmzx.com/wiki/index.php?title=Cycle&amp;diff=7648&amp;oldid=prev</id>
		<title>Kuroneko at 01:07, 26 January 2011</title>
		<link rel="alternate" type="text/html" href="https://www.digitalmzx.com/wiki/index.php?title=Cycle&amp;diff=7648&amp;oldid=prev"/>
		<updated>2011-01-26T01:07:16Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:07, 26 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There is also a command in MZX called &amp;quot;cycle&amp;quot;, which sets the number of cycles between execution for the given robot.  For a long time, [[MZXers]] considered this command largely useless, since it is almost never desirable to have a robot that doesn't execute every cycle (cycle 1), and that is the default behavior.  (The same command exists in [[ZZT]], but the default there is #cycle 3, where an object executes code every three cycles.)  However, [[Wervyn]] pointed out that a side-effect of the command is to end the current cycle, and to do so without invoking a command that could span multiple cycles.  This makes &amp;quot;cycle 1&amp;quot; a better candidate for a busyloop terminator than the previous standard of &amp;quot;wait 1&amp;quot;, because it avoids a peculiar edge case that can arise when sending [[subroutines]] to robots.  Since then, &amp;quot;cycle 1&amp;quot; has become the recommended terminating instruction for busyloops, since it is similar enough in syntax to &amp;quot;wait 1&amp;quot;, and also suggests its function: to end the current cycle and wait X cycles before resuming execution.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There is also a command in MZX called &amp;quot;cycle&amp;quot;, which sets the number of cycles between execution for the given robot.  For a long time, [[MZXers]] considered this command largely useless, since it is almost never desirable to have a robot that doesn't execute every cycle (cycle 1), and that is the default behavior.  (The same command exists in [[ZZT]], but the default there is #cycle 3, where an object executes code every three cycles.)  However, [[Wervyn]] pointed out that a side-effect of the command is to end the current cycle, and to do so without invoking a command that could span multiple cycles.  This makes &amp;quot;cycle 1&amp;quot; a better candidate for a busyloop terminator than the previous standard of &amp;quot;wait 1&amp;quot;, because it avoids a peculiar edge case that can arise when sending [[subroutines]] to robots.  Since then, &amp;quot;cycle 1&amp;quot; has become the recommended terminating instruction for busyloops, since it is similar enough in syntax to &amp;quot;wait 1&amp;quot;, and also suggests its function: to end the current cycle and wait X cycles before resuming execution.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:MegaZeux]][[Category:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Megazeux &lt;/del&gt;Commands]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:MegaZeux]][[Category:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;MegaZeux &lt;/ins&gt;Commands]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kuroneko</name></author>
	</entry>
	<entry>
		<id>https://www.digitalmzx.com/wiki/index.php?title=Cycle&amp;diff=7647&amp;oldid=prev</id>
		<title>Kuroneko at 01:07, 26 January 2011</title>
		<link rel="alternate" type="text/html" href="https://www.digitalmzx.com/wiki/index.php?title=Cycle&amp;diff=7647&amp;oldid=prev"/>
		<updated>2011-01-26T01:07:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:07, 26 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There is also a command in MZX called &amp;quot;cycle&amp;quot;, which sets the number of cycles between execution for the given robot.  For a long time, [[MZXers]] considered this command largely useless, since it is almost never desirable to have a robot that doesn't execute every cycle (cycle 1), and that is the default behavior.  (The same command exists in [[ZZT]], but the default there is #cycle 3, where an object executes code every three cycles.)  However, [[Wervyn]] pointed out that a side-effect of the command is to end the current cycle, and to do so without invoking a command that could span multiple cycles.  This makes &amp;quot;cycle 1&amp;quot; a better candidate for a busyloop terminator than the previous standard of &amp;quot;wait 1&amp;quot;, because it avoids a peculiar edge case that can arise when sending [[subroutines]] to robots.  Since then, &amp;quot;cycle 1&amp;quot; has become the recommended terminating instruction for busyloops, since it is similar enough in syntax to &amp;quot;wait 1&amp;quot;, and also suggests its function: to end the current cycle and wait X cycles before resuming execution.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There is also a command in MZX called &amp;quot;cycle&amp;quot;, which sets the number of cycles between execution for the given robot.  For a long time, [[MZXers]] considered this command largely useless, since it is almost never desirable to have a robot that doesn't execute every cycle (cycle 1), and that is the default behavior.  (The same command exists in [[ZZT]], but the default there is #cycle 3, where an object executes code every three cycles.)  However, [[Wervyn]] pointed out that a side-effect of the command is to end the current cycle, and to do so without invoking a command that could span multiple cycles.  This makes &amp;quot;cycle 1&amp;quot; a better candidate for a busyloop terminator than the previous standard of &amp;quot;wait 1&amp;quot;, because it avoids a peculiar edge case that can arise when sending [[subroutines]] to robots.  Since then, &amp;quot;cycle 1&amp;quot; has become the recommended terminating instruction for busyloops, since it is similar enough in syntax to &amp;quot;wait 1&amp;quot;, and also suggests its function: to end the current cycle and wait X cycles before resuming execution.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:MegaZeux]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:MegaZeux&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]][[Category:Megazeux Commands&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kuroneko</name></author>
	</entry>
	<entry>
		<id>https://www.digitalmzx.com/wiki/index.php?title=Cycle&amp;diff=6643&amp;oldid=prev</id>
		<title>Wervyn: Forgot the category</title>
		<link rel="alternate" type="text/html" href="https://www.digitalmzx.com/wiki/index.php?title=Cycle&amp;diff=6643&amp;oldid=prev"/>
		<updated>2009-01-29T23:43:02Z</updated>

		<summary type="html">&lt;p&gt;Forgot the category&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:43, 29 January 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There is also a command in MZX called &amp;quot;cycle&amp;quot;, which sets the number of cycles between execution for the given robot.  For a long time, [[MZXers]] considered this command largely useless, since it is almost never desirable to have a robot that doesn't execute every cycle (cycle 1), and that is the default behavior.  (The same command exists in [[ZZT]], but the default there is #cycle 3, where an object executes code every three cycles.)  However, [[Wervyn]] pointed out that a side-effect of the command is to end the current cycle, and to do so without invoking a command that could span multiple cycles.  This makes &amp;quot;cycle 1&amp;quot; a better candidate for a busyloop terminator than the previous standard of &amp;quot;wait 1&amp;quot;, because it avoids a peculiar edge case that can arise when sending [[subroutines]] to robots.  Since then, &amp;quot;cycle 1&amp;quot; has become the recommended terminating instruction for busyloops, since it is similar enough in syntax to &amp;quot;wait 1&amp;quot;, and also suggests its function: to end the current cycle and wait X cycles before resuming execution.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There is also a command in MZX called &amp;quot;cycle&amp;quot;, which sets the number of cycles between execution for the given robot.  For a long time, [[MZXers]] considered this command largely useless, since it is almost never desirable to have a robot that doesn't execute every cycle (cycle 1), and that is the default behavior.  (The same command exists in [[ZZT]], but the default there is #cycle 3, where an object executes code every three cycles.)  However, [[Wervyn]] pointed out that a side-effect of the command is to end the current cycle, and to do so without invoking a command that could span multiple cycles.  This makes &amp;quot;cycle 1&amp;quot; a better candidate for a busyloop terminator than the previous standard of &amp;quot;wait 1&amp;quot;, because it avoids a peculiar edge case that can arise when sending [[subroutines]] to robots.  Since then, &amp;quot;cycle 1&amp;quot; has become the recommended terminating instruction for busyloops, since it is similar enough in syntax to &amp;quot;wait 1&amp;quot;, and also suggests its function: to end the current cycle and wait X cycles before resuming execution.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:MegaZeux]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Wervyn</name></author>
	</entry>
	<entry>
		<id>https://www.digitalmzx.com/wiki/index.php?title=Cycle&amp;diff=6642&amp;oldid=prev</id>
		<title>Wervyn: New page explaining cycles, and the historic and modern uses of the cycle command.</title>
		<link rel="alternate" type="text/html" href="https://www.digitalmzx.com/wiki/index.php?title=Cycle&amp;diff=6642&amp;oldid=prev"/>
		<updated>2009-01-29T23:42:19Z</updated>

		<summary type="html">&lt;p&gt;New page explaining cycles, and the historic and modern uses of the cycle command.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;A [[MegaZeux]] '''cycle''' is essentially one frame of MZX execution, in which all [[robots]] on the board may execute some code, all objects on the board that move can move one space, and some amount of time passes according to the current [[mzx_speed|MZX speed]].  MZX programmers most often think about cycles as they relate to robot execution, particularly in the areas of [[busyloop|busyloops]] and [[commands]].  In the past, most people didn't worry about this, because the only way it really showed up in games was a hard limit of how much a robot could do in a certain amount of time.  Since the advent of the &amp;quot;commands&amp;quot; counter, which allows the number of commands a robot CAN execute per cycle to be set in the billions, MZXers have paid much more attention to ensuring that robots only execute as many commands per cycle as they need to, so that all robots get a chance to execute their programs within a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
There is also a command in MZX called &amp;quot;cycle&amp;quot;, which sets the number of cycles between execution for the given robot.  For a long time, [[MZXers]] considered this command largely useless, since it is almost never desirable to have a robot that doesn't execute every cycle (cycle 1), and that is the default behavior.  (The same command exists in [[ZZT]], but the default there is #cycle 3, where an object executes code every three cycles.)  However, [[Wervyn]] pointed out that a side-effect of the command is to end the current cycle, and to do so without invoking a command that could span multiple cycles.  This makes &amp;quot;cycle 1&amp;quot; a better candidate for a busyloop terminator than the previous standard of &amp;quot;wait 1&amp;quot;, because it avoids a peculiar edge case that can arise when sending [[subroutines]] to robots.  Since then, &amp;quot;cycle 1&amp;quot; has become the recommended terminating instruction for busyloops, since it is similar enough in syntax to &amp;quot;wait 1&amp;quot;, and also suggests its function: to end the current cycle and wait X cycles before resuming execution.&lt;/div&gt;</summary>
		<author><name>Wervyn</name></author>
	</entry>
</feed>