<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://digida.mgpu.ru/index.php?action=history&amp;feed=atom&amp;title=Making_Sprites_Detect_and_Sense_Other_Sprites</id>
	<title>Making Sprites Detect and Sense Other Sprites - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://digida.mgpu.ru/index.php?action=history&amp;feed=atom&amp;title=Making_Sprites_Detect_and_Sense_Other_Sprites"/>
	<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Making_Sprites_Detect_and_Sense_Other_Sprites&amp;action=history"/>
	<updated>2026-04-30T18:04:20Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=Making_Sprites_Detect_and_Sense_Other_Sprites&amp;diff=13468&amp;oldid=prev</id>
		<title>Patarakin в 16:48, 17 ноября 2023</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Making_Sprites_Detect_and_Sense_Other_Sprites&amp;diff=13468&amp;oldid=prev"/>
		<updated>2023-11-17T16:48: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;ru&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 19:48, 17 ноября 2023&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-l37&quot;&gt;Строка 37:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 37:&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;===Using Sensor Edges===&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;===Using Sensor Edges===&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;[[File:Simple sprite detection with sensor ring.png|200px|thumb|right|The sensing sprite sensing another sprite.]]&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;/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;Some games draw invisible circles that are centered around a sprite, called sensor edges, to help implement character senses. They are as wide as the sprite can sense (hear, see or smell), and that is why it is called an edge.&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;Some games draw invisible circles that are centered around a sprite, called sensor edges, to help implement character senses. They are as wide as the sprite can sense (hear, see or smell), and that is why it is called an edge.&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;!-- diff cache key digida:diff:1.41:old-13467:rev-13468:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Patarakin</name></author>
	</entry>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=Making_Sprites_Detect_and_Sense_Other_Sprites&amp;diff=13467&amp;oldid=prev</id>
		<title>Patarakin в 16:47, 17 ноября 2023</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Making_Sprites_Detect_and_Sense_Other_Sprites&amp;diff=13467&amp;oldid=prev"/>
		<updated>2023-11-17T16:47:09Z</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;ru&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 19:47, 17 ноября 2023&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;Строка 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 1:&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;External Programs}}&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;Scripting Tutorials&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;{{Wiki Standards&lt;/del&gt;|&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;date&lt;/del&gt;=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;May 2020&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;Description&lt;/ins&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;|Field_of_knowledge=Информатика, Геометрия&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;/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;This tutorial will teach how to &amp;#039;&amp;#039;&amp;#039;make [[sprite]]s detect and sense other sprites&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;This tutorial will teach how to &amp;#039;&amp;#039;&amp;#039;make [[sprite]]s detect and sense other sprites&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 colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l92&quot;&gt;Строка 92:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 94:&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;== External 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;== External Links ==&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;* [[projects:395543650|simple sprite detection]] on Scratch&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;/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;* [[wikipedia:Cartesian coordinate system#Rotation|Trigonometric Rotations in Cartesian Systems]] on Wikipedia&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;* [[wikipedia:Cartesian coordinate system#Rotation|Trigonometric Rotations in Cartesian Systems]] on Wikipedia&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;* [https://www.mathsisfun.com/algebra/line-equation-2points.html Equation of a Line from 2 Points] on mathisfun.com&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;/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:Scripting Tutorials]]&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:Scripting Tutorials]]&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;[[Category:Game Design Tutorials]]&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;/table&gt;</summary>
		<author><name>Patarakin</name></author>
	</entry>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=Making_Sprites_Detect_and_Sense_Other_Sprites&amp;diff=1782&amp;oldid=prev</id>
		<title>Patarakin: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Making_Sprites_Detect_and_Sense_Other_Sprites&amp;diff=1782&amp;oldid=prev"/>
		<updated>2022-07-21T08:33:16Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 11:33, 21 июля 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Patarakin</name></author>
	</entry>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=Making_Sprites_Detect_and_Sense_Other_Sprites&amp;diff=1781&amp;oldid=prev</id>
		<title>scratch&gt;TemplatesFTW: Automated edit: Added {{External Programs}}</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=Making_Sprites_Detect_and_Sense_Other_Sprites&amp;diff=1781&amp;oldid=prev"/>
		<updated>2021-06-10T10:23:18Z</updated>

		<summary type="html">&lt;p&gt;Automated edit: Added {{&lt;a href=&quot;/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:External_Programs&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Шаблон:External Programs (страница не существует)&quot;&gt;External Programs&lt;/a&gt;}}&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{External Programs}}&lt;br /&gt;
{{Wiki Standards|date=May 2020}}&lt;br /&gt;
This tutorial will teach how to &amp;#039;&amp;#039;&amp;#039;make [[sprite]]s detect and sense other sprites&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
The tutorial assumes users are comfortable with making [[project]]s that;&lt;br /&gt;
* Use keyboard input to move sprites,&lt;br /&gt;
* Send and receive [[broadcast]]s,&lt;br /&gt;
* Include [[My Blocks|custom blocks]] and&lt;br /&gt;
* Use Game Loops to control and sequence projects.&lt;br /&gt;
&lt;br /&gt;
If a refresher is needed, [[:Category:Game Design Tutorials|these tutorials]] can be followed.&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
Make three variables:&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
(delta x)&lt;br /&gt;
(delta y)&lt;br /&gt;
(raycast result)&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
Make one custom block:&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
raycast () () () ()::custom&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
Make one broadcast:&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
broadcast (sensed v)&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
==What Does Sprite Detection Mean?==&lt;br /&gt;
Creating realistic characters in games starts with giving them the ability to sense their surroundings. &lt;br /&gt;
&lt;br /&gt;
To make games more realistic, the sensing sprite can be created with senses. By sensing other sprites before it touches them, behaviors can be programmed so that the sensing sprite runs towards a certain sprite and away from the other sprite.&lt;br /&gt;
&lt;br /&gt;
==How is it Applied in Projects?==&lt;br /&gt;
&lt;br /&gt;
===Using Sensor Edges===&lt;br /&gt;
[[File:Simple sprite detection with sensor ring.png|200px|thumb|right|The sensing sprite sensing another sprite.]]&lt;br /&gt;
Some games draw invisible circles that are centered around a sprite, called sensor edges, to help implement character senses. They are as wide as the sprite can sense (hear, see or smell), and that is why it is called an edge.&lt;br /&gt;
&lt;br /&gt;
When the sensor edge is touched by another sprite, the sensing sprite can react. It can run away from one sprite, or towards another.&lt;br /&gt;
&lt;br /&gt;
One complication is that the sensing sprite knows when a sprite is at the edge of its senses, but it does not know in which direction.&lt;br /&gt;
For it to know in what direction the sprites are, a second step is needed.&lt;br /&gt;
&lt;br /&gt;
===Casting Lines to Sense Direction and Location===&lt;br /&gt;
This process may be called raycasting. This raycasting is when a straight line (like a ray of light) is cast in a possible direction. If the sensing sprite casts a ray in the direction it is looking (called a line of sight) and that line touches a certain sprite, the sensing sprite can process what to do based off of that information.&lt;br /&gt;
&lt;br /&gt;
===Putting It All Together===&lt;br /&gt;
Using a sensor edge allows the sensing sprite to sense a sprite, then it can use raycasting to look around for a certain sprite.&lt;br /&gt;
&lt;br /&gt;
== How Can This be Done in Scratch? ==&lt;br /&gt;
In [[Scratch]], the following two things need to be done.&lt;br /&gt;
&lt;br /&gt;
===Collision Detection and Sensor Rings===&lt;br /&gt;
The sensor ring is a separate sprite. This sensor ring sprite can send messages to the sensing sprite whenever another sprite touches it. It also makes sure to always stay at the same position as the sensing sprite, so whenever that sprite moves, so does the sensor edge sprite. It follows the sensing sprite, and it uses the ghost effect so it is not seen by players in the game, but it still runs its code. Here is the script:&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
set [ghost v] effect to (100)&lt;br /&gt;
forever&lt;br /&gt;
if &amp;lt;touching (sprite v)?&amp;gt; then&lt;br /&gt;
	broadcast (sense v)&lt;br /&gt;
end&lt;br /&gt;
go to x: ([x position v] of (sensing sprite v)) y: ([y position v] of (sensing sprite v))&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Casting Lines With Raycasting===&lt;br /&gt;
When the sensing sprite receives a message (from the sensor ring sprite) telling it another sprite is close, the sensing sprite starts looking for the touching sprite.&lt;br /&gt;
It uses trigonometry to work out the direction of the touching sprite, so it can turn away from it or, to be exact, turn 180 degrees away.&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when I receive [sensed v]&lt;br /&gt;
raycast ([x position v] of (sprite v)) ([y position v] of (sprite v)) (0) (180)&lt;br /&gt;
point in direction (raycast result)&lt;br /&gt;
broadcast (sensed v)&lt;br /&gt;
&lt;br /&gt;
define raycast (target x) (target y) (offset a) (offset b)&lt;br /&gt;
set [delta y v] to ((target x) - (y position))&lt;br /&gt;
set [delta x v] to ((target y) - (x position))&lt;br /&gt;
if &amp;lt;(delta y) = (0)&amp;gt; then&lt;br /&gt;
	if &amp;lt;(delta x) &amp;lt; (0)&amp;gt; then&lt;br /&gt;
		point in direction (-90)&lt;br /&gt;
	end&lt;br /&gt;
	else&lt;br /&gt;
		point in direction (90)&lt;br /&gt;
&lt;br /&gt;
	if &amp;lt;(delta y) &amp;lt; (0)&amp;gt; then&lt;br /&gt;
		set [raycast result v] to ((offset a::custom) + ([atan v] of ((delta x) / (delta y)))&lt;br /&gt;
	else&lt;br /&gt;
		set [raycast result v] to ((offset b::custom) + ([atan v] of ((delta x) / (delta y)))&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* [[projects:395543650|simple sprite detection]] on Scratch&lt;br /&gt;
* [[wikipedia:Cartesian coordinate system#Rotation|Trigonometric Rotations in Cartesian Systems]] on Wikipedia&lt;br /&gt;
* [https://www.mathsisfun.com/algebra/line-equation-2points.html Equation of a Line from 2 Points] on mathisfun.com&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting Tutorials]]&lt;br /&gt;
[[Category:Game Design Tutorials]]&lt;/div&gt;</summary>
		<author><name>scratch&gt;TemplatesFTW</name></author>
	</entry>
</feed>