<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.gideros.rocks/index.php?action=history&amp;feed=atom&amp;title=Tuto_tiny-ecs_beatemup_Part_11_Systems_3</id>
	<title>Tuto tiny-ecs beatemup Part 11 Systems 3 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.gideros.rocks/index.php?action=history&amp;feed=atom&amp;title=Tuto_tiny-ecs_beatemup_Part_11_Systems_3"/>
	<link rel="alternate" type="text/html" href="https://wiki.gideros.rocks/index.php?title=Tuto_tiny-ecs_beatemup_Part_11_Systems_3&amp;action=history"/>
	<updated>2026-11-17T20:01:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.gideros.rocks/index.php?title=Tuto_tiny-ecs_beatemup_Part_11_Systems_3&amp;diff=24103&amp;oldid=prev</id>
		<title>MoKaLux: /* sSpritesSorting.lua.lua */</title>
		<link rel="alternate" type="text/html" href="https://wiki.gideros.rocks/index.php?title=Tuto_tiny-ecs_beatemup_Part_11_Systems_3&amp;diff=24103&amp;oldid=prev"/>
		<updated>2024-11-25T01:32:47Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;sSpritesSorting.lua.lua&lt;/span&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-GB&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:32, 25 November 2024&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-l189&quot;&gt;Line 189:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 189:&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;  &amp;#039;&amp;#039;&amp;#039;There are quite a bit of commented code you can delete as this Entity is immediately removed&amp;#039;&amp;#039;&amp;#039;&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;  &amp;#039;&amp;#039;&amp;#039;There are quite a bit of commented code you can delete as this Entity is immediately removed&amp;#039;&amp;#039;&amp;#039;&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;== sSpritesSorting&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.lua&lt;/del&gt;.lua ==&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;== sSpritesSorting.lua ==&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;div&gt;&amp;quot;&amp;#039;&amp;#039;&amp;#039;sSpritesSorting.lua&amp;#039;&amp;#039;&amp;#039;&amp;quot; in the &amp;#039;&amp;#039;&amp;#039;&amp;quot;_S&amp;quot;&amp;#039;&amp;#039;&amp;#039; folder. The code:&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;&amp;quot;&amp;#039;&amp;#039;&amp;#039;sSpritesSorting.lua&amp;#039;&amp;#039;&amp;#039;&amp;quot; in the &amp;#039;&amp;#039;&amp;#039;&amp;quot;_S&amp;quot;&amp;#039;&amp;#039;&amp;#039; folder. The code:&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;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&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;&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>MoKaLux</name></author>
	</entry>
	<entry>
		<id>https://wiki.gideros.rocks/index.php?title=Tuto_tiny-ecs_beatemup_Part_11_Systems_3&amp;diff=24102&amp;oldid=prev</id>
		<title>MoKaLux: /* sSpritesSorting.lua.lua */</title>
		<link rel="alternate" type="text/html" href="https://wiki.gideros.rocks/index.php?title=Tuto_tiny-ecs_beatemup_Part_11_Systems_3&amp;diff=24102&amp;oldid=prev"/>
		<updated>2024-11-25T01:32:19Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;sSpritesSorting.lua.lua&lt;/span&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-GB&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:32, 25 November 2024&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-l190&quot;&gt;Line 190:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 190:&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;== sSpritesSorting.lua.lua ==&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;== sSpritesSorting.lua.lua ==&lt;/div&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;&quot;&#039;&#039;&#039;sSpritesSorting&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.lua&lt;/del&gt;.lua&#039;&#039;&#039;&quot; in the &#039;&#039;&#039;&quot;_S&quot;&#039;&#039;&#039; folder. The code:&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;&quot;&#039;&#039;&#039;sSpritesSorting.lua&#039;&#039;&#039;&quot; in the &#039;&#039;&#039;&quot;_S&quot;&#039;&#039;&#039; folder. The code:&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;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&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;&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;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;div&gt;SSpritesSorting = Core.class()&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;SSpritesSorting = Core.class()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>MoKaLux</name></author>
	</entry>
	<entry>
		<id>https://wiki.gideros.rocks/index.php?title=Tuto_tiny-ecs_beatemup_Part_11_Systems_3&amp;diff=24093&amp;oldid=prev</id>
		<title>MoKaLux: /* sDebugHurtBoxNme.lua */</title>
		<link rel="alternate" type="text/html" href="https://wiki.gideros.rocks/index.php?title=Tuto_tiny-ecs_beatemup_Part_11_Systems_3&amp;diff=24093&amp;oldid=prev"/>
		<updated>2024-11-24T20:59:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;sDebugHurtBoxNme.lua&lt;/span&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-GB&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 20:59, 24 November 2024&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-l503&quot;&gt;Line 503:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 503:&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;function SDebugHurtBoxNme:onRemove(ent) -- tiny function&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;function SDebugHurtBoxNme:onRemove(ent) -- tiny function&lt;/div&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;	ent.spritelayer:removeChild(ent.debugheadhurtbox)&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;	&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;if not ent.isdestructibleobject then -- isdestructibleobject is somehow already removed!&lt;/ins&gt;&lt;/div&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	&lt;/del&gt;ent.spritelayer:removeChild(ent.debugspinehurtbox)&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		&lt;/ins&gt;ent.spritelayer:removeChild(ent.debugheadhurtbox)&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;ent.spritelayer:removeChild(ent.debugspinehurtbox)&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;	end&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;div&gt;end&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;end&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;function SDebugHurtBoxNme:process(ent, dt) -- tiny function&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;function SDebugHurtBoxNme:process(ent, dt) -- tiny function&lt;/div&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;	ent.debugheadhurtbox:setPosition(ent.pos+vector(ent.collbox.w/2+(ent.headhurtbox.x*ent.flip), ent.headhurtbox.y))&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;	&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;local function fun()&lt;/ins&gt;&lt;/div&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	&lt;/del&gt;ent.debugspinehurtbox:setPosition(ent.pos+vector(ent.collbox.w/2+(ent.spinehurtbox.x*ent.flip), ent.spinehurtbox.y))&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		&lt;/ins&gt;ent.debugheadhurtbox:setPosition(ent.pos+vector(ent.collbox.w/2+(ent.headhurtbox.x*ent.flip), ent.headhurtbox.y))&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;ent.debugspinehurtbox:setPosition(ent.pos+vector(ent.collbox.w/2+(ent.spinehurtbox.x*ent.flip), ent.spinehurtbox.y)&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;		Core.yield(1)&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;	end&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;	Core.asyncCall(fun&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;div&gt;end&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;end&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;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&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;&amp;lt;/syntaxhighlight&amp;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; 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;This System displays the enemies hurt boxes.&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;This System displays the enemies &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;and breakable objects &lt;/ins&gt;hurt boxes.&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;=== sDebugHurtBoxPlayer.lua ===&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;=== sDebugHurtBoxPlayer.lua ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>MoKaLux</name></author>
	</entry>
	<entry>
		<id>https://wiki.gideros.rocks/index.php?title=Tuto_tiny-ecs_beatemup_Part_11_Systems_3&amp;diff=24091&amp;oldid=prev</id>
		<title>MoKaLux at 02:45, 24 November 2024</title>
		<link rel="alternate" type="text/html" href="https://wiki.gideros.rocks/index.php?title=Tuto_tiny-ecs_beatemup_Part_11_Systems_3&amp;diff=24091&amp;oldid=prev"/>
		<updated>2024-11-24T02:45:10Z</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-GB&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 02:45, 24 November 2024&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-l250&quot;&gt;Line 250:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 250:&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;It would be difficult to accurately position the hit and hurt boxes, the collision boxes, ... without visual cues.&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;It would be difficult to accurately position the hit and hurt boxes, the collision boxes, ... without visual cues.&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;Debug systems help us with &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;all of &lt;/del&gt;the above. Fortunately they are small and quite simple.&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;Debug systems help us with the above. Fortunately they are small and quite simple.&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;=== sDebugCollision.lua ===&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;=== sDebugCollision.lua ===&lt;/div&gt;&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-l592&quot;&gt;Line 592:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 592:&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;== Next? ==&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;== Next? ==&lt;/div&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Awesome we &lt;/del&gt;have &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;everything in place&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;Congratulations&#039;&#039;&#039;! We &lt;/ins&gt;have &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;finished our game&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; 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; &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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Let&#039;s &lt;/ins&gt;add the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;final scene: &#039;&#039;&#039;YOU WIN&#039;&#039;&#039;&lt;/ins&gt;!&lt;/div&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Next we &lt;/del&gt;add the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;systems for the breakable objects and the collectibles and we are almost done with the game&lt;/del&gt;!&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;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;Prev.: [[Tuto tiny-ecs beatemup Part 10 Systems 2]]&amp;lt;/br&amp;gt;&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;Prev.: [[Tuto tiny-ecs beatemup Part 10 Systems 2]]&amp;lt;/br&amp;gt;&lt;/div&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;&#039;&#039;&#039;Next: [[Tuto tiny-ecs beatemup Part 12 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;XXX&lt;/del&gt;]]&#039;&#039;&#039;&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;&#039;&#039;&#039;Next: [[Tuto tiny-ecs beatemup Part 12 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;You Win&lt;/ins&gt;]]&#039;&#039;&#039;&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;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;&amp;#039;&amp;#039;&amp;#039;[[Tutorial - tiny-ecs beatemup]]&amp;#039;&amp;#039;&amp;#039;&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;&amp;#039;&amp;#039;&amp;#039;[[Tutorial - tiny-ecs beatemup]]&amp;#039;&amp;#039;&amp;#039;&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;div&gt;{{GIDEROS IMPORTANT LINKS}}&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;{{GIDEROS IMPORTANT LINKS}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>MoKaLux</name></author>
	</entry>
	<entry>
		<id>https://wiki.gideros.rocks/index.php?title=Tuto_tiny-ecs_beatemup_Part_11_Systems_3&amp;diff=24089&amp;oldid=prev</id>
		<title>MoKaLux: wip</title>
		<link rel="alternate" type="text/html" href="https://wiki.gideros.rocks/index.php?title=Tuto_tiny-ecs_beatemup_Part_11_Systems_3&amp;diff=24089&amp;oldid=prev"/>
		<updated>2024-11-24T02:36:12Z</updated>

		<summary type="html">&lt;p&gt;wip&lt;/p&gt;
&lt;a href=&quot;https://wiki.gideros.rocks/index.php?title=Tuto_tiny-ecs_beatemup_Part_11_Systems_3&amp;amp;diff=24089&amp;amp;oldid=24088&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>MoKaLux</name></author>
	</entry>
	<entry>
		<id>https://wiki.gideros.rocks/index.php?title=Tuto_tiny-ecs_beatemup_Part_11_Systems_3&amp;diff=24088&amp;oldid=prev</id>
		<title>MoKaLux: wip</title>
		<link rel="alternate" type="text/html" href="https://wiki.gideros.rocks/index.php?title=Tuto_tiny-ecs_beatemup_Part_11_Systems_3&amp;diff=24088&amp;oldid=prev"/>
		<updated>2024-11-24T01:46:59Z</updated>

		<summary type="html">&lt;p&gt;wip&lt;/p&gt;
&lt;a href=&quot;https://wiki.gideros.rocks/index.php?title=Tuto_tiny-ecs_beatemup_Part_11_Systems_3&amp;amp;diff=24088&amp;amp;oldid=24085&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>MoKaLux</name></author>
	</entry>
	<entry>
		<id>https://wiki.gideros.rocks/index.php?title=Tuto_tiny-ecs_beatemup_Part_11_Systems_3&amp;diff=24085&amp;oldid=prev</id>
		<title>MoKaLux: wip</title>
		<link rel="alternate" type="text/html" href="https://wiki.gideros.rocks/index.php?title=Tuto_tiny-ecs_beatemup_Part_11_Systems_3&amp;diff=24085&amp;oldid=prev"/>
		<updated>2024-11-23T19:32:17Z</updated>

		<summary type="html">&lt;p&gt;wip&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Systems 2 ==&lt;br /&gt;
We continue adding systems to our game.&lt;br /&gt;
 A System is a wrapper around function callbacks for manipulating Entities. Systems are implemented as tables that contain at least one method; an update function that takes parameters like so:&lt;br /&gt;
 &lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;function system:update(dt)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &lt;br /&gt;
 There are also a few other optional callbacks:&lt;br /&gt;
 *&amp;#039;&amp;#039;&amp;#039;function system:filter(entity)&amp;#039;&amp;#039;&amp;#039; Returns true if this System should include this Entity, otherwise should return false. If this isn&amp;#039;t specified, no Entities are included in the System.&lt;br /&gt;
 *&amp;#039;&amp;#039;&amp;#039;function system:onAdd(entity)&amp;#039;&amp;#039;&amp;#039; Called when an Entity is added to the System.&lt;br /&gt;
 *&amp;#039;&amp;#039;&amp;#039;function system:onRemove(entity)&amp;#039;&amp;#039;&amp;#039; Called when an Entity is removed from the System.&lt;br /&gt;
 *&amp;#039;&amp;#039;&amp;#039;function system:onModify(dt)&amp;#039;&amp;#039;&amp;#039; Called when the System is modified by adding or removing Entities from the System.&lt;br /&gt;
 *&amp;#039;&amp;#039;&amp;#039;function system:onAddToWorld(world)&amp;#039;&amp;#039;&amp;#039; Called when the System is added to the World, before any entities are added to the system.&lt;br /&gt;
 *&amp;#039;&amp;#039;&amp;#039;function system:onRemoveFromWorld(world)&amp;#039;&amp;#039;&amp;#039; Called when the System is removed from the world, after all Entities are removed from the System.&lt;br /&gt;
 *&amp;#039;&amp;#039;&amp;#039;function system:preWrap(dt)&amp;#039;&amp;#039;&amp;#039; Called on each system before update is called on any system.&lt;br /&gt;
 *&amp;#039;&amp;#039;&amp;#039;function system:postWrap(dt)&amp;#039;&amp;#039;&amp;#039; Called on each system in reverse order after update is called on each system.&lt;br /&gt;
 &lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Please see [[Tiny-ecs#System_functions]] for more information&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== sAnimation.lua ==&lt;br /&gt;
Time to animate our actors. Please create a file &amp;quot;&amp;#039;&amp;#039;&amp;#039;sAnimation.lua&amp;#039;&amp;#039;&amp;#039;&amp;quot; in the &amp;#039;&amp;#039;&amp;#039;&amp;quot;_S&amp;quot;&amp;#039;&amp;#039;&amp;#039; folder and the code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
SAnimation = Core.class()&lt;br /&gt;
&lt;br /&gt;
function SAnimation:init(xtiny)&lt;br /&gt;
	xtiny.processingSystem(self) -- called once on init and every frames&lt;br /&gt;
	self.sndstepgrass = Sound.new(&amp;quot;audio/sfx/footstep/Grass02.wav&amp;quot;)&lt;br /&gt;
	self.channel = self.sndstepgrass:play(0, false, true)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function SAnimation:filter(ent) -- tiny function&lt;br /&gt;
	return ent.animation&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function SAnimation:onAdd(ent) -- tiny function&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function SAnimation:onRemove(ent) -- tiny function&lt;br /&gt;
	ent.animation = nil -- free some memory?&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local checkanim&lt;br /&gt;
function SAnimation:process(ent, dt) -- tiny function&lt;br /&gt;
	-- a little boost?&lt;br /&gt;
	local anim = ent.animation&lt;br /&gt;
&lt;br /&gt;
--	checkanim = anim.curranim -- if you are sure all animations are set else use below ternary operator code&lt;br /&gt;
	-- luau ternary operator (no end at the end), it&amp;#039;s a 1 liner and seems fast?&lt;br /&gt;
	checkanim = if anim.anims[ent.animation.curranim] then anim.curranim else g_ANIM_DEFAULT&lt;br /&gt;
--	print(#anim.anims[checkanim])&lt;br /&gt;
&lt;br /&gt;
	if not ent.doanimate then return end&lt;br /&gt;
&lt;br /&gt;
	anim.animtimer -= dt&lt;br /&gt;
	if anim.animtimer &amp;lt; 0 then&lt;br /&gt;
		anim.frame += 1&lt;br /&gt;
		anim.animtimer = anim.animspeed&lt;br /&gt;
		if checkanim == g_ANIM_DEFAULT then&lt;br /&gt;
			if anim.frame &amp;gt; #anim.anims[checkanim] then&lt;br /&gt;
				anim.frame = 1&lt;br /&gt;
			end&lt;br /&gt;
		elseif checkanim == g_ANIM_LOSE1_R or checkanim == g_ANIM_STANDUP_R then&lt;br /&gt;
			if anim.frame &amp;gt;= #anim.anims[checkanim] then&lt;br /&gt;
				anim.frame = #anim.anims[checkanim]&lt;br /&gt;
			end&lt;br /&gt;
		elseif checkanim == g_ANIM_PUNCH_ATTACK1_R then&lt;br /&gt;
			ent.headhitbox = ent.headhitboxattack1&lt;br /&gt;
			if #anim.anims[checkanim] == 1 then -- 1 frame animation&lt;br /&gt;
				anim.frame = 1&lt;br /&gt;
				ent.headhitboxattack1.isactive = true&lt;br /&gt;
				ent.isactionpunch1 = false&lt;br /&gt;
			else -- multi frames animation&lt;br /&gt;
				if anim.frame &amp;gt; #anim.anims[checkanim] then&lt;br /&gt;
--					anim.frame = 1&lt;br /&gt;
					anim.frame = #anim.anims[checkanim]&lt;br /&gt;
					ent.headhitboxattack1.isactive = false&lt;br /&gt;
					ent.isactionpunch1 = false&lt;br /&gt;
				elseif anim.frame &amp;gt; ent.headhitbox.hitendframe then&lt;br /&gt;
					ent.headhitboxattack1.isactive = false&lt;br /&gt;
				elseif anim.frame &amp;gt;= ent.headhitbox.hitstartframe then&lt;br /&gt;
					ent.headhitboxattack1.isactive = true&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		elseif checkanim == g_ANIM_PUNCH_ATTACK2_R then&lt;br /&gt;
			ent.headhitbox = ent.headhitboxattack2&lt;br /&gt;
			if anim.frame &amp;gt; #anim.anims[checkanim] then&lt;br /&gt;
--				anim.frame = 1&lt;br /&gt;
				anim.frame = #anim.anims[checkanim]&lt;br /&gt;
				ent.headhitboxattack2.isactive = false&lt;br /&gt;
				ent.isactionpunch2 = false&lt;br /&gt;
			elseif anim.frame &amp;gt; ent.headhitbox.hitendframe then&lt;br /&gt;
				ent.headhitboxattack2.isactive = false&lt;br /&gt;
			elseif anim.frame &amp;gt;= ent.headhitbox.hitstartframe then&lt;br /&gt;
				ent.headhitboxattack2.isactive = true&lt;br /&gt;
			end&lt;br /&gt;
		elseif checkanim == g_ANIM_KICK_ATTACK1_R then&lt;br /&gt;
			ent.spinehitbox = ent.spinehitboxattack1&lt;br /&gt;
			if #anim.anims[checkanim] == 1 then -- 1 frame animation&lt;br /&gt;
				anim.frame = 1&lt;br /&gt;
				ent.spinehitboxattack1.isactive = true&lt;br /&gt;
				ent.isactionkick1 = false&lt;br /&gt;
			else -- multi frames animation&lt;br /&gt;
				if anim.frame &amp;gt; #anim.anims[checkanim] then&lt;br /&gt;
--					anim.frame = 1&lt;br /&gt;
					anim.frame = #anim.anims[checkanim]&lt;br /&gt;
					ent.spinehitboxattack1.isactive = false&lt;br /&gt;
					ent.isactionkick1 = false&lt;br /&gt;
				elseif anim.frame &amp;gt; ent.spinehitbox.hitendframe then&lt;br /&gt;
					ent.spinehitboxattack1.isactive = false&lt;br /&gt;
				elseif anim.frame &amp;gt;= ent.spinehitbox.hitstartframe then&lt;br /&gt;
					ent.spinehitboxattack1.isactive = true&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		elseif checkanim == g_ANIM_KICK_ATTACK2_R then&lt;br /&gt;
			ent.spinehitbox = ent.spinehitboxattack2&lt;br /&gt;
			if anim.frame &amp;gt; #anim.anims[checkanim] then&lt;br /&gt;
--				anim.frame = 1&lt;br /&gt;
				anim.frame = #anim.anims[checkanim]&lt;br /&gt;
				ent.spinehitboxattack2.isactive = false&lt;br /&gt;
				ent.isactionkick2 = false&lt;br /&gt;
			elseif anim.frame &amp;gt; ent.spinehitbox.hitendframe then&lt;br /&gt;
				ent.spinehitboxattack2.isactive = false&lt;br /&gt;
			elseif anim.frame &amp;gt;= ent.spinehitbox.hitstartframe then&lt;br /&gt;
				ent.spinehitboxattack2.isactive = true&lt;br /&gt;
			end&lt;br /&gt;
		elseif checkanim == g_ANIM_JUMP1_R then -- only jump, no attacks&lt;br /&gt;
			if anim.frame &amp;gt; #anim.anims[checkanim] then&lt;br /&gt;
				anim.frame = #anim.anims[checkanim]&lt;br /&gt;
			end&lt;br /&gt;
		elseif checkanim == g_ANIM_PUNCHJUMP_ATTACK1_R then&lt;br /&gt;
			ent.headhitbox = ent.headhitboxjattack1&lt;br /&gt;
			if anim.frame &amp;gt; #anim.anims[checkanim] then&lt;br /&gt;
				anim.frame = #anim.anims[checkanim]&lt;br /&gt;
				ent.headhitboxjattack1.isactive = false&lt;br /&gt;
--				ent.isactionjumppunch1 = false -- don&amp;#039;t set to false here otherwise BUGGGZZZZ!!!&lt;br /&gt;
			else&lt;br /&gt;
				ent.headhitboxjattack1.isactive = true&lt;br /&gt;
			end&lt;br /&gt;
		elseif checkanim == g_ANIM_KICKJUMP_ATTACK1_R then&lt;br /&gt;
			ent.spinehitbox = ent.spinehitboxjattack1&lt;br /&gt;
			if anim.frame &amp;gt; #anim.anims[checkanim] then&lt;br /&gt;
				anim.frame = #anim.anims[checkanim]&lt;br /&gt;
				ent.spinehitboxjattack1.isactive = false&lt;br /&gt;
--				ent.isactionjumpkick1 = false -- don&amp;#039;t set to false here otherwise BUGGGZZZZ!!!&lt;br /&gt;
			else&lt;br /&gt;
				ent.spinehitboxjattack1.isactive = true&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			-- player1 steps sound fx&lt;br /&gt;
			if ent.isplayer1 and&lt;br /&gt;
				(anim.curranim == g_ANIM_WALK_R or anim.curranim == g_ANIM_RUN_R) and&lt;br /&gt;
				(anim.frame == 4 or anim.frame == 9) then&lt;br /&gt;
				self.channel = self.sndstepgrass:play()&lt;br /&gt;
				if self.channel then self.channel:setVolume(g_sfxvolume*0.01) end&lt;br /&gt;
			end&lt;br /&gt;
			-- loop animations&lt;br /&gt;
			if anim.frame &amp;gt; #anim.anims[checkanim] then&lt;br /&gt;
				anim.frame = 1&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		anim.bmp:setTextureRegion(anim.anims[checkanim][anim.frame])&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What the System does:&lt;br /&gt;
* it runs every frame&lt;br /&gt;
* it affects only entities with an &amp;#039;&amp;#039;animation&amp;#039;&amp;#039; id&lt;br /&gt;
* it checks which animation to play&lt;br /&gt;
* it decreases the &amp;#039;&amp;#039;animtimer&amp;#039;&amp;#039;&lt;br /&gt;
* and increases the current frame in the animation by 1&lt;br /&gt;
* if an attack animation is playing it activates/deactivates the corresponding actor &amp;#039;&amp;#039;&amp;#039;hit boxes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* it eventually plays a sound (player1 steps sound fx)&lt;br /&gt;
* it finally sets the current frame in the animation as the actor Bitmap&lt;br /&gt;
&lt;br /&gt;
== sDynamicBodies.lua ==&lt;br /&gt;
&amp;quot;&amp;#039;&amp;#039;&amp;#039;sDynamicBodies.lua&amp;#039;&amp;#039;&amp;#039;&amp;quot; in the &amp;#039;&amp;#039;&amp;#039;&amp;quot;_S&amp;quot;&amp;#039;&amp;#039;&amp;#039; folder. The code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
SDynamicBodies = Core.class()&lt;br /&gt;
&lt;br /&gt;
local random = math.random&lt;br /&gt;
&lt;br /&gt;
function SDynamicBodies:init(xtiny, xmapdef) -- tiny function&lt;br /&gt;
	self.tiny = xtiny -- to access self.tiny variables&lt;br /&gt;
	self.tiny.processingSystem(self) -- called once on init and every update&lt;br /&gt;
	self.mapdef = xmapdef&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function SDynamicBodies:filter(ent) -- tiny function&lt;br /&gt;
	return ent.body -- only actors with body component&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function SDynamicBodies:onAdd(ent) -- tiny function&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function SDynamicBodies:onRemove(ent) -- tiny function&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local randomdir = 0 -- for nmes&lt;br /&gt;
function SDynamicBodies:process(ent, dt) -- tiny function&lt;br /&gt;
	-- is dead or hurt?&lt;br /&gt;
	if (ent.washurt and ent.washurt &amp;gt; 0) or (ent.wasbadlyhurt and ent.wasbadlyhurt &amp;gt; 0) or ent.currlives &amp;lt;= 0 then&lt;br /&gt;
		ent.body.vx = 0&lt;br /&gt;
		ent.body.vy = 0&lt;br /&gt;
		return&lt;br /&gt;
		-- TO REVISIT&lt;br /&gt;
	end&lt;br /&gt;
	-- movements&lt;br /&gt;
	if ent.isleft and not ent.isright and ent.pos.x &amp;gt; self.mapdef.l then -- LEFT&lt;br /&gt;
		ent.animation.curranim = g_ANIM_WALK_R&lt;br /&gt;
		ent.body.vx = -ent.body.currspeed*dt&lt;br /&gt;
		ent.flip = -1&lt;br /&gt;
	elseif ent.isright and not ent.isleft and ent.pos.x &amp;lt; self.mapdef.r - ent.w*0.5 then -- RIGHT&lt;br /&gt;
		ent.animation.curranim = g_ANIM_WALK_R&lt;br /&gt;
		ent.body.vx = ent.body.currspeed*dt&lt;br /&gt;
		ent.flip = 1&lt;br /&gt;
	else -- IDLE&lt;br /&gt;
		ent.animation.curranim = g_ANIM_IDLE_R&lt;br /&gt;
		ent.body.vx = 0&lt;br /&gt;
	end&lt;br /&gt;
	if ent.isup and not ent.isdown and ent.body.isonfloor and ent.pos.y &amp;gt; self.mapdef.t then -- UP&lt;br /&gt;
		ent.animation.curranim = g_ANIM_WALK_R&lt;br /&gt;
		ent.body.vy = -ent.body.currspeed*0.015*dt -- 0.01, you choose&lt;br /&gt;
	elseif ent.isdown and not ent.isup and ent.body.isonfloor and ent.pos.y &amp;lt; self.mapdef.b then -- DOWN&lt;br /&gt;
		ent.animation.curranim = g_ANIM_WALK_R&lt;br /&gt;
		ent.body.vy = ent.body.currspeed*0.015*dt -- 0.01, you choose&lt;br /&gt;
	else&lt;br /&gt;
		if ent.body.isonfloor then&lt;br /&gt;
			ent.body.vy = 0&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- actions&lt;br /&gt;
	if ent.body.isonfloor then -- GROUND&lt;br /&gt;
		if ent.isactionpunch1 then&lt;br /&gt;
			ent.animation.curranim = g_ANIM_PUNCH_ATTACK1_R&lt;br /&gt;
			ent.body.vx = 0 -- *= 0.1*dt, you choose&lt;br /&gt;
			ent.body.vy = 0 -- *= 0.1*dt, you choose&lt;br /&gt;
		elseif ent.isactionpunch2 then&lt;br /&gt;
			ent.animation.curranim = g_ANIM_PUNCH_ATTACK2_R&lt;br /&gt;
			ent.body.vx = 0 -- *= 0.1*dt, you choose&lt;br /&gt;
			ent.body.vy = 0 -- *= 0.1*dt, you choose&lt;br /&gt;
		elseif ent.isactionkick1 then&lt;br /&gt;
			ent.animation.curranim = g_ANIM_KICK_ATTACK1_R&lt;br /&gt;
			ent.body.vx = 0 -- *= 0.1*dt, you choose&lt;br /&gt;
			ent.body.vy = 0 -- *= 0.1*dt, you choose&lt;br /&gt;
		elseif ent.isactionkick2 then&lt;br /&gt;
			ent.animation.curranim = g_ANIM_KICK_ATTACK2_R&lt;br /&gt;
			ent.body.vx = 0 -- *= 0.1*dt, you choose&lt;br /&gt;
			ent.body.vy = 0 -- *= 0.1*dt, you choose&lt;br /&gt;
		end&lt;br /&gt;
	else -- AIR&lt;br /&gt;
		if ent.isactionpunch1 then&lt;br /&gt;
			if ent.isplayer1 and ent.currjumps &amp;gt; 0 then&lt;br /&gt;
				ent.isactionjumppunch1 = true&lt;br /&gt;
			end&lt;br /&gt;
		elseif ent.isactionkick1 then&lt;br /&gt;
			if ent.isplayer1 and ent.currjumps &amp;gt; 0 then&lt;br /&gt;
				ent.isactionjumpkick1 = true&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if ent.isactionjump1 and not (ent.isactionjumppunch1 or ent.isactionjumpkick1) then -- JUMP ONLY&lt;br /&gt;
			ent.animation.curranim = g_ANIM_JUMP1_R&lt;br /&gt;
			if ent.isplayer1 then ent.body.vx *= 2 end -- 3, acceleration, you choose&lt;br /&gt;
			ent.body.currjumpspeed = ent.body.jumpspeed*1.1 -- higher jump&lt;br /&gt;
			if ent.body.isgoingup then ent.body.vy -= ent.body.currjumpspeed end&lt;br /&gt;
			if ent.pos.y &amp;lt; ent.positionystart - ent.h*0.5 then -- higher apex, you choose&lt;br /&gt;
--				ent.body.vx = ent.body.currspeed*dt*4*ent.flip -- acceleration? you choose&lt;br /&gt;
				ent.body.vy += ent.body.currjumpspeed*1.2 -- falling&lt;br /&gt;
				ent.body.isgoingup = false&lt;br /&gt;
			end&lt;br /&gt;
			if not ent.body.isgoingup and ent.pos.y &amp;gt;= ent.positionystart then -- grounded&lt;br /&gt;
				ent.body.vy = 0&lt;br /&gt;
--				ent.pos.y = ent.positionystart&lt;br /&gt;
				ent.pos = vector(ent.pos.x, ent.positionystart)&lt;br /&gt;
				ent.body.isonfloor = true&lt;br /&gt;
				ent.isactionjump1 = false -- sometimes bug! XXX&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if ent.isactionjumppunch1 then -- JUMP PUNCH&lt;br /&gt;
			ent.animation.curranim = g_ANIM_PUNCHJUMP_ATTACK1_R&lt;br /&gt;
			if ent.isplayer1 then ent.body.vx *= 2 end -- acceleration, you choose&lt;br /&gt;
			ent.body.currjumpspeed = ent.body.jumpspeed&lt;br /&gt;
			if ent.body.isgoingup then ent.body.vy -= ent.body.currjumpspeed end&lt;br /&gt;
			if ent.pos.y &amp;lt; ent.positionystart - ent.h*0.45 then -- apex, you choose&lt;br /&gt;
--				ent.body.vx = ent.body.currspeed*dt*3*ent.flip -- acceleration? you choose&lt;br /&gt;
				ent.body.vy += ent.body.currjumpspeed*1.2 -- falling&lt;br /&gt;
				ent.body.isgoingup = false&lt;br /&gt;
			end&lt;br /&gt;
			if not ent.body.isgoingup and ent.pos.y &amp;gt;= ent.positionystart then -- grounded&lt;br /&gt;
				ent.body.vy = 0&lt;br /&gt;
--				ent.pos.y = ent.positionystart&lt;br /&gt;
				ent.pos = vector(ent.pos.x, ent.positionystart)&lt;br /&gt;
				if ent.isnme then&lt;br /&gt;
					randomdir = random(100)&lt;br /&gt;
					if randomdir &amp;lt; 50 then ent.isleft = false ent.isright = true&lt;br /&gt;
					else ent.isleft = true ent.isright = false&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
				if ent.isplayer1 then&lt;br /&gt;
					ent.currjumps -= 1&lt;br /&gt;
					if ent.currjumps &amp;lt; 0 then ent.currjumps = 0 end&lt;br /&gt;
					self.tiny.hudcurrjumps:setText(&amp;quot;JUMPS: &amp;quot;..ent.currjumps)&lt;br /&gt;
				end&lt;br /&gt;
				ent.body.isonfloor = true&lt;br /&gt;
				ent.isactionjump1 = false&lt;br /&gt;
				ent.isactionpunch1 = false -- TEST&lt;br /&gt;
				ent.isactionjumppunch1 = false -- sometimes bug! XXX&lt;br /&gt;
			end&lt;br /&gt;
		elseif ent.isactionjumpkick1 then -- JUMP KICK&lt;br /&gt;
			ent.animation.curranim = g_ANIM_KICKJUMP_ATTACK1_R&lt;br /&gt;
			if ent.isplayer1 then ent.body.vx *= 2 end -- acceleration, you choose&lt;br /&gt;
			ent.body.currjumpspeed = ent.body.jumpspeed&lt;br /&gt;
			if ent.body.isgoingup then ent.body.vy -= ent.body.currjumpspeed end&lt;br /&gt;
			if ent.pos.y &amp;lt; ent.positionystart - ent.h*0.5 then -- apex, you choose&lt;br /&gt;
--				ent.body.vx = ent.body.currspeed*dt*3*ent.flip -- acceleration? you choose&lt;br /&gt;
				ent.body.vy += ent.body.currjumpspeed*1.25 -- falling&lt;br /&gt;
				ent.body.isgoingup = false&lt;br /&gt;
			end&lt;br /&gt;
			if not ent.body.isgoingup and ent.pos.y &amp;gt;= ent.positionystart then -- grounded&lt;br /&gt;
				ent.body.vy = 0&lt;br /&gt;
--				ent.pos.y = ent.positionystart&lt;br /&gt;
				ent.pos = vector(ent.pos.x, ent.positionystart)&lt;br /&gt;
				if ent.isnme then&lt;br /&gt;
					randomdir = random(100)&lt;br /&gt;
					if randomdir &amp;lt; 50 then ent.isleft = false ent.isright = true&lt;br /&gt;
					else ent.isleft = true ent.isright = false&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
				if ent.isplayer1 then&lt;br /&gt;
					ent.currjumps -= 1&lt;br /&gt;
					if ent.currjumps &amp;lt; 0 then ent.currjumps = 0 end&lt;br /&gt;
					self.tiny.hudcurrjumps:setText(&amp;quot;JUMPS: &amp;quot;..ent.currjumps)&lt;br /&gt;
				end&lt;br /&gt;
				ent.body.isonfloor = true&lt;br /&gt;
				ent.isactionjump1 = false&lt;br /&gt;
				ent.isactionkick1 = false -- TEST&lt;br /&gt;
				ent.isactionjumpkick1 = false -- sometimes bug!&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- catches the sometimes bug!&lt;br /&gt;
	if not ent.body.isonfloor and ent.body.vy == 0 then&lt;br /&gt;
		print(&amp;quot;bug&amp;quot;, dt)&lt;br /&gt;
		ent.body.vy += ent.body.currjumpspeed*16 -- makes the actor touch the ground&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This System is reponsible for moving the actors:&lt;br /&gt;
* runs once on init and &amp;#039;&amp;#039;&amp;#039;every game loop&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;process&amp;#039;&amp;#039;)&lt;br /&gt;
* in &amp;#039;&amp;#039;init&amp;#039;&amp;#039; we add the map definition to constraint the actors movement&lt;br /&gt;
* if an actor is hurt we stop its movement&lt;br /&gt;
* if an actor is within the map definition we move it (player with keyboard, enemies with AI)&lt;br /&gt;
* then there are the attacks: ground attacks and jump attacks&lt;br /&gt;
* finally sometimes an actor doesn&amp;#039;t land after a jump attack so we force it to do so&lt;br /&gt;
&lt;br /&gt;
== sHitboxHurtboxCollision.lua ==&lt;br /&gt;
&amp;quot;&amp;#039;&amp;#039;&amp;#039;sHitboxHurtboxCollision.lua&amp;#039;&amp;#039;&amp;#039;&amp;quot; in the &amp;#039;&amp;#039;&amp;#039;&amp;quot;_S&amp;quot;&amp;#039;&amp;#039;&amp;#039; folder. The code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
SHitboxHurtboxCollision = Core.class()&lt;br /&gt;
&lt;br /&gt;
function SHitboxHurtboxCollision:init(xtiny) -- tiny function&lt;br /&gt;
	xtiny.processingSystem(self) -- called once on init and every update&lt;br /&gt;
	self.spriteslist = xtiny.spriteslist&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function SHitboxHurtboxCollision:filter(ent) -- tiny function&lt;br /&gt;
	return ent.headhitbox or ent.spinehitbox or ent.headhurtbox or ent.spinehurtbox&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function SHitboxHurtboxCollision:onAdd(ent) -- tiny function&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function SHitboxHurtboxCollision:onRemove(ent) -- tiny function&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function SHitboxHurtboxCollision:process(ent, dt) -- tiny function&lt;br /&gt;
	local function checkY(actor1y, actor2y, prange)&lt;br /&gt;
		return (-(actor1y-actor2y)&amp;lt;&amp;gt;(actor1y-actor2y)) &amp;lt; prange&lt;br /&gt;
	end&lt;br /&gt;
	local function checkCollision(box1x, box1y, box1w, box1h, box2x, box2y, box2w, box2h)&lt;br /&gt;
		return not (box1x - box1w/2 &amp;gt; box2x + box2w/2 or -- is box1 on the right side of box2?&lt;br /&gt;
		   box1y - box1h/2 &amp;gt; box2y + box2h/2 or -- is box1 under box2?&lt;br /&gt;
		   box1x + box1w/2 &amp;lt; box2x - box2w/2 or -- is box1 on the left side of box2?&lt;br /&gt;
		   box1y + box1h/2 &amp;lt; box2y - box2h/2) -- is box1 above box2?&lt;br /&gt;
	end&lt;br /&gt;
	if ent.headhitbox and ent.headhitbox.isactive then -- HEAD&lt;br /&gt;
		for k, _ in pairs(self.spriteslist) do -- k = entity, v = true&lt;br /&gt;
			-- filter out unwanted collisions (player1 vs player1, nme vs nme, ... (you choose!)&lt;br /&gt;
			if (ent.isplayer1 and k.isplayer1) or&lt;br /&gt;
				ent.isdestructibleobject or -- destructible objects only receive damage&lt;br /&gt;
				(ent.iscollectible or k.iscollectible) or -- don&amp;#039;t check for collectibles&lt;br /&gt;
				(ent.isnme and k.isnme) or&lt;br /&gt;
				(ent.isnme and k.isdestructibleobject) then -- nmes don&amp;#039;t destroy objects, you choose&lt;br /&gt;
				-- nothing here!&lt;br /&gt;
			-- check head collisions according to actors action and use actor y or actor positionystart&lt;br /&gt;
			-- this prevents collisions between wrong hitbox and hurtbox (actors too far away on y axis)&lt;br /&gt;
			elseif (ent.isactionjumppunch1 or ent.isactionjump1) and (k.isactionjumppunch1 or k.isactionjumpkick1 or k.isactionjump1) then&lt;br /&gt;
				if checkY(ent.positionystart, k.positionystart, ent.collbox.h+k.collbox.h) and checkCollision(&lt;br /&gt;
					ent.pos.x+ent.collbox.w/2+(ent.headhitbox.x*ent.flip), ent.pos.y+ent.headhitbox.y,&lt;br /&gt;
					ent.headhitbox.w, ent.headhitbox.h,&lt;br /&gt;
					k.pos.x+k.collbox.w/2+(k.headhurtbox.x*k.flip), k.pos.y+k.headhurtbox.y,&lt;br /&gt;
					k.headhurtbox.w, k.headhurtbox.h) and&lt;br /&gt;
					k.washurt &amp;lt;= 0 and k.wasbadlyhurt &amp;lt;= 0 then -- &amp;lt;= here!&lt;br /&gt;
						k.isdirty = true&lt;br /&gt;
						k.damage = ent.headhitbox.damage&lt;br /&gt;
						if k.animation then k.animation.frame = 0 end&lt;br /&gt;
						ent.headhitbox.isactive = false&lt;br /&gt;
				else&lt;br /&gt;
					k.isdirty = false&lt;br /&gt;
					ent.headhitbox.isactive = false&lt;br /&gt;
				end&lt;br /&gt;
			elseif (ent.isactionjumppunch1 or ent.isactionjump1) and not (k.isactionjumppunch1 or k.isactionjumpkick1 or k.isactionjump1) then&lt;br /&gt;
				if checkY(ent.positionystart, k.pos.y, ent.collbox.h + k.collbox.h) and checkCollision(&lt;br /&gt;
					ent.pos.x+ent.collbox.w/2+(ent.headhitbox.x*ent.flip), ent.pos.y+ent.headhitbox.y,&lt;br /&gt;
					ent.headhitbox.w, ent.headhitbox.h,&lt;br /&gt;
					k.pos.x+k.collbox.w/2+(k.headhurtbox.x*k.flip), k.pos.y+k.headhurtbox.y,&lt;br /&gt;
					k.headhurtbox.w, k.headhurtbox.h) and&lt;br /&gt;
					k.washurt &amp;lt;= 0 and k.wasbadlyhurt &amp;lt;= 0 then -- &amp;lt;= here!&lt;br /&gt;
						k.isdirty = true&lt;br /&gt;
						k.damage = ent.headhitbox.damage&lt;br /&gt;
						if k.animation then k.animation.frame = 0 end&lt;br /&gt;
						ent.headhitbox.isactive = false&lt;br /&gt;
				else&lt;br /&gt;
					k.isdirty = false&lt;br /&gt;
					ent.headhitbox.isactive = false&lt;br /&gt;
				end&lt;br /&gt;
			elseif not (ent.isactionjumppunch1 or ent.isactionjump1) and (k.isactionjumppunch1 or k.isactionjumpkick1 or k.isactionjump1) then&lt;br /&gt;
				if checkY(ent.pos.y, k.positionystart, ent.collbox.h + k.collbox.h) and checkCollision(&lt;br /&gt;
					ent.pos.x+ent.collbox.w/2+(ent.headhitbox.x*ent.flip), ent.pos.y+ent.headhitbox.y,&lt;br /&gt;
					ent.headhitbox.w, ent.headhitbox.h,&lt;br /&gt;
					k.pos.x+k.collbox.w/2+(k.headhurtbox.x*k.flip), k.pos.y+k.headhurtbox.y,&lt;br /&gt;
					k.headhurtbox.w, k.headhurtbox.h) and&lt;br /&gt;
					k.washurt &amp;lt;= 0 and k.wasbadlyhurt &amp;lt;= 0 then -- &amp;lt;= here!&lt;br /&gt;
						k.isdirty = true&lt;br /&gt;
						k.damage = ent.headhitbox.damage&lt;br /&gt;
						if k.animation then k.animation.frame = 0 end&lt;br /&gt;
						ent.headhitbox.isactive = false&lt;br /&gt;
				else&lt;br /&gt;
					k.isdirty = false&lt;br /&gt;
					ent.headhitbox.isactive = false&lt;br /&gt;
				end&lt;br /&gt;
			else&lt;br /&gt;
				if checkY(ent.pos.y, k.pos.y, ent.collbox.h+k.collbox.h) and checkCollision(&lt;br /&gt;
				ent.pos.x+ent.collbox.w/2+(ent.headhitbox.x*ent.flip), ent.pos.y+ent.headhitbox.y,&lt;br /&gt;
				ent.headhitbox.w, ent.headhitbox.h,&lt;br /&gt;
				k.pos.x+k.collbox.w/2+(k.headhurtbox.x*k.flip), k.pos.y+k.headhurtbox.y,&lt;br /&gt;
				k.headhurtbox.w, k.headhurtbox.h) and&lt;br /&gt;
				k.washurt &amp;lt;= 0 and k.wasbadlyhurt &amp;lt;= 0 then -- &amp;lt;= here!&lt;br /&gt;
					k.isdirty = true&lt;br /&gt;
					k.damage = ent.headhitbox.damage&lt;br /&gt;
					if k.animation then k.animation.frame = 0 end&lt;br /&gt;
					ent.headhitbox.isactive = false&lt;br /&gt;
				else&lt;br /&gt;
					k.isdirty = false&lt;br /&gt;
					ent.headhitbox.isactive = false&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	elseif ent.spinehitbox and ent.spinehitbox.isactive then -- SPINE&lt;br /&gt;
		for k, _ in pairs(self.spriteslist) do&lt;br /&gt;
			-- filter out unwanted collisions (player1 vs player1, nme vs nme, ... (you choose!)&lt;br /&gt;
			if (ent.isplayer1 and k.isplayer1) or&lt;br /&gt;
				ent.isdestructibleobject or -- destructible objects only receive damage&lt;br /&gt;
				(ent.iscollectible or k.iscollectible) or -- don&amp;#039;t check for collectibles&lt;br /&gt;
				(ent.isnme and k.isnme) or&lt;br /&gt;
				(ent.isnme and k.isdestructibleobject) then -- nmes don&amp;#039;t destroy objects, you choose&lt;br /&gt;
				-- nothing here!&lt;br /&gt;
			-- check spine collisions according to actors action and use actor y or actor positionystart&lt;br /&gt;
			-- this prevents collisions between wrong hitbox and hurtbox (actors too far away on y axis)&lt;br /&gt;
			elseif (ent.isactionjumpkick1 or ent.isactionjump1) and (k.isactionjumppunch1 or k.isactionjumpkick1 or k.isactionjump1) then&lt;br /&gt;
				if checkY(ent.positionystart, k.positionystart, ent.collbox.h + k.collbox.h) and checkCollision(&lt;br /&gt;
					ent.pos.x+ent.collbox.w/2+(ent.spinehitbox.x*ent.flip), ent.pos.y+ent.spinehitbox.y,&lt;br /&gt;
					ent.spinehitbox.w, ent.spinehitbox.h,&lt;br /&gt;
					k.pos.x+k.collbox.w/2+(k.spinehurtbox.x*k.flip), k.pos.y+k.spinehurtbox.y,&lt;br /&gt;
					k.spinehurtbox.w, k.spinehurtbox.h) and&lt;br /&gt;
					k.washurt &amp;lt;= 0 and k.wasbadlyhurt &amp;lt;= 0 then -- &amp;lt;= here!&lt;br /&gt;
						k.isdirty = true&lt;br /&gt;
						k.damage = ent.spinehitbox.damage&lt;br /&gt;
						if k.animation then k.animation.frame = 0 end&lt;br /&gt;
						ent.spinehitbox.isactive = false&lt;br /&gt;
				else&lt;br /&gt;
					k.isdirty = false&lt;br /&gt;
					ent.spinehitbox.isactive = false&lt;br /&gt;
				end&lt;br /&gt;
			elseif (ent.isactionjumpkick1 or ent.isactionjump1) and not (k.isactionjumppunch1 or k.isactionjumpkick1 or k.isactionjump1) then&lt;br /&gt;
				if checkY(ent.positionystart, k.pos.y, ent.collbox.h + k.collbox.h) and checkCollision(&lt;br /&gt;
					ent.pos.x+ent.collbox.w/2+(ent.spinehitbox.x*ent.flip), ent.pos.y+ent.spinehitbox.y,&lt;br /&gt;
					ent.spinehitbox.w, ent.spinehitbox.h,&lt;br /&gt;
					k.pos.x+k.collbox.w/2+(k.spinehurtbox.x*k.flip), k.pos.y+k.spinehurtbox.y,&lt;br /&gt;
					k.spinehurtbox.w, k.spinehurtbox.h) and&lt;br /&gt;
					k.washurt &amp;lt;= 0 and k.wasbadlyhurt &amp;lt;= 0 then -- &amp;lt;= here!&lt;br /&gt;
						k.isdirty = true&lt;br /&gt;
						k.damage = ent.spinehitbox.damage&lt;br /&gt;
						if k.animation then k.animation.frame = 0 end&lt;br /&gt;
						ent.spinehitbox.isactive = false&lt;br /&gt;
				else&lt;br /&gt;
					k.isdirty = false&lt;br /&gt;
					ent.spinehitbox.isactive = false&lt;br /&gt;
				end&lt;br /&gt;
			elseif not (ent.isactionjumpkick1 or ent.isactionjump1) and (k.isactionjumppunch1 or k.isactionjumpkick1 or k.isactionjump1) then&lt;br /&gt;
				if checkY(ent.pos.y, k.positionystart, ent.collbox.h + k.collbox.h) and checkCollision(&lt;br /&gt;
					ent.pos.x+ent.collbox.w/2+(ent.spinehitbox.x*ent.flip), ent.pos.y+ent.spinehitbox.y,&lt;br /&gt;
					ent.spinehitbox.w, ent.spinehitbox.h,&lt;br /&gt;
					k.pos.x+k.collbox.w/2+(k.spinehurtbox.x*k.flip), k.pos.y+k.spinehurtbox.y,&lt;br /&gt;
					k.spinehurtbox.w, k.spinehurtbox.h) and&lt;br /&gt;
					k.washurt &amp;lt;= 0 and k.wasbadlyhurt &amp;lt;= 0 then -- &amp;lt;= here!&lt;br /&gt;
						k.isdirty = true&lt;br /&gt;
						k.damage = ent.spinehitbox.damage&lt;br /&gt;
						if k.animation then k.animation.frame = 0 end&lt;br /&gt;
						ent.spinehitbox.isactive = false&lt;br /&gt;
				else&lt;br /&gt;
					k.isdirty = false&lt;br /&gt;
					ent.spinehitbox.isactive = false&lt;br /&gt;
				end&lt;br /&gt;
			else&lt;br /&gt;
				if checkY(ent.pos.y, k.pos.y, ent.collbox.h + k.collbox.h) and checkCollision(&lt;br /&gt;
					ent.pos.x+ent.collbox.w/2+(ent.spinehitbox.x*ent.flip), ent.pos.y+ent.spinehitbox.y,&lt;br /&gt;
					ent.spinehitbox.w, ent.spinehitbox.h,&lt;br /&gt;
					k.pos.x+k.collbox.w/2+(k.spinehurtbox.x*k.flip), k.pos.y+k.spinehurtbox.y,&lt;br /&gt;
					k.spinehurtbox.w, k.spinehurtbox.h) and&lt;br /&gt;
					k.washurt &amp;lt;= 0 and k.wasbadlyhurt &amp;lt;= 0 then -- &amp;lt;= here!&lt;br /&gt;
						k.isdirty = true&lt;br /&gt;
						k.damage = ent.spinehitbox.damage&lt;br /&gt;
						if k.animation then k.animation.frame = 0 end&lt;br /&gt;
						ent.spinehitbox.isactive = false&lt;br /&gt;
				else&lt;br /&gt;
					k.isdirty = false&lt;br /&gt;
					ent.spinehitbox.isactive = false&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This System checks if a hitbox and a hurtbox overlap then deals damages to the hurt actor:&lt;br /&gt;
* runs once on init and &amp;#039;&amp;#039;&amp;#039;every game loop&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;process&amp;#039;&amp;#039;)&lt;br /&gt;
* in &amp;#039;&amp;#039;init&amp;#039;&amp;#039; we pass the list of all the actors (&amp;#039;&amp;#039;spriteslist&amp;#039;&amp;#039; declared in &amp;#039;&amp;#039;&amp;#039;LevelX&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
* first we check if the actors are within range on the y axis with &amp;#039;&amp;#039;&amp;#039;checkY&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* then we check if a hitbox and a hurtbox collide with &amp;#039;&amp;#039;&amp;#039;checkCollision&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* when a hitbox is active, meaning an actor is in attack mode, we check if it&amp;#039;s a head hit or a body hit&lt;br /&gt;
* we also separate the ground attacks from the jump attacks&lt;br /&gt;
&lt;br /&gt;
== sCollision.lua ==&lt;br /&gt;
&amp;quot;&amp;#039;&amp;#039;&amp;#039;sCollision.lua&amp;#039;&amp;#039;&amp;#039;&amp;quot; in the &amp;#039;&amp;#039;&amp;#039;&amp;quot;_S&amp;quot;&amp;#039;&amp;#039;&amp;#039; folder. The code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
SCollision = Core.class()&lt;br /&gt;
&lt;br /&gt;
function SCollision:init(xtiny, xbworld) -- tiny function&lt;br /&gt;
	xtiny.processingSystem(self) -- called once on init and every update&lt;br /&gt;
	self.bworld = xbworld&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function SCollision:filter(ent) -- tiny function&lt;br /&gt;
	return ent.collbox and ent.body&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function SCollision:onAdd(ent) -- tiny function&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function SCollision:onRemove(ent) -- tiny function&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local col -- cbump perfs?&lt;br /&gt;
function SCollision:process(ent, dt) -- tiny function&lt;br /&gt;
	local function fun()&lt;br /&gt;
		-- collision filter&lt;br /&gt;
		local function collisionfilter(item, other) -- &amp;quot;touch&amp;quot;, &amp;quot;cross&amp;quot;, &amp;quot;slide&amp;quot;, &amp;quot;bounce&amp;quot;&lt;br /&gt;
			if item.isactionjump1 or other.isactionjump1 or&lt;br /&gt;
				item.isactionjumppunch1 or other.isactionjumppunch1 or&lt;br /&gt;
				item.isactionjumpkick1 or other.isactionjumpkick1 or&lt;br /&gt;
				item.isdead or other.isdead then return nil&lt;br /&gt;
			elseif item.iscollectible or other.iscollectible then return &amp;quot;cross&amp;quot;&lt;br /&gt;
			end return &amp;quot;slide&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
		-- cbump&lt;br /&gt;
		local goalx = ent.pos.x + ent.body.vx * dt&lt;br /&gt;
		local goaly = ent.pos.y + ent.body.vy&lt;br /&gt;
		local nextx, nexty, collisions, len = self.bworld:move(ent, goalx, goaly, collisionfilter)&lt;br /&gt;
		-- collisions&lt;br /&gt;
		for i = 1, len do&lt;br /&gt;
			col = collisions[i]&lt;br /&gt;
			if col.item.iscollectible and col.other.isplayer1 then col.item.isdirty = true&lt;br /&gt;
			elseif col.item.isplayer1 and col.other.iscollectible then col.other.isdirty = true&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		-- move &amp;amp; flip&lt;br /&gt;
		ent.pos = vector(nextx, nexty)&lt;br /&gt;
		ent.sprite:setPosition(ent.pos + vector(ent.collbox.w/2, -ent.h/2+ent.collbox.h/2))&lt;br /&gt;
		ent.animation.bmp:setScale(ent.sx * ent.flip, ent.sy)&lt;br /&gt;
		Core.yield(0.1)&lt;br /&gt;
	end&lt;br /&gt;
	Core.asyncCall(fun)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This System uses the &amp;#039;&amp;#039;&amp;#039;Bump&amp;#039;&amp;#039;&amp;#039; plugin to check for collisions between the actors collision boxes:&lt;br /&gt;
* runs once on init and &amp;#039;&amp;#039;&amp;#039;every game loop&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;process&amp;#039;&amp;#039;)&lt;br /&gt;
* in &amp;#039;&amp;#039;init&amp;#039;&amp;#039; we pass the Bump &amp;#039;&amp;#039;&amp;#039;world&amp;#039;&amp;#039;&amp;#039; the actors live in&lt;br /&gt;
* we define Bump collision filter&lt;br /&gt;
* we check if player1 collides with a collectible actor and tag the collectible as dirty&lt;br /&gt;
* finally we set the actor position and flip its bitmap in the direction it is going&lt;br /&gt;
* I experimented with &amp;#039;&amp;#039;&amp;#039;asyncCall&amp;#039;&amp;#039;&amp;#039; to test if we could gain some frames per second ;-)&lt;br /&gt;
&lt;br /&gt;
== Next? ==&lt;br /&gt;
Next we add the systems for the breakable objects and the collectibles and we are almost done with the game!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Prev.: [[Tuto tiny-ecs beatemup Part 10 Systems 2]]&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Next: [[Tuto tiny-ecs beatemup Part 12 XXX]]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[[Tutorial - tiny-ecs beatemup]]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{{GIDEROS IMPORTANT LINKS}}&lt;/div&gt;</summary>
		<author><name>MoKaLux</name></author>
	</entry>
</feed>