<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="th">
	<id>http://158.108.32.49/wiki/index.php?action=history&amp;feed=atom&amp;title=01219245%2Fcocos2d-js%2FPlatform1</id>
	<title>01219245/cocos2d-js/Platform1 - ประวัติรุ่นแก้ไข</title>
	<link rel="self" type="application/atom+xml" href="http://158.108.32.49/wiki/index.php?action=history&amp;feed=atom&amp;title=01219245%2Fcocos2d-js%2FPlatform1"/>
	<link rel="alternate" type="text/html" href="http://158.108.32.49/wiki/index.php?title=01219245/cocos2d-js/Platform1&amp;action=history"/>
	<updated>2026-04-15T23:56:26Z</updated>
	<subtitle>ประวัติรุ่นแก้ไขของหน้านี้ในวิกิ</subtitle>
	<generator>MediaWiki 1.33.1</generator>
	<entry>
		<id>http://158.108.32.49/wiki/index.php?title=01219245/cocos2d-js/Platform1&amp;diff=48282&amp;oldid=prev</id>
		<title>Jittat: /* Example code */</title>
		<link rel="alternate" type="text/html" href="http://158.108.32.49/wiki/index.php?title=01219245/cocos2d-js/Platform1&amp;diff=48282&amp;oldid=prev"/>
		<updated>2015-03-10T16:56:28Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Example code&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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;th&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;←รุ่นแก้ไขก่อนหน้า&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;รุ่นแก้ไขเมื่อ 16:56, 10 มีนาคม 2558&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=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;[[Image:Cocos-jumper-platform.png]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;[[Image:Cocos-jumper-platform.png]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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 is a sample Cocos2d-JS project that has a jumper over a set of blocks.  It implements simple physical movement and rectangular collision detection.  View its [https://github.com/jittat/cocos-js-jump].&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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 is a sample Cocos2d-JS project that has a jumper over a set of blocks.  It implements simple physical movement and rectangular collision detection.  View its &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;repository &lt;/ins&gt;[https://github.com/jittat/cocos-js-jump &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;here&lt;/ins&gt;].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jittat</name></author>
		
	</entry>
	<entry>
		<id>http://158.108.32.49/wiki/index.php?title=01219245/cocos2d-js/Platform1&amp;diff=48281&amp;oldid=prev</id>
		<title>Jittat เมื่อ 16:55, 10 มีนาคม 2558</title>
		<link rel="alternate" type="text/html" href="http://158.108.32.49/wiki/index.php?title=01219245/cocos2d-js/Platform1&amp;diff=48281&amp;oldid=prev"/>
		<updated>2015-03-10T16:55:36Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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;th&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;←รุ่นแก้ไขก่อนหน้า&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;รุ่นแก้ไขเมื่อ 16:55, 10 มีนาคม 2558&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-l10&quot; &gt;แถว 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;แถว 10:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;== Collision detection: cc.Rect ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;== Collision detection: cc.Rect ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;Previously, we have implemented our own collision detection routine.  However, Cocos2d-html5 has provided us with a few nice collision detection tools.  See [http://www.cocos2d-x.org/reference/html5-js/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;V2.2&lt;/del&gt;.2/symbols/src/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;E__Projects_cocos2d&lt;/del&gt;-html5_cocos2d_core_cocoa_CCGeometry.js.html code here.]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;Previously, we have implemented our own collision detection routine.  However, Cocos2d-html5 has provided us with a few nice collision detection tools.  See [http://www.cocos2d-x.org/reference/html5-js/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;V3&lt;/ins&gt;.2/symbols/src/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;_Users_panda_StudyWork_Cocos_cocos2d-js_frameworks_cocos2d&lt;/ins&gt;-html5_cocos2d_core_cocoa_CCGeometry.js.html code here.]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;Related functions are:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;Related functions are:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jittat</name></author>
		
	</entry>
	<entry>
		<id>http://158.108.32.49/wiki/index.php?title=01219245/cocos2d-js/Platform1&amp;diff=48280&amp;oldid=prev</id>
		<title>Jittat: หน้าที่ถูกสร้างด้วย &#039;: &#039;&#039;This is part of 01219245.  Original article was written for Cocos2d-html5.&#039;&#039;  This guide is very...&#039;</title>
		<link rel="alternate" type="text/html" href="http://158.108.32.49/wiki/index.php?title=01219245/cocos2d-js/Platform1&amp;diff=48280&amp;oldid=prev"/>
		<updated>2015-03-10T16:52:13Z</updated>

		<summary type="html">&lt;p&gt;หน้าที่ถูกสร้างด้วย &amp;#039;: &amp;#039;&amp;#039;This is part of &lt;a href=&quot;/wiki/index.php/01219245&quot; class=&quot;mw-redirect&quot; title=&quot;01219245&quot;&gt;01219245&lt;/a&gt;.  Original article was written for &lt;a href=&quot;/wiki/index.php/01219245/cocos2d/Platform1&quot; title=&quot;01219245/cocos2d/Platform1&quot;&gt;Cocos2d-html5&lt;/a&gt;.&amp;#039;&amp;#039;  This guide is very...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;หน้าใหม่&lt;/b&gt;&lt;/p&gt;&lt;div&gt;: &amp;#039;&amp;#039;This is part of [[01219245]].  Original article was written for [[01219245/cocos2d/Platform1|Cocos2d-html5]].&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This guide is very short.  It only discuss various techniques in implementing platform games.&lt;br /&gt;
&lt;br /&gt;
Here are a few useful links:&lt;br /&gt;
&lt;br /&gt;
* [http://higherorderfun.com/blog/2012/05/20/the-guide-to-implementing-2d-platformers/ The guide to implementing 2D platformers] by Rodrigo Monteiro.&lt;br /&gt;
* [http://info.sonicretro.org/Sonic_Physics_Guide Sonic Physics Guide]&lt;br /&gt;
&lt;br /&gt;
== Collision detection: cc.Rect ==&lt;br /&gt;
&lt;br /&gt;
Previously, we have implemented our own collision detection routine.  However, Cocos2d-html5 has provided us with a few nice collision detection tools.  See [http://www.cocos2d-x.org/reference/html5-js/V2.2.2/symbols/src/E__Projects_cocos2d-html5_cocos2d_core_cocoa_CCGeometry.js.html code here.]&lt;br /&gt;
&lt;br /&gt;
Related functions are:&lt;br /&gt;
&lt;br /&gt;
* Creation: &amp;lt;tt&amp;gt;cc.rect&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Accessing functions: &amp;lt;tt&amp;gt;cc.rectGetMaxX&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;cc.rectGetMidX&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;cc.rectGetMinX&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;cc.rectGetMaxY&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;cc.rectGetMidY&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;cc.rectGetMinY&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Testing:&lt;br /&gt;
** &amp;lt;tt&amp;gt;cc.rectEqualToRect&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;cc.rectContainsRect&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;cc.rectContainsPoint&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;cc.rectIntersectsRect&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;cc.rectOverlapsRect&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Manipulation:&lt;br /&gt;
** &amp;lt;tt&amp;gt;cc.rectUnion&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;cc.rectIntersection&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bounding boxes and world co-ordinates ===&lt;br /&gt;
&lt;br /&gt;
=== Intersection ===&lt;br /&gt;
&lt;br /&gt;
=== Falling on top ===&lt;br /&gt;
[[Image:Cocos-platform-fall-through.png]]&lt;br /&gt;
&lt;br /&gt;
== Example code ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Cocos-jumper-platform.png]]&lt;br /&gt;
&lt;br /&gt;
This is a sample Cocos2d-JS project that has a jumper over a set of blocks.  It implements simple physical movement and rectangular collision detection.  View its [https://github.com/jittat/cocos-js-jump].&lt;/div&gt;</summary>
		<author><name>Jittat</name></author>
		
	</entry>
</feed>