<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	 xmlns:media="http://search.yahoo.com/mrss/" >

<channel>
	<title>Godot &#8211; AnonyViet &#8211; English Version</title>
	<atom:link href="https://en.anonyviet.com/tag/godot/feed/" rel="self" type="application/rss+xml" />
	<link>https://en.anonyviet.com</link>
	<description>The most popular website for sharing information technology, computer networks, and security knowledge. Stay up to date with the hottest news and tips</description>
	<lastBuildDate>Thu, 02 Feb 2023 21:55:42 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.2</generator>

<image>
	<url>https://en.anonyviet.com/wp-content/uploads/2023/01/cropped-ico-logo-75x75-1.png</url>
	<title>Godot &#8211; AnonyViet &#8211; English Version</title>
	<link>https://en.anonyviet.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Godot Engine &#8211; Game Engine Worth Programming For Newbies</title>
		<link>https://en.anonyviet.com/godot-engine-game-engine-worth-programming-for-newbies/</link>
					<comments>https://en.anonyviet.com/godot-engine-game-engine-worth-programming-for-newbies/#respond</comments>
		
		<dc:creator><![CDATA[AnonyViet]]></dc:creator>
		<pubDate>Thu, 02 Feb 2023 21:55:42 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Engine]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Godot]]></category>
		<category><![CDATA[Newbies]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[worth]]></category>
		<guid isPermaLink="false">https://en.anonyviet.com/?p=8523</guid>

					<description><![CDATA[If you are a enthusiast programming game then you must have heard about Unity, Unreal Engine 4, CryEngine… Most of the above Engines are written in C#, C++ which is easy to learn but difficult to use for beginners. Therefore, today I will introduce to you a new and emerging Game Engine that is Godot [&#8230;]]]></description>
										<content:encoded><![CDATA[<p></p>
<div id="ftwp-postcontent">
<p><strong>If you are a enthusiast <span style="color: #000000;"><a target="_blank" style="color: #000000;" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2F%3Fs%3Dl%25E1%25BA%25ADp%2Btr%25C3%25ACnh%2Bgame" rel="noopener" class="local-link">programming game</a></span>  then you must have heard about Unity, Unreal Engine 4, CryEngine… Most of the above Engines are written in C#, C++ which is easy to learn but difficult to use for beginners.  Therefore, today I will introduce to you a new and emerging Game Engine that is Godot Engine.</strong></p>
<div class="code-block code-block-16" style="margin: 8px 0; clear: both;">
<div align="center">
<table class=" aligncenter" style="background-color: #c0c0c0; border-collapse: collapse; width: 59.9985%;">
<tbody>
<tr>
<td style="width: 100%; text-align: center;"><span style="font-size: 12pt;"><strong>Join the channel <span style="color: #0000ff;">Telegram</span> belong to <span style="color: #008080;">AnonyViet </span> 👉 <span style="text-decoration: underline;"><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Ft.me%2Fanonyvietchat" class="local-link" rel="noopener">Link</a></span>  👈</strong></span></td>
</tr>
</tbody>
</table>
</div>
</div>
<p><strong>Godot Engine</strong> is open source software.  The editor and all accompanying tools are freely licensed by MIT.  Because it&#8217;s free, you can own everything created with this tool.  Especially with a large user community, you can use unique features shared by the community.</p>
<h2 id="ftoc-godot-engine-la-gi" class="ftwp-heading"><strong>What is Godot Engine?</strong></h2>
<p><strong>Godot Engine</strong> created by Juan &#8216;reduz&#8217; Linietsky and Ariel &#8216;punto&#8217; Manzur in 2007. The name Godot was given in reference to Samuel Beckett&#8217;s play Waitting For Godot.  Doesn&#8217;t it sound ridiculous, the name of a play is given to an emerging software.</p>
<p>Godot was released in February 2014. The source code of Godot has been released to the public on GitHub under the MIT License.  Being compared to Unity and UE4 is like two tool makers who have created a brand for decades but are always compared to a newbie.</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F01%2FGodot-Engine-download.jpg" rel="noopener" class="local-link"><img post-id="8523" fifu-featured="1" fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-17490" src="https://anonyviet.com/wp-content/uploads/2020/01/Godot-Engine-download.jpg" alt="Godot Engine &#8211; Game Engine Worth Programming For Newbies" title="Godot Engine &#8211; Game Engine Worth Programming For Newbies" width="603" height="338" srcset="https://anonyviet.com/wp-content/uploads/2020/01/Godot-Engine-download.jpg 603w, https://anonyviet.com/wp-content/uploads/2020/01/Godot-Engine-download-300x168.jpg 300w" sizes="(max-width: 603px) 100vw, 603px" title="Godot Engine - Game Engine Worth Programming For Newbies 7"/></a></p>
<h2 id="ftoc-tinh-nang" class="ftwp-heading"><strong>Feature:</strong></h2>
<h3 id="ftoc-ban-co-the-lap-trinh-voi-godot-engine-ke-ca-chua-hoc-lap-trinh" class="ftwp-heading"><strong><u>You can program with Godot Engine even without learning to program</u></strong></h3>
<p>Most Game Engines now require national languages ​​such as C++, C#… But Godot is full, it supports from basic to advanced such as: C++, C#, Python, Java, Lua, VisualScripts&#8230; Especially In particular, it has its own language, but GdScript is created based on Python and Lua. While most other languages ​​do not support their own languages.  And Now Godot is experimenting with languages ​​like Go, R, Nim, Rust and Ruby.  Those of you who like to make games should refer to those languages.  In the future, Godot is expected to link with most languages.</p>
<p>Especially it is very easy to program and write code.  With the API there are most of the elements of a game development tool and very few features that cannot be accessed directly by code.</p>
<h3 id="ftoc-he-thong-node-ho-tro-nhanh-gon-nhe" class="ftwp-heading"><strong><u>The Node System supports fast and lightweight</u></strong></h3>
<p>Most Game Engines use sence to perform a level in the game.  In Unity, it seems to be GameObject, UE is Actors.  For <strong>Godot Engine is Node.</strong></p>
<p>Node is an object and inherits from other nodes.  This explanation will be very confusing for those who have never used it, so I will talk about it in the video tutorial.</p>
<h3 id="ftoc-ho-tro-phat-trien-game-2d-3d-va-ma-nguon-mo" class="ftwp-heading"><strong><u>Support 2D, 3D and Open Source Game development</u></strong></h3>
<p>Godot supports creating 2D and 3D games.  Most of the Indie developers who create games like this tool because of the convenience it brings.  Instead of creating a pseudo 2D space (a 3D world represented in two dimensions), Godot operates in a real 2D space represented in pixels.  This simplifies 2D game creation and optimization.</p>
<p>Newer 3D support but still slower than Unreal Engine and Unity.  However, unless you&#8217;re building an AAA game with top graphics, you won&#8217;t face any limitations when using it on Godot.</p>
<p>Godot has nodes for both 2D and 3D, with some designed to work in both and support for 2.5D coming soon.</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F01%2Fgodot-engine-la-gi.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-17491" src="https://anonyviet.com/wp-content/uploads/2020/01/godot-engine-la-gi.jpg" alt="What is godot engine?" width="661" height="359" srcset="https://anonyviet.com/wp-content/uploads/2020/01/godot-engine-la-gi.jpg 661w, https://anonyviet.com/wp-content/uploads/2020/01/godot-engine-la-gi-300x163.jpg 300w" sizes="auto, (max-width: 661px) 100vw, 661px" title="Godot Engine - Game Engine Worth Programming For Newbies 8"/></a></p>
<h3 id="ftoc-nhe-ho-tro-nhieu-nen-tang-ide-rieng-cua-minh" class="ftwp-heading"><strong><u>Lightweight, Cross-Platform Support, Its Own IDE</u></strong></h3>
<p>Currently Godot version 3.1.2 its capacity is: 50.8 MB.  If you install templates, it&#8217;s <strong>200MB</strong> very light, isn&#8217;t it?</p>
<p>Godot supports many platforms such as: Linux, Windows, MacOS, Server very convenient.</p>
<p>Godot has a built-in IDE, which doesn&#8217;t have the cool features of other IDEs like VSCode&#8217;s Live Share, but it&#8217;s ideal for use with Godot.  Of course, you are not required to use the built-in IDE in this tool and can use other IDEs or text editors to program in GoDot.</p>
<h2 id="ftoc-link-download-godot-engine" class="ftwp-heading"><strong>Link Download Godot Engine</strong></h2>
<p>Godot supports all popular operating systems today.  You can download Godot Engine to install and experience making Games like a programmer.</p>
<p style="text-align: center;"><a target="_blank" href="https://en.anonyviet.com/next-link/?url=https%3A%2F%2Fgodotengine.org%2Fdownload%2Fwindows" rel="noopener noreferrer external nofollow" class="ext-link" onclick="this.target='_blank';">Windows</a></p>
<p style="text-align: center;"><a target="_blank" href="https://en.anonyviet.com/next-link/?url=https%3A%2F%2Fgodotengine.org%2Fdownload%2Fosx" rel="noopener noreferrer external nofollow" class="ext-link" onclick="this.target='_blank';">MacOS</a></p>
<p style="text-align: center;"><a target="_blank" href="https://en.anonyviet.com/next-link/?url=https%3A%2F%2Fgodotengine.org%2Fdownload%2Flinux" rel="noopener noreferrer external nofollow" class="ext-link" onclick="this.target='_blank';">Linux</a></p>
<p style="text-align: center;"><a target="_blank" href="https://en.anonyviet.com/next-link/?url=https%3A%2F%2Fgodotengine.org%2Fdownload%2Fserver" rel="noopener noreferrer external nofollow" class="ext-link" onclick="this.target='_blank';">Server</a></p>
<p>In the next articles, I will show you how to use Godot Engine to make a simple game.</p>
<p style="text-align: right;"><strong>DeathGM </strong></p>
<div class="kk-star-ratings kksr-auto kksr-align-right kksr-valign-bottom" data-payload="{&quot;align&quot;:&quot;right&quot;,&quot;id&quot;:&quot;17489&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;100&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;\u0110\u00e1nh gi\u00e1 b\u00e0i vi\u1ebft post&quot;,&quot;legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: 5\/5 - (100 b\u00ecnh ch\u1ecdn)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;width&quot;:&quot;142.5&quot;,&quot;_legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: {score}\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}">
<p>            The article achieved: 5/5 &#8211; (100 votes)    </p>
</p></div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://en.anonyviet.com/godot-engine-game-engine-worth-programming-for-newbies/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<media:content url="https://anonyviet.com/wp-content/uploads/2020/01/Godot-Engine-download.jpg" medium="image"></media:content>
            	</item>
		<item>
		<title>[Lập trình Game] LESSON 0: Introduction to Godot and Installation</title>
		<link>https://en.anonyviet.com/lap-trinh-game-lesson-0-introduction-to-godot-and-installation/</link>
					<comments>https://en.anonyviet.com/lap-trinh-game-lesson-0-introduction-to-godot-and-installation/#respond</comments>
		
		<dc:creator><![CDATA[AnonyViet]]></dc:creator>
		<pubDate>Thu, 02 Feb 2023 20:49:38 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Godot]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[Introduction]]></category>
		<category><![CDATA[lập]]></category>
		<category><![CDATA[Lesson]]></category>
		<category><![CDATA[trình]]></category>
		<guid isPermaLink="false">https://en.anonyviet.com/?p=8505</guid>

					<description><![CDATA[[LẬP TRÌNH GAME VỚI ANONYVIET] LESSON 0: Introduction to Godot and Installation. Join the channel Telegram of the AnonyViet 👉 Link 👈 Hello everyone, today Anonyviet will guide you to program 2D ​​games using Godot Engine. The first lesson is an introduction, from lesson 1 I will guide you to program 2D ​​games with Godot [&#8230;]]]></description>
										<content:encoded><![CDATA[<p></p>
<div id="ftwp-postcontent">
[LẬP TRÌNH GAME VỚI ANONYVIET]  LESSON 0: Introduction to Godot and Installation.</p>
<div class="code-block code-block-16" style="margin: 8px 0; clear: both;">
<div align="center">
<table class=" aligncenter" style="background-color: #c0c0c0; border-collapse: collapse; width: 59.9985%;">
<tbody>
<tr>
<td style="width: 100%; text-align: center;"><span style="font-size: 12pt;"><strong>Join the channel <span style="color: #0000ff;">Telegram</span> of the <span style="color: #008080;">AnonyViet </span> 👉 <span style="text-decoration: underline;"><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Ft.me%2Fanonyvietchat" class="local-link" rel="noopener">Link</a></span>  👈</strong></span></td>
</tr>
</tbody>
</table>
</div>
</div>
<p><strong>Hello everyone, today Anonyviet will guide you to program 2D ​​games using Godot Engine.  The first lesson is an introduction, from lesson 1 I will guide you to program 2D ​​games with Godot Engine from basic to advanced.  It&#8217;s easy to name it (:D) call me DeathGM.</strong></p>
<p>I see that many of you have a passion for game programming but don&#8217;t know how to program, and then ask what is needed for game programmers, is it difficult, te le, .. So I decided to share my experience with you. friends to help those who do not know programming but have a passion for making games.</p>
<p>This is an open Game Engine, supporting many languages ​​such as: C++, C#, Python, Java but if you want to program with the above, you have to improve additional software and it&#8217;s difficult to install, I&#8217;ve been searching for a week and still don&#8217;t know how to install it. (@@) and users should decide to use its own language for programming and it&#8217;s a arduous process when the Tutorial is full of Western, Russian, Spanish, .. do, I swear to you When it comes to difficult parts, it hacks my brain and I don&#8217;t understand anything (:v)..Go to the main topic.</p>
<h2 id="ftoc-godot-engine" class="ftwp-heading"> GODOT ENGINE:</h2>
<p>-As for Godot programming is not difficult and easy, easier than unity and UE4 why?  For this reason:</p>
<h3 id="ftoc-uu-diem" class="ftwp-heading"><strong>Advantage:</strong></h3>
<p>+ Better structure.  Everything about sense is more Node than Unity system, simple Signals (don&#8217;t know how to explain this :v)</p>
<p>GDScript is easy to learn, and nothing more than necessary.  Also, having the editor built into the same window is great.</p>
<p>+ Great 2D support.  No weird flat 3D scene like Unity.</p>
<p>+ Small download, works on Linux.</p>
<p>+ Great documentation.</p>
<h3 id="ftoc-nhuoc-diem" class="ftwp-heading"><strong>Defect:</strong></h3>
<p>+ Limited use.  Few answers to questions/instructions.  Asset stores are few.</p>
<p>+ If working in a team will be disadvantageous.  If you make a team game, you should do it with Unity or UE4.</p>
<p>+ Weak graphics scaling.  If you want to modify the graphic realism of your game to any degree, then you will have to write that part yourself.</p>
<p>Just talking through the speakers, you can see more at <a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fgodot-engine-game-engine-dang-de-lap-trinh-game-cho-nguoi-moi%2F" rel="noopener noreferrer" class="local-link">Godot Game Engine Introduction</a> For more details:</p>
<h2 id="ftoc-cai-dat" class="ftwp-heading"><strong>Setting</strong></h2>
<p>Now we will proceed with the installation.</p>
<p><strong>Step 1:</strong> No Page: <a target="_blank" href="https://en.anonyviet.com/next-link/?url=https%3A%2F%2Fgodotengine.org%2F" rel="noopener external nofollow" class="ext-link" onclick="this.target='_blank';">https://godotengine.org/</a> to download.  Current Version At The Time Of Writing Is <strong>3.1.2</strong></p>
<p><strong>Step 2:</strong> Download And Unzip</p>
<p>Download Open Up Click Wizad To Extract To Desktop Desktop</p>
<p><strong>Step 3:</strong> Open Up And Start Game Programming!</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F02%2Fcai-dat-godotengine-1.jpg" rel="noopener" class="local-link"><img decoding="async" class="aligncenter size-full wp-image-17569" src="https://anonyviet.com/wp-content/uploads/2020/02/cai-dat-godotengine-1.jpg" alt="install godotengine" width="587" height="357" srcset="https://anonyviet.com/wp-content/uploads/2020/02/cai-dat-godotengine-1.jpg 587w, https://anonyviet.com/wp-content/uploads/2020/02/cai-dat-godotengine-1-300x182.jpg 300w" sizes="(max-width: 587px) 100vw, 587px" title="[Lập trình Game]  LESSON 0: Introduction to Godot and Setup 10"/></a></p>
<p><strong>Scan:</strong> Find Your Project</p>
<p><strong>Import:</strong> Upload your Project</p>
<p><strong>New Project:</strong> Click to create Project Game.</p>
<p>-> Click <strong>New Project</strong>:</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F02%2Fcreate-new-project-1.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-17570" src="https://anonyviet.com/wp-content/uploads/2020/02/create-new-project-1.jpg" alt="create new project" width="468" height="375" srcset="https://anonyviet.com/wp-content/uploads/2020/02/create-new-project-1.jpg 468w, https://anonyviet.com/wp-content/uploads/2020/02/create-new-project-1-300x240.jpg 300w" sizes="auto, (max-width: 468px) 100vw, 468px" title="[Lập trình Game]  LESSON 0: Introduction to Godot and Setup 11"/></a></p>
<ul>
<li><strong>Project Name:</strong> Project name (project that you work on)</li>
<li><strong>ProjectPath:</strong> Project save path</li>
<li><strong>Renderer:</strong> the graphics you choose to make the game</li>
</ul>
<p>Now Choose <strong>Address Path</strong> Then Click Game <strong>Create Folder</strong> at Project Name To Create</p>
<p>After clicking Create folder will be like this:</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F02%2Fcreate-folder-1.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-17571" src="https://anonyviet.com/wp-content/uploads/2020/02/create-folder-1.jpg" alt="create folder" width="471" height="145" srcset="https://anonyviet.com/wp-content/uploads/2020/02/create-folder-1.jpg 471w, https://anonyviet.com/wp-content/uploads/2020/02/create-folder-1-300x92.jpg 300w" sizes="auto, (max-width: 471px) 100vw, 471px" title="[Lập trình Game]  LESSON 0: Introduction to Godot and Setup 12"/></a></p>
<p>Now your job is to use it!!</p>
<p>New in will display like this:</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F02%2FGodot-Engine-giao-dien-1.jpg" rel="noopener" class="local-link"><img alt="[Lập trình Game] LESSON 0: Introduction to Godot and Installation" title="[Lập trình Game] LESSON 0: Introduction to Godot and Installation" post-id="8505" fifu-featured="1" decoding="async" loading="lazy" class="aligncenter size-full wp-image-17572" src="https://anonyviet.com/wp-content/uploads/2020/02/Godot-Engine-giao-dien-1.jpg" alt="[Lập trình Game]  LESSON 0: Introduction to Godot and Installation 4" width="581" height="311" srcset="https://anonyviet.com/wp-content/uploads/2020/02/Godot-Engine-giao-dien-1.jpg 581w, https://anonyviet.com/wp-content/uploads/2020/02/Godot-Engine-giao-dien-1-300x161.jpg 300w" sizes="auto, (max-width: 581px) 100vw, 581px" title="[Lập trình Game]  LESSON 0: Introduction to Godot and Setup 13"/></a></p>
<p>You choose <strong>2D</strong> to make 2D Game!</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F02%2F2d-1.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-17573 size-full" src="https://anonyviet.com/wp-content/uploads/2020/02/2d-1.jpg" alt="how to create games with Godot" width="481" height="284" srcset="https://anonyviet.com/wp-content/uploads/2020/02/2d-1.jpg 481w, https://anonyviet.com/wp-content/uploads/2020/02/2d-1-300x177.jpg 300w" sizes="auto, (max-width: 481px) 100vw, 481px" title="[Lập trình Game]  LESSON 0: Introduction to Godot and Setup 14"/></a></p>
<p>As for the above pictures, I will explain in the next video!.</p>
<p style="text-align: right;"><strong>DeathGM </strong></p>
<div class="kk-star-ratings kksr-auto kksr-align-right kksr-valign-bottom" data-payload="{&quot;align&quot;:&quot;right&quot;,&quot;id&quot;:&quot;17568&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;100&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;\u0110\u00e1nh gi\u00e1 b\u00e0i vi\u1ebft post&quot;,&quot;legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: 5\/5 - (100 b\u00ecnh ch\u1ecdn)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;width&quot;:&quot;142.5&quot;,&quot;_legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: {score}\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}">
<p>            The article achieved: 5/5 &#8211; (100 votes)    </p>
</p></div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://en.anonyviet.com/lap-trinh-game-lesson-0-introduction-to-godot-and-installation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<media:content url="https://anonyviet.com/wp-content/uploads/2020/02/Godot-Engine-giao-dien-1.jpg" medium="image"></media:content>
            	</item>
		<item>
		<title>[Lập Trình Game] Display FPS for games using Godot Engine</title>
		<link>https://en.anonyviet.com/lap-trinh-game-display-fps-for-games-using-godot-engine/</link>
					<comments>https://en.anonyviet.com/lap-trinh-game-display-fps-for-games-using-godot-engine/#respond</comments>
		
		<dc:creator><![CDATA[AnonyViet]]></dc:creator>
		<pubDate>Thu, 02 Feb 2023 08:12:24 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[Engine]]></category>
		<category><![CDATA[FPS]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[Godot]]></category>
		<category><![CDATA[lập]]></category>
		<category><![CDATA[trình]]></category>
		<guid isPermaLink="false">https://en.anonyviet.com/?p=8293</guid>

					<description><![CDATA[FPS (frames per second) aka frames per second. The more frames your computer displays in a second, the smoother the game will be. FPS depends on network speed and computer hardware. To display the FPS of the Game programmed by you with Godot Engine, please follow the instructions below. Join the channel Telegram belong to [&#8230;]]]></description>
										<content:encoded><![CDATA[<p></p>
<div>
<p><strong>FPS (frames per second) aka frames per second.  The more frames your computer displays in a second, the smoother the game will be.  FPS depends on network speed and computer hardware.  To display the FPS of the Game programmed by you with Godot Engine, please follow the instructions below.</strong></p>
<div class="code-block code-block-16" style="margin: 8px 0; clear: both;">
<div align="center">
<table class=" aligncenter" style="background-color: #c0c0c0; border-collapse: collapse; width: 59.9985%;">
<tbody>
<tr>
<td style="width: 100%; text-align: center;"><span style="font-size: 12pt;"><strong>Join the channel <span style="color: #0000ff;">Telegram</span> belong to <span style="color: #008080;">AnonyViet </span> 👉 <span style="text-decoration: underline;"><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Ft.me%2Fanonyvietchat" class="local-link" rel="noopener">Link</a></span>  👈</strong></span></td>
</tr>
</tbody>
</table>
</div>
</div>
<h2>Display FPS for games using Godot Engine</h2>
<p><strong>FPS</strong></p>
<p>First of all, you have to create 2 Nodes for yourself <strong>CanvasLayer</strong>  and  <strong>label</strong>. <strong>Label</strong> is a child node of <strong>canvaslayer</strong></p>
<p>And I renamed the label -> fps label</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage001-1.png" rel="noopener" class="local-link"><img decoding="async" class="aligncenter wp-image-18799 size-full" src="https://anonyviet.com/wp-content/uploads/2020/03/image001-1.png" alt="Display FPS for games using Godot Engine" width="260" height="264" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image001-1.png 260w, https://anonyviet.com/wp-content/uploads/2020/03/image001-1-75x75.png 75w" sizes="(max-width: 260px) 100vw, 260px" title="[Lập Trình Game]  Display FPS for games using Godot Engine 9"/></a></p>
<p>You create yourself a script in Node <strong>World</strong></p>
<p>In the declaration section, you declare yourself as follows:</p>
<p><code>onready var fps_label = get_node("CanvasLayer/fps_label")</code></p>
<p><code>get_node()</code>  is to get your node address</p>
<p><code>onready var</code>  is to declare a variable that is always available eg like this:</p>
<ul>
<li>The normal var is a gun without ammo</li>
<li>Onready var is a gun that is ready to be loaded</li>
<li>Declare var in <code>_physical_process</code> then only when <code>physical_process</code> works then var it works</li>
</ul>
<p>Add yourself a function <code>func _process(delta)</code>:</p>
<p><code>_process(delta</code><strong><code>)</code>: is the function called on every idle frame</strong></p>
<p><code>_ physical _process</code>: <strong>is 1 function call on every physical frame </strong></p>
<p>You can look it up in godot&#8217;s documentation: <a target="_blank" href="https://en.anonyviet.com/next-link/?url=https%3A%2F%2Fdocs.godotengine.org%2Fen%2F3.0%2Fclasses%2Fclass_node.html%23class-node-process" rel="noopener external nofollow" class="ext-link" onclick="this.target='_blank';">https://docs.godotengine.org/en/3.0/classes/class_node.html#class-node-process</a></p>
<p>And if you use the function <code>_process(delta)</code>: you need to enable it in func _ready function with command <code>set_process(true)</code></p>
<p>And back to the main part.</p>
<p>LIVE<code> _process</code> you guys type yourself</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage002-1.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-18800 size-full" src="https://anonyviet.com/wp-content/uploads/2020/03/image002-1.png" alt="programming code to display FPS Godot Engine" width="646" height="276" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image002-1.png 646w, https://anonyviet.com/wp-content/uploads/2020/03/image002-1-300x128.png 300w" sizes="auto, (max-width: 646px) 100vw, 646px" title="[Lập Trình Game]  Display FPS for games using Godot Engine 10"/></a></p>
<p><code>func _process(delta):</code></p>
<p><code>fps_label.set_text("FPS: " + str(Engine.get_frames_per_second()))</code></p>
<p>After typing and running the game, the fps will be displayed</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2FFPS-godot-engine.jpg" rel="noopener" class="local-link"><img alt="[Lập Trình Game] Display FPS for games using Godot Engine" title="[Lập Trình Game] Display FPS for games using Godot Engine" post-id="8293" fifu-featured="1" decoding="async" loading="lazy" class="aligncenter wp-image-18798 size-full" src="https://anonyviet.com/wp-content/uploads/2020/03/FPS-godot-engine.jpg" alt="[Lập Trình Game] Display FPS for games using Godot Engine" title="[Lập Trình Game] Display FPS for games using Godot Engine" width="495" height="309" srcset="https://anonyviet.com/wp-content/uploads/2020/03/FPS-godot-engine.jpg 495w, https://anonyviet.com/wp-content/uploads/2020/03/FPS-godot-engine-300x187.jpg 300w" sizes="auto, (max-width: 495px) 100vw, 495px" title="[Lập Trình Game]  Display FPS for games using Godot Engine 11"/></a></p>
<p><strong>Note: You have to change the position of the label if you want to see the fps</strong></p>
<p>And you can also print FPS to debug by the following way</p>
<p>Project > Project Setting > Find FPS > click Debug Settings > Click Print FPS On > run the game and notice the debug will see the fps displayed</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage004-2.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-18797 size-full" src="https://anonyviet.com/wp-content/uploads/2020/03/image004-2.jpg" alt="debug game godot engine" width="624" height="380" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image004-2.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image004-2-300x183.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Display FPS for games using Godot Engine 12"/></a></p>
<div class="kk-star-ratings kksr-auto kksr-align-right kksr-valign-bottom" data-payload="{&quot;align&quot;:&quot;right&quot;,&quot;id&quot;:&quot;18796&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;100&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;\u0110\u00e1nh gi\u00e1 b\u00e0i vi\u1ebft post&quot;,&quot;legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: 5\/5 - (100 b\u00ecnh ch\u1ecdn)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;width&quot;:&quot;142.5&quot;,&quot;_legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: {score}\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}">
<p>            The article achieved: 5/5 &#8211; (100 votes)    </p>
</p></div>
<p><!-- AI CONTENT END 2 --></p></div>
]]></content:encoded>
					
					<wfw:commentRss>https://en.anonyviet.com/lap-trinh-game-display-fps-for-games-using-godot-engine/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<media:content url="https://anonyviet.com/wp-content/uploads/2020/03/FPS-godot-engine.jpg" medium="image"></media:content>
            	</item>
		<item>
		<title>[Lập Trình Game] Lesson 9: Create MENU for Game when programming with Godot</title>
		<link>https://en.anonyviet.com/lap-trinh-game-lesson-9-create-menu-for-game-when-programming-with-godot/</link>
					<comments>https://en.anonyviet.com/lap-trinh-game-lesson-9-create-menu-for-game-when-programming-with-godot/#respond</comments>
		
		<dc:creator><![CDATA[AnonyViet]]></dc:creator>
		<pubDate>Thu, 02 Feb 2023 07:31:20 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[create]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Godot]]></category>
		<category><![CDATA[lập]]></category>
		<category><![CDATA[Lesson]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[trình]]></category>
		<guid isPermaLink="false">https://en.anonyviet.com/?p=8290</guid>

					<description><![CDATA[Continuation of the series game programming with godot In this article, I will guide you to create UI for your game. User Interface (UI) is the face of the Game, when playing the game you need to have an interface to see the characters and the scene of the game. Today we will set up [&#8230;]]]></description>
										<content:encoded><![CDATA[<p></p>
<div id="ftwp-postcontent">
<p><strong>Continuation of the series<a target="_blank" href="https://en.anonyviet.com/next-link?url=http%3A%2F%2Fanonyviet.com%2F%3Fs%3Dgodot" rel="noopener noreferrer" class="local-link"> game programming with godot</a> In this article, I will guide you to create UI for your game.  User Interface (UI) is the face of the Game, when playing the game you need to have an interface to see the characters and the scene of the game.  Today we will set up the UI, specifically Create MENU for the game using Godot Engine.</strong></p>
<div class="code-block code-block-16" style="margin: 8px 0; clear: both;">
<div align="center">
<table class=" aligncenter" style="background-color: #c0c0c0; border-collapse: collapse; width: 59.9985%;">
<tbody>
<tr>
<td style="width: 100%; text-align: center;"><span style="font-size: 12pt;"><strong>Join the channel <span style="color: #0000ff;">Telegram</span> belong to <span style="color: #008080;">AnonyViet </span> 👉 <span style="text-decoration: underline;"><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Ft.me%2Fanonyvietchat" class="local-link" rel="noopener">Link</a></span>  👈</strong></span></td>
</tr>
</tbody>
</table>
</div>
</div>
<p>You guys create a new sense for yourself</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage001-1.jpg" rel="noopener" class="local-link"><img decoding="async" class="aligncenter size-full wp-image-18802" src="https://anonyviet.com/wp-content/uploads/2020/03/image001-1.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 62" width="624" height="315" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image001-1.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image001-1-300x151.jpg 300w" sizes="(max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 64"/></a></p>
<p>Select User Interface > Rename TitleMenu or whatever you want</p>
<p>Find yourself VboxContainer</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage002.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18803" src="https://anonyviet.com/wp-content/uploads/2020/03/image002.png" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 63" width="243" height="288" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 65"/></a></p>
<p>Here Vboxcontainer is Node which will contain nodes for your ui</p>
<p>Notice the Margin section in the settings</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage003-2.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18804" src="https://anonyviet.com/wp-content/uploads/2020/03/image003-2.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 64" width="624" height="286" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image003-2.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image003-2-300x138.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 66"/></a></p>
<p>Now you have to set it up to fit the screen by adjusting the margin or dragging it out to adjust it :v.</p>
<p>And here is when I finished the setup</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage004-3.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18805" src="https://anonyviet.com/wp-content/uploads/2020/03/image004-3.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 65" width="625" height="277" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image004-3.jpg 625w, https://anonyviet.com/wp-content/uploads/2020/03/image004-3-300x133.jpg 300w" sizes="auto, (max-width: 625px) 100vw, 625px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 67"/></a></p>
<p>Next find yourself a TextureRect and change it to Logo</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage005.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18806" src="https://anonyviet.com/wp-content/uploads/2020/03/image005.png" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 66" width="249" height="286" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 68"/></a></p>
<p>Here we will put our logo in.  If you don&#8217;t have a logo, you can go to the website below to create one</p>
<p>Links: <a target="_blank" href="https://en.anonyviet.com/next-link/?url=http%3A%2F%2Fwww.webestools.com%2Fweb20-title-generator-logo-title-maker-online-web20-effect-reflect-free-photoshop.html" rel="noopener external nofollow" class="ext-link" onclick="this.target='_blank';">http://www.webestools.com/web20-title-generator-logo-title-maker-online-web20-effect-reflect-free-photoshop.html</a></p>
<p>And this is when I finished creating it</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage006.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18807" src="https://anonyviet.com/wp-content/uploads/2020/03/image006.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 67" width="624" height="457" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image006.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image006-300x220.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 69"/></a></p>
<p>You click Download the Image to download</p>
<p>Then add it to the game folder</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage007.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18809" src="https://anonyviet.com/wp-content/uploads/2020/03/image007.png" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 68" width="267" height="354" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image007.png 267w, https://anonyviet.com/wp-content/uploads/2020/03/image007-226x300.png 226w" sizes="auto, (max-width: 267px) 100vw, 267px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 70"/></a></p>
<p>Then you drag the logo into the texture of Node Logo</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage008-1.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18810" src="https://anonyviet.com/wp-content/uploads/2020/03/image008-1.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 69" width="624" height="293" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image008-1.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image008-1-300x141.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 71"/></a></p>
<p>It is quite commanding in the stretch Node selection: <strong>Keep Centered</strong></p>
<p>It will come out between</p>
<p><strong> <a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage009.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18811" src="https://anonyviet.com/wp-content/uploads/2020/03/image009.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 70" width="624" height="290" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image009.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image009-300x139.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 72"/></a></strong></p>
<p>And create for me one more node called HboxContainer and rename it TrungTam</p>
<p>And this node will contain your buttons</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage010.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18812" src="https://anonyviet.com/wp-content/uploads/2020/03/image010.png" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 71" width="242" height="269" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 73"/></a></p>
<p>Find SizeFlags and select Expend for both Hoz and Ver in the HboxContainer settings</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage011-1.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18813" src="https://anonyviet.com/wp-content/uploads/2020/03/image011-1.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 72" width="624" height="285" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image011-1.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image011-1-300x137.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 74"/></a></p>
<p>Create 1 more VboxContainer in Trung Tam and Click Expand for both Hoz and Ver</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage012.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18814" src="https://anonyviet.com/wp-content/uploads/2020/03/image012.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 73" width="625" height="276" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image012.jpg 625w, https://anonyviet.com/wp-content/uploads/2020/03/image012-300x132.jpg 300w" sizes="auto, (max-width: 625px) 100vw, 625px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 75"/></a></p>
<p>Next is the button</p>
<p>Create your own Node Button under VboxContainer</p>
<p>And create Node Label under Node Button(Tro Choi Moi)</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage013-1.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18815" src="https://anonyviet.com/wp-content/uploads/2020/03/image013-1.png" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 74" width="251" height="293" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 76"/></a></p>
<p>Notice that you will see the black part below the Logo</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage014-1.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18816" src="https://anonyviet.com/wp-content/uploads/2020/03/image014-1.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 75" width="624" height="361" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image014-1.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image014-1-300x174.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 77"/></a></p>
<p>In Button(Tro Choi Moi) Click on Flat it will disappear</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage015.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18817" src="https://anonyviet.com/wp-content/uploads/2020/03/image015.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 76" width="624" height="311" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image015.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image015-300x150.jpg 300w, https://anonyviet.com/wp-content/uploads/2020/03/image015-360x180.jpg 360w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 78"/></a></p>
<p>And Next we will add Custom Font for it</p>
<p>Label > Custom Fonts > Click Font > Then Click Empty > select Dynamic Font</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage016.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18818" src="https://anonyviet.com/wp-content/uploads/2020/03/image016.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 77" width="624" height="351" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image016.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image016-300x169.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 79"/></a></p>
<p>Then click on Dynamic Font</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage017.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18819" src="https://anonyviet.com/wp-content/uploads/2020/03/image017.png" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 78" width="293" height="196" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 80"/></a></p>
<p>In Font Data > Empty > Load > choose your font</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage018.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18820" src="https://anonyviet.com/wp-content/uploads/2020/03/image018.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 79" width="624" height="351" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image018.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image018-300x169.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 81"/></a></p>
<p>Download link at the bottom of the post</p>
<p>In the Settings section, adjust the size to fit</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage019.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18821" src="https://anonyviet.com/wp-content/uploads/2020/03/image019.png" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 80" width="287" height="329" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image019.png 287w, https://anonyviet.com/wp-content/uploads/2020/03/image019-262x300.png 262w" sizes="auto, (max-width: 287px) 100vw, 287px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 82"/></a></p>
<p>Next we will save the font so that we can take it out later if needed</p>
<p>Right click on dynamic font > save</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage020.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18822" src="https://anonyviet.com/wp-content/uploads/2020/03/image020.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 81" width="624" height="351" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image020.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image020-300x169.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 83"/></a></p>
<p>Save as .tres</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage021.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18823" src="https://anonyviet.com/wp-content/uploads/2020/03/image021.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 82" width="624" height="319" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image021.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image021-300x153.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 84"/></a></p>
<p>And next we will create the effect, let&#8217;s first write the text in:</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage022.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18824" src="https://anonyviet.com/wp-content/uploads/2020/03/image022.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 83" width="624" height="211" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image022.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image022-300x101.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 85"/></a></p>
<p>Custom Constants > click the 2 upper and lower shadows</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage023.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18825" src="https://anonyviet.com/wp-content/uploads/2020/03/image023.png" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 84" width="604" height="336" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image023.png 604w, https://anonyviet.com/wp-content/uploads/2020/03/image023-300x167.png 300w" sizes="auto, (max-width: 604px) 100vw, 604px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 86"/></a></p>
<p>Click Font Color Shadow > edit color</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage024.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18826" src="https://anonyviet.com/wp-content/uploads/2020/03/image024.png" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 85" width="383" height="124" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image024.png 383w, https://anonyviet.com/wp-content/uploads/2020/03/image024-300x97.png 300w" sizes="auto, (max-width: 383px) 100vw, 383px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 87"/></a></p>
<p>And we will be like this. You can also edit the color</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage025.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18827" src="https://anonyviet.com/wp-content/uploads/2020/03/image025.png" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 86" width="525" height="296" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image025.png 525w, https://anonyviet.com/wp-content/uploads/2020/03/image025-300x169.png 300w" sizes="auto, (max-width: 525px) 100vw, 525px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 88"/></a></p>
<p>Layout section > select full rect</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage026.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18828" src="https://anonyviet.com/wp-content/uploads/2020/03/image026.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 87" width="624" height="351" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image026.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image026-300x169.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 89"/></a></p>
<p>And now we will duplicate the button to create more for ease</p>
<p>Save as sence for me. Save anywhere. But I recommend making it easy, but before when I first learned to do projects, I didn&#8217;t know how to save the folder and threw a pile there until I found it like a needle in a haystack. =))</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage027.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18829" src="https://anonyviet.com/wp-content/uploads/2020/03/image027.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 88" width="624" height="351" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image027.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image027-300x169.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 90"/></a></p>
<p>Open the saved Sense</p>
<p>Select sence > new Inherited Sense</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage028.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18830" src="https://anonyviet.com/wp-content/uploads/2020/03/image028.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 89" width="624" height="351" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image028.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image028-300x169.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 91"/></a></p>
<p>Then tap<strong> Game of Thrones</strong> then press open</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage029.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18831" src="https://anonyviet.com/wp-content/uploads/2020/03/image029.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 90" width="624" height="335" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image029.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image029-300x161.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 92"/></a></p>
<p>It will give you a sense copy</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage030.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18832" src="https://anonyviet.com/wp-content/uploads/2020/03/image030.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 91" width="624" height="301" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image030.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image030-300x145.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 93"/></a></p>
<p>Renamed TiepTuc</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage031.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18833" src="https://anonyviet.com/wp-content/uploads/2020/03/image031.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 92" width="624" height="284" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image031.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image031-300x137.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 94"/></a></p>
<p>Then make another copy of Exit Game</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage032.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18834" src="https://anonyviet.com/wp-content/uploads/2020/03/image032.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 93" width="624" height="286" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image032.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image032-300x138.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 95"/></a></p>
<p>Then add another Settings</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage033.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18835" src="https://anonyviet.com/wp-content/uploads/2020/03/image033.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 94" width="624" height="278" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image033.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image033-300x134.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 96"/></a></p>
<p>New Instance Sense</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage034.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18836" src="https://anonyviet.com/wp-content/uploads/2020/03/image034.png" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 95" width="240" height="295" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 97"/></a></p>
<p>Add the 3 just created</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage035.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18837" src="https://anonyviet.com/wp-content/uploads/2020/03/image035.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 96" width="624" height="332" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image035.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image035-300x160.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 98"/></a></p>
<p>Done it like this:</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage036.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18838" src="https://anonyviet.com/wp-content/uploads/2020/03/image036.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 97" width="624" height="457" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image036.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image036-300x220.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 99"/></a></p>
<p>Oh, I forgot to correct it for you guys :vv</p>
<p>Go to the 4 sence just created, find Rect > Min Size > change like the picture and when you make one, it will apply to all 4.</p>
<p>If there&#8217;s something that min size doesn&#8217;t change, you don&#8217;t change it</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage037.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18839" src="https://anonyviet.com/wp-content/uploads/2020/03/image037.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 98" width="624" height="289" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image037.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image037-300x139.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 100"/></a></p>
<p>New game changed</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage038.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18840" src="https://anonyviet.com/wp-content/uploads/2020/03/image038.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 99" width="624" height="413" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image038.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image038-300x199.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 101"/></a></p>
<p>Next are the other 3.  Do all 3 > Rect > min size > press the circle rs</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage039.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18841" src="https://anonyviet.com/wp-content/uploads/2020/03/image039.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 100" width="624" height="275" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image039.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image039-300x132.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 102"/></a></p>
<p>Done</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage040.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18842" src="https://anonyviet.com/wp-content/uploads/2020/03/image040.png" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 101" width="612" height="366" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image040.png 612w, https://anonyviet.com/wp-content/uploads/2020/03/image040-300x179.png 300w" sizes="auto, (max-width: 612px) 100vw, 612px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 103"/></a></p>
<p>Add me a Center Container under node Trungtam, this Center node will be the node used to upload pictures next to the 4 buttons</p>
<p>And also expand for it</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage041.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18843" src="https://anonyviet.com/wp-content/uploads/2020/03/image041.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 102" width="624" height="270" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image041.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image041-300x130.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 104"/></a></p>
<p>Then add texture rect then put your logo in</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage042.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18844" src="https://anonyviet.com/wp-content/uploads/2020/03/image042.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 103" width="624" height="293" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image042.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image042-300x141.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 105"/></a></p>
<p>Create a label in VBoxContainer</p>
<p>Label Fill and Expand in vertical</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage043.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18845" src="https://anonyviet.com/wp-content/uploads/2020/03/image043.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 104" width="624" height="323" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image043.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image043-300x155.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 106"/></a></p>
<p>Create a new dynamic font because here we will create a different font size</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage044.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18846" src="https://anonyviet.com/wp-content/uploads/2020/03/image044.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 105" width="624" height="351" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image044.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image044-300x169.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 107"/></a></p>
<p>Just create it like before</p>
<p>Adjust the size to fit your eyes</p>
<p>Click on 2 boxes: use mipmaps and use filter</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage045.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18847" src="https://anonyviet.com/wp-content/uploads/2020/03/image045.png" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 106" width="381" height="298" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image045.png 381w, https://anonyviet.com/wp-content/uploads/2020/03/image045-300x235.png 300w" sizes="auto, (max-width: 381px) 100vw, 381px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 108"/></a></p>
<p>Next add the background</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage046.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18848" src="https://anonyviet.com/wp-content/uploads/2020/03/image046.png" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 107" width="220" height="261" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 109"/></a></p>
<p>And we got 1 Menu</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage047.jpg" rel="noopener" class="local-link"><img alt="[Lập Trình Game] Lesson 9: Create MENU for Game when programming with Godot" title="[Lập Trình Game] Lesson 9: Create MENU for Game when programming with Godot" post-id="8290" fifu-featured="1" decoding="async" loading="lazy" class="aligncenter size-full wp-image-18849" src="https://anonyviet.com/wp-content/uploads/2020/03/image047.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 108" width="624" height="383" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image047.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image047-300x184.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 110"/></a></p>
<p>This menu is almost complete, the Continue – Installation will be guided in 4-8 more lessons</p>
<p>New game + exit game will be Code soon</p>
<p>Create yourself a script in <strong>play games</strong></p>
<p>Then code like below</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage048.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18850" src="https://anonyviet.com/wp-content/uploads/2020/03/image048.png" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 109" width="429" height="147" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image048.png 429w, https://anonyviet.com/wp-content/uploads/2020/03/image048-300x103.png 300w" sizes="auto, (max-width: 429px) 100vw, 429px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 111"/></a></p>
<p>The above code helps you to remove the sense you want to point to the button</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage049.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18851" src="https://anonyviet.com/wp-content/uploads/2020/03/image049.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 110" width="624" height="280" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image049.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image049-300x135.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 112"/></a></p>
<p>You can put the sense in like the picture above</p>
<p>And next</p>
<p>We will connect it</p>
<p>Click Node > Pressed() > connect</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage050.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18852" src="https://anonyviet.com/wp-content/uploads/2020/03/image050.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 111" width="624" height="351" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image050.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image050-300x169.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 113"/></a></p>
<p>Which node do you connect with, choose that node?</p>
<p>Here I connect with <strong>Gameplay</strong> so I will connect to <strong>play games</strong></p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage051.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18853" src="https://anonyviet.com/wp-content/uploads/2020/03/image051.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 112" width="624" height="306" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image051.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image051-300x147.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 114"/></a></p>
<p>This is signaling to node</p>
<p>Connect pressed() means that when the new game button is pressed, it will send a signal to the Node to receive data and then perform your actions.</p>
<p>This is after connecting it will give us a function</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage052.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18854" src="https://anonyviet.com/wp-content/uploads/2020/03/image052.png" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 113" width="463" height="110" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image052.png 463w, https://anonyviet.com/wp-content/uploads/2020/03/image052-300x71.png 300w" sizes="auto, (max-width: 463px) 100vw, 463px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 115"/></a></p>
<p>The code is as follows:</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage053.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18855" src="https://anonyviet.com/wp-content/uploads/2020/03/image053.png" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 114" width="471" height="162" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image053.png 471w, https://anonyviet.com/wp-content/uploads/2020/03/image053-300x103.png 300w" sizes="auto, (max-width: 471px) 100vw, 471px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 116"/></a></p>
<p>Get_tree().change_sence() is a command to help you change the scene</p>
<p>Change_sence() has 2 types:</p>
<p>1 is the type above the image declares the variable bosencevao which means you can put the sence in there and then get_tree().change_sence(bosencevao) it will point to the sence you put in</p>
<p>2 is get_tree().change_sence(“address of sence”)</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage054.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18856" src="https://anonyviet.com/wp-content/uploads/2020/03/image054.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 115" width="624" height="351" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image054.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image054-300x169.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 117"/></a></p>
<p>And next we will create scripts for the remaining 3 and also connect as above and code as above, no code needed.</p>
<p>Do the same 3 <strong>Gameplay</strong> &#8211; continue- let&#8217;s fix it</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage055.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18857" src="https://anonyviet.com/wp-content/uploads/2020/03/image055.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 116" width="624" height="247" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image055.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image055-300x119.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 118"/></a></p>
<p>And in the game, do the following</p>
<p>Also reconnect</p>
<p>And the code is as follows</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage056.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18858" src="https://anonyviet.com/wp-content/uploads/2020/03/image056.png" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 117" width="327" height="156" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image056.png 327w, https://anonyviet.com/wp-content/uploads/2020/03/image056-300x143.png 300w" sizes="auto, (max-width: 327px) 100vw, 327px" title="[Lập Trình Game]  Lesson 9: Creating MENU for Game when programming with Godot 119"/></a></p>
<p>Get_tree().quit() means that clicking it will quit the game</p>
<p>And then put the sense in and you&#8217;re done</p>
<p><strong>Note: Separately Install and Continue Without Putting Sense In, I will guide you later</strong></p>
<p>I&#8217;ll put sense world in</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage057.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18859" src="https://anonyviet.com/wp-content/uploads/2020/03/image057.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 118" width="624" height="305" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image057.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image057-300x147.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 120"/></a></p>
<p>Next comes the set main sence when F5 will run the sence that has been set</p>
<p>Project > Project Settings > Run > Main Sense > Click on Folder Icon</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage058.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18860" src="https://anonyviet.com/wp-content/uploads/2020/03/image058.jpg" alt="[Lập Trình Game]  Lesson 9: Creating MENU for Game when programming with Godot 119" width="624" height="351" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image058.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image058-300x169.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 121"/></a></p>
<p>Select the menu screen that we did just now</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F03%2Fimage059.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-18861" src="https://anonyviet.com/wp-content/uploads/2020/03/image059.jpg" alt="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 120" width="624" height="351" srcset="https://anonyviet.com/wp-content/uploads/2020/03/image059.jpg 624w, https://anonyviet.com/wp-content/uploads/2020/03/image059-300x169.jpg 300w" sizes="auto, (max-width: 624px) 100vw, 624px" title="[Lập Trình Game]  Lesson 9: Create MENU for Game when programming with Godot 122"/></a></p>
<p>And press F5 it will run your sense</p>
<p>And that&#8217;s it :3.  See you in the next post hehe</p>
<div class="kk-star-ratings kksr-auto kksr-align-right kksr-valign-bottom" data-payload="{&quot;align&quot;:&quot;right&quot;,&quot;id&quot;:&quot;18801&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;100&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;\u0110\u00e1nh gi\u00e1 b\u00e0i vi\u1ebft post&quot;,&quot;legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: 5\/5 - (100 b\u00ecnh ch\u1ecdn)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;width&quot;:&quot;142.5&quot;,&quot;_legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: {score}\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}">
<p>            The article achieved: 5/5 &#8211; (100 votes)    </p>
</p></div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://en.anonyviet.com/lap-trinh-game-lesson-9-create-menu-for-game-when-programming-with-godot/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<media:content url="https://anonyviet.com/wp-content/uploads/2020/03/image047.jpg" medium="image"></media:content>
            	</item>
		<item>
		<title>[Lập Trình Game] Instructions for using AutoTile when designing games with Godot</title>
		<link>https://en.anonyviet.com/lap-trinh-game-instructions-for-using-autotile-when-designing-games-with-godot/</link>
					<comments>https://en.anonyviet.com/lap-trinh-game-instructions-for-using-autotile-when-designing-games-with-godot/#respond</comments>
		
		<dc:creator><![CDATA[AnonyViet]]></dc:creator>
		<pubDate>Thu, 02 Feb 2023 05:17:25 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Autotile]]></category>
		<category><![CDATA[designing]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[Godot]]></category>
		<category><![CDATA[Instructions]]></category>
		<category><![CDATA[lập]]></category>
		<category><![CDATA[trình]]></category>
		<guid isPermaLink="false">https://en.anonyviet.com/?p=8247</guid>

					<description><![CDATA[As you know tilemap is a moving surface when your game character moves. We got acquainted with this concept in Lesson 2 Already. In this article, I will guide you to familiarize yourself with Autotile. The Autotile function helps us to automatically create tilemaps for the game without having to set it manually. Let&#8217;s just [&#8230;]]]></description>
										<content:encoded><![CDATA[<p></p>
<div>
<p><strong>As you know tilemap is a moving surface when your game character moves.  We got acquainted with this concept in <a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Flap-trinh-game-bai-2-trong-luc-be-mat-di-chuyen-va-nhay%2F" rel="noopener noreferrer" class="local-link">Lesson 2</a> Already.  In this article, I will guide you to familiarize yourself with Autotile.  The Autotile function helps us to automatically create tilemaps for the game without having to set it manually.  Let&#8217;s just get started.</strong></p>
<div class="code-block code-block-16" style="margin: 8px 0; clear: both;">
<div align="center">
<table class=" aligncenter" style="background-color: #c0c0c0; border-collapse: collapse; width: 59.9985%;">
<tbody>
<tr>
<td style="width: 100%; text-align: center;"><span style="font-size: 12pt;"><strong>Join the channel <span style="color: #0000ff;">Telegram</span> of the <span style="color: #008080;">AnonyViet </span> 👉 <span style="text-decoration: underline;"><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Ft.me%2Fanonyvietchat" class="local-link" rel="noopener">Link</a></span>  👈</strong></span></td>
</tr>
</tbody>
</table>
</div>
</div>
<p>We can summarize it as follows:</p>
<p>1. Select TileMap<br />2. Open TileSet from inspector<br />3. Expand the Child you want to use as autotile with autotile<br />a) You should create a TileSet with a single Sprite that holds the entire sprite page, instead of creating a separate Sprite node for each tile.<br />4. In the expanded view, check the “Autotile” box.<br />5. In the output box (at the bottom of the editor) you will see several tabs, one of which is called Autotiles.  Select that tab to enter Auto view.<br />6. Now you will see several tabs: Icon, Bitmask, Collision, Occlusion, Navigation and Priority</p>
<p>You can see detailed instructions below:</p>
<h2>How to create AUTOTILE</h2>
<p>Initially create tileset or you can also use the same tileset, tileset allows you to add more pictures but here I create a new project so I will refresh</p>
<p>You click Autotile and then turn on the one in the picture</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2FAutotile-1-1.jpg" rel="noopener" class="local-link"><img decoding="async" class="aligncenter wp-image-19125 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/Autotile-1-1.jpg" alt="How to create AUTOTILE" width="573" height="473" srcset="https://anonyviet.com/wp-content/uploads/2020/04/Autotile-1-1.jpg 573w, https://anonyviet.com/wp-content/uploads/2020/04/Autotile-1-1-300x248.jpg 300w" sizes="(max-width: 573px) 100vw, 573px" title="[Lập Trình Game]  Instructions for using AutoTile when designing games with Godot 13"/></a></p>
<p>Then close it with the photo</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fkeo-kit-voi-anh-1-1.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19126 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/keo-kit-voi-anh-1-1.jpg" alt="using AUTOTILE in godot" width="443" height="323" srcset="https://anonyviet.com/wp-content/uploads/2020/04/keo-kit-voi-anh-1-1.jpg 443w, https://anonyviet.com/wp-content/uploads/2020/04/keo-kit-voi-anh-1-1-300x219.jpg 300w, https://anonyviet.com/wp-content/uploads/2020/04/keo-kit-voi-anh-1-1-120x86.jpg 120w" sizes="auto, (max-width: 443px) 100vw, 443px" title="[Lập Trình Game]  Instructions for using AutoTile when designing games with Godot 14"/></a></p>
<p>Next in the Selected File</p>
<p>Tile Mode : AUTO_TILE</p>
<p>AutoTile bitmask : 3×3(minimal)</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fimage003.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19127 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/image003.png" alt="set AUTOTILE when using godot" width="185" height="459" srcset="https://anonyviet.com/wp-content/uploads/2020/04/image003.png 185w, https://anonyviet.com/wp-content/uploads/2020/04/image003-121x300.png 121w" sizes="auto, (max-width: 185px) 100vw, 185px" title="[Lập Trình Game]  Instructions for using AutoTile when designing games with Godot 15"/></a></p>
<p>Next, you choose <strong>Bitmask</strong></p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fimage004-1.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19128 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/image004-1.jpg" alt="Bitmask" width="585" height="426" srcset="https://anonyviet.com/wp-content/uploads/2020/04/image004-1.jpg 585w, https://anonyviet.com/wp-content/uploads/2020/04/image004-1-300x218.jpg 300w, https://anonyviet.com/wp-content/uploads/2020/04/image004-1-120x86.jpg 120w" sizes="auto, (max-width: 585px) 100vw, 585px" title="[Lập Trình Game]  Instructions for using AutoTile when designing games with Godot 16"/></a></p>
<p>And fill in the middle parts with red, don&#8217;t paint the outside but use it as a surface for the player to stand on</p>
<p>Like this:</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fimage005.png" rel="noopener" class="local-link"><img alt="[Lập Trình Game] Instructions for using AutoTile when designing games with Godot" title="[Lập Trình Game] Instructions for using AutoTile when designing games with Godot" post-id="8247" fifu-featured="1" decoding="async" loading="lazy" class="aligncenter wp-image-19129 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/image005.png" alt="[Lập Trình Game] Instructions for using AutoTile when designing games with Godot" title="[Lập Trình Game] Instructions for using AutoTile when designing games with Godot" width="510" height="399" srcset="https://anonyviet.com/wp-content/uploads/2020/04/image005.png 510w, https://anonyviet.com/wp-content/uploads/2020/04/image005-300x235.png 300w" sizes="auto, (max-width: 510px) 100vw, 510px" title="[Lập Trình Game]  Instructions for using AutoTile when designing games with Godot 17"/></a></p>
<p>Or like this:</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fimage006-1.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19130 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/image006-1.png" alt="autotile design" width="418" height="155" srcset="https://anonyviet.com/wp-content/uploads/2020/04/image006-1.png 418w, https://anonyviet.com/wp-content/uploads/2020/04/image006-1-300x111.png 300w" sizes="auto, (max-width: 418px) 100vw, 418px" title="[Lập Trình Game]  Instructions for using AutoTile when designing games with Godot 18"/></a></p>
<p>And next is <strong>set of Collision</strong> give it more</p>
<p>Done set</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fimage007.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19131 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/image007.png" alt="set of Collision" width="485" height="354" srcset="https://anonyviet.com/wp-content/uploads/2020/04/image007.png 485w, https://anonyviet.com/wp-content/uploads/2020/04/image007-300x219.png 300w" sizes="auto, (max-width: 485px) 100vw, 485px" title="[Lập Trình Game]  Instructions for using AutoTile when designing games with Godot 19"/></a></p>
<p>And just go out of the set when drawing a tilemap it will automatically create for you</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fimage008-1.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-19132" src="https://anonyviet.com/wp-content/uploads/2020/04/image008-1.png" alt="[Lập Trình Game]  Instructions for using AutoTile when designing games with Godot 4" width="458" height="283" srcset="https://anonyviet.com/wp-content/uploads/2020/04/image008-1.png 458w, https://anonyviet.com/wp-content/uploads/2020/04/image008-1-300x185.png 300w" sizes="auto, (max-width: 458px) 100vw, 458px" title="[Lập Trình Game]  Instructions for using AutoTile when designing games with Godot 20"/></a></p>
<p>So you have saved some manual time not having to create the moving surface by hand.  The Autotile feature automatically helps you perform repetitive mounting operations.</p>
<div class="kk-star-ratings kksr-auto kksr-align-right kksr-valign-bottom" data-payload="{&quot;align&quot;:&quot;right&quot;,&quot;id&quot;:&quot;19124&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;100&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;\u0110\u00e1nh gi\u00e1 b\u00e0i vi\u1ebft post&quot;,&quot;legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: 5\/5 - (100 b\u00ecnh ch\u1ecdn)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;width&quot;:&quot;142.5&quot;,&quot;_legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: {score}\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}">
<p>            The article achieved: 5/5 &#8211; (100 votes)    </p>
</p></div>
<p><!-- AI CONTENT END 2 --></p></div>
]]></content:encoded>
					
					<wfw:commentRss>https://en.anonyviet.com/lap-trinh-game-instructions-for-using-autotile-when-designing-games-with-godot/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<media:content url="https://anonyviet.com/wp-content/uploads/2020/04/image005.png" medium="image"></media:content>
            	</item>
		<item>
		<title>[Lập Trình Game] Lesson 10: Create In-Game Enemies with Godot &#8211; Part 1</title>
		<link>https://en.anonyviet.com/lap-trinh-game-lesson-10-create-in-game-enemies-with-godot-part-1/</link>
					<comments>https://en.anonyviet.com/lap-trinh-game-lesson-10-create-in-game-enemies-with-godot-part-1/#respond</comments>
		
		<dc:creator><![CDATA[AnonyViet]]></dc:creator>
		<pubDate>Thu, 02 Feb 2023 04:41:26 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[create]]></category>
		<category><![CDATA[Enemies]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Godot]]></category>
		<category><![CDATA[InGame]]></category>
		<category><![CDATA[lập]]></category>
		<category><![CDATA[Lesson]]></category>
		<category><![CDATA[Part]]></category>
		<category><![CDATA[trình]]></category>
		<guid isPermaLink="false">https://en.anonyviet.com/?p=8238</guid>

					<description><![CDATA[In this article, I will guide you to create enemies for our characters with Godot game programmer. Enemies will cause the character to lose blood or you have to fight the enemy. And this part has some parts that can be very difficult and unsuccessful, so be prepared. Join the channel Telegram belong to AnonyViet [&#8230;]]]></description>
										<content:encoded><![CDATA[<p></p>
<div id="ftwp-postcontent">
<p><strong>In this article, I will guide you to create enemies for our characters with <a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2F%3Fs%3Dgodot" rel="noopener noreferrer" class="local-link">Godot game programmer</a>.  Enemies will cause the character to lose blood or you have to fight the enemy.  And this part has some parts that can be very difficult and unsuccessful, so be prepared.</strong></p>
<div class="code-block code-block-16" style="margin: 8px 0; clear: both;">
<div align="center">
<table class=" aligncenter" style="background-color: #c0c0c0; border-collapse: collapse; width: 59.9985%;">
<tbody>
<tr>
<td style="width: 100%; text-align: center;"><span style="font-size: 12pt;"><strong>Join the channel <span style="color: #0000ff;">Telegram</span> belong to <span style="color: #008080;">AnonyViet </span> 👉 <span style="text-decoration: underline;"><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Ft.me%2Fanonyvietchat" class="local-link" rel="noopener">Link</a></span>  👈</strong></span></td>
</tr>
</tbody>
</table>
</div>
</div>
<p>And let&#8217;s get started.</p>
<h2 id="ftoc-tao-ke-thu-trong-godot" class="ftwp-heading">Creating Enemies in Godot</h2>
<p>First we will create a button <strong>KinematicBody2D</strong> change name to <strong>enemy.</strong> LIVE <strong>enemy</strong> > more <strong>AnimatedSprite</strong> because it is of form 1 and Collision gives it as normal.</p>
<p>If you are using anonyviet&#8217;s assets, there are enemy assets at: asset-player > NPC > enemy assets</p>
<p style="text-align: center;"><span style="text-decoration: underline;"><strong><a target="_blank" href="https://en.anonyviet.com/next-link/?url=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1WwEs_5mDaO6dagh0hCaBJpq8UMngKD-O%2Fview%3Fusp%3Dsharing" rel="noopener noreferrer external nofollow" class="ext-link" onclick="this.target='_blank';">Asset download link</a></strong></span></p>
<p>You can choose any one.</p>
<p>Create <strong>SpriteFrame</strong> new</p>
<p>Create <strong>Animation</strong> is move</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fximage001.jpg" rel="noopener" class="local-link"><img alt="[Lập Trình Game] Lesson 10: Create In-Game Enemies with Godot &#8211; Part 1" title="[Lập Trình Game] Lesson 10: Create In-Game Enemies with Godot &#8211; Part 1" post-id="8238" fifu-featured="1" decoding="async" class="aligncenter wp-image-19135 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/ximage001.jpg" alt="[Lập Trình Game] Lesson 10: Create In-Game Enemies with Godot &#8211; Part 1" title="[Lập Trình Game] Lesson 10: Create In-Game Enemies with Godot &#8211; Part 1" width="585" height="413" srcset="https://anonyviet.com/wp-content/uploads/2020/04/ximage001.jpg 585w, https://anonyviet.com/wp-content/uploads/2020/04/ximage001-300x212.jpg 300w, https://anonyviet.com/wp-content/uploads/2020/04/ximage001-120x86.jpg 120w" sizes="(max-width: 585px) 100vw, 585px" title="[Lập Trình Game]  Lesson 10: Create In-Game Enemies with Godot - Part 1 13"/></a></p>
<p>Here is the blurry picture, please re-import it</p>
<p>I have re-imported it and it looks better</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fximage002.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19136 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/ximage002.jpg" alt="image of enemies in game using godot . programming" width="585" height="311" srcset="https://anonyviet.com/wp-content/uploads/2020/04/ximage002.jpg 585w, https://anonyviet.com/wp-content/uploads/2020/04/ximage002-300x159.jpg 300w" sizes="auto, (max-width: 585px) 100vw, 585px" title="[Lập Trình Game]  Lesson 10: Creating In-Game Enemies with Godot - Part 1 14"/></a></p>
<p>Next set collision for it, here I set below not set above so that the upper part can let the character jump up and destroy it.</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fximage003.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19137 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/ximage003.png" alt="destroy the enemy" width="491" height="272" srcset="https://anonyviet.com/wp-content/uploads/2020/04/ximage003.png 491w, https://anonyviet.com/wp-content/uploads/2020/04/ximage003-300x166.png 300w" sizes="auto, (max-width: 491px) 100vw, 491px" title="[Lập Trình Game]  Lesson 10: Creating In-Game Enemies with Godot - Part 1 15"/></a></p>
<p>Lock it and create a new script and this script will be named enemy</p>
<p>We will create the following variables</p>
<pre class="EnlighterJSRAW" data-enlighter-language="null">const vitri = 1&#13;
const chuyendong = vector2&#13;
const tocdo = tùy bạn&#13;
const trongluc = tùy bạn&#13;
const  FLOOR = Vector2(0,-1)</pre>
<p>here const is the statement used to lock the number, that is, when you declare a variable with const, it will lock that number and never be able to edit its value.</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fximage004.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19138 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/ximage004.png" alt="emeny enemy movement code using godot" width="263" height="126" title="[Lập Trình Game]  Lesson 10: Creating Enemies in the Game with Godot - Part 1 16"/></a></p>
<h3 id="ftoc-code-chuyen-dong-vat-ly" class="ftwp-heading">Physical motion code</h3>
<p>Next we will create a physical motion function</p>
<p>And will code like this</p>
<p>Assign<strong> change the x-axis</strong> = with <strong>tocdo *</strong> with <strong>vitri</strong> (* leave positive speed on the right and negative speed on the left)</p>
<p>Call the animation just created above:<code> $AnimatedSprite.play(“tênanmation’)</code></p>
<p>Assign <code>chuyendong trục y += trongluc</code></p>
<p>And call the move_and_slide command so that the enemy can move.</p>
<p>And here we will need a function for the enemy to detect the wall and it will move in reverse.</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fximage005.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19139 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/ximage005.jpg" alt="Godot Physical Motion Code" width="584" height="362" srcset="https://anonyviet.com/wp-content/uploads/2020/04/ximage005.jpg 584w, https://anonyviet.com/wp-content/uploads/2020/04/ximage005-300x186.jpg 300w" sizes="auto, (max-width: 584px) 100vw, 584px" title="[Lập Trình Game]  Lesson 10: Creating Enemies in the Game with Godot - Part 1 17"/></a></p>
<p>For example: The enemy moves to the wall, then detects that wall and then it will move back. It&#8217;s like when you reach the wall, you will simply turn around.</p>
<p>And we will use the if statement to check the wall: if is_on_wall():</p>
<p>inside if wall would be: <code>vitri = vitri * -1</code></p>
<p>Above you have seen <code>tocdo * vitri</code> then positive speed is on the right and negative speed will be on the left when <strong>vitri * with -1</strong> then it will reverse and the enemy will move in reverse when hitting the wall and right again vice versa.</p>
<p>And it was successful, but you notice that our enemy doesn&#8217;t change direction but stays in one direction and now we will correct it.</p>
<p>You code like this</p>
<p><code>if vitri == 1:</code>  (vitri = 1 = positive number where positive = move to the right)</p>
<p><code>$AnimatedSprite.flip_h = false</code>  (flip_h is the command used to rotate the sprite to the right or left)</p>
<p><code>else:</code>  (opposite of above)</p>
<p><code>$AnimatedSprite.flip_h = true</code>  (flip_h = false is it won&#8217;t rotate will stay the same,true = vice versa)</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fximage006.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19140 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/ximage006.png" alt="Programming the villain in the game" width="370" height="231" srcset="https://anonyviet.com/wp-content/uploads/2020/04/ximage006.png 370w, https://anonyviet.com/wp-content/uploads/2020/04/ximage006-300x187.png 300w" sizes="auto, (max-width: 370px) 100vw, 370px" title="[Lập Trình Game]  Lesson 10: Creating Enemies in the Game with Godot - Part 1 18"/></a></p>
<p>And it moved backwards</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fximage007.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19141 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/ximage007.jpg" alt="create enemies to destroy in godot game design" width="585" height="353" srcset="https://anonyviet.com/wp-content/uploads/2020/04/ximage007.jpg 585w, https://anonyviet.com/wp-content/uploads/2020/04/ximage007-300x181.jpg 300w" sizes="auto, (max-width: 585px) 100vw, 585px" title="[Lập Trình Game]  Lesson 10: Creating Enemies in the Game with Godot - Part 1 19"/></a></p>
<p>Ok so that&#8217;s the end of part 1, creating enemies for the character.  Part 2 will help you code the enemy to move back and forth on the map as shown below</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fximage008.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19134 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/ximage008.png" alt="enemy character" width="198" height="160" title="[Lập Trình Game]  Lesson 10: Creating Enemies in the Game with Godot - Part 1 20"/></a></p>
<p>When you make those blocks the enemies won&#8217;t move back and forth and that&#8217;s why there will be Part 2</p>
<p>And Part 3 will help you create, hp, damage for the enemy ^^.</p>
<div class="kk-star-ratings kksr-auto kksr-align-right kksr-valign-bottom" data-payload="{&quot;align&quot;:&quot;right&quot;,&quot;id&quot;:&quot;19133&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;100&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;\u0110\u00e1nh gi\u00e1 b\u00e0i vi\u1ebft post&quot;,&quot;legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: 5\/5 - (100 b\u00ecnh ch\u1ecdn)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;width&quot;:&quot;142.5&quot;,&quot;_legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: {score}\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}">
<p>            The article achieved: 5/5 &#8211; (100 votes)    </p>
</p></div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://en.anonyviet.com/lap-trinh-game-lesson-10-create-in-game-enemies-with-godot-part-1/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<media:content url="https://anonyviet.com/wp-content/uploads/2020/04/ximage001.jpg" medium="image"></media:content>
            	</item>
		<item>
		<title>[Lập Trình Game] Lesson 10: Creating Enemies in Godot Programming &#8211; Part 1</title>
		<link>https://en.anonyviet.com/lap-trinh-game-lesson-10-creating-enemies-in-godot-programming-part-1/</link>
					<comments>https://en.anonyviet.com/lap-trinh-game-lesson-10-creating-enemies-in-godot-programming-part-1/#respond</comments>
		
		<dc:creator><![CDATA[AnonyViet]]></dc:creator>
		<pubDate>Thu, 02 Feb 2023 02:27:07 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[creating]]></category>
		<category><![CDATA[Enemies]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Godot]]></category>
		<category><![CDATA[lập]]></category>
		<category><![CDATA[Lesson]]></category>
		<category><![CDATA[Part]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[trình]]></category>
		<guid isPermaLink="false">https://en.anonyviet.com/?p=8193</guid>

					<description><![CDATA[In this article, I will guide you to create enemies for our characters with Godot game programmer. Enemies will cause the character to lose blood or you have to fight the enemy. And this part has some parts that can be very difficult and unsuccessful, so be prepared. Join the channel Telegram of the AnonyViet [&#8230;]]]></description>
										<content:encoded><![CDATA[<p></p>
<div>
<p><strong>In this article, I will guide you to create enemies for our characters with <a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2F%3Fs%3Dgodot" rel="noopener noreferrer" class="local-link">Godot game programmer</a>.  Enemies will cause the character to lose blood or you have to fight the enemy.  And this part has some parts that can be very difficult and unsuccessful, so be prepared.</strong></p>
<div class="code-block code-block-16" style="margin: 8px 0; clear: both;">
<div align="center">
<table class=" aligncenter" style="background-color: #c0c0c0; border-collapse: collapse; width: 59.9985%;">
<tbody>
<tr>
<td style="width: 100%; text-align: center;"><span style="font-size: 12pt;"><strong>Join the channel <span style="color: #0000ff;">Telegram</span> of the <span style="color: #008080;">AnonyViet </span> 👉 <span style="text-decoration: underline;"><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Ft.me%2Fanonyvietchat" class="local-link" rel="noopener">Link</a></span>  👈</strong></span></td>
</tr>
</tbody>
</table>
</div>
</div>
<p>And let&#8217;s get started.</p>
<h2>Create an enemy</h2>
<p>First create a new Sense and include the 2D kinematicbody the child node is <strong>AnimatedSprite</strong> and <strong>CollsionShape2D</strong> then press <strong>Ctrl + WILL</strong> save.</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fimage001.jpg" rel="noopener" class="local-link"><img decoding="async" class="aligncenter wp-image-19340 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/image001.jpg" alt="Creating Enemies in Godot Programming" width="780" height="463" srcset="https://anonyviet.com/wp-content/uploads/2020/04/image001.jpg 780w, https://anonyviet.com/wp-content/uploads/2020/04/image001-300x178.jpg 300w, https://anonyviet.com/wp-content/uploads/2020/04/image001-768x456.jpg 768w, https://anonyviet.com/wp-content/uploads/2020/04/image001-750x445.jpg 750w" sizes="(max-width: 780px) 100vw, 780px" title="[Lập Trình Game]  Lesson 10: Creating Enemies in Godot Programming - Part 1 15"/></a></p>
<p>If you are using anonyviet&#8217;s assets, there are enemy assets at: asset-player > NPC > enemy assets</p>
<p style="text-align: center;"><span style="text-decoration: underline;"><strong><a target="_blank" href="https://en.anonyviet.com/next-link/?url=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1WwEs_5mDaO6dagh0hCaBJpq8UMngKD-O%2Fview%3Fusp%3Dsharing" rel="noopener noreferrer external nofollow" class="ext-link" onclick="this.target='_blank';">Asset download link</a></strong></span></p>
<p>You can choose any one.</p>
<p>Create a new SpriteFrame</p>
<p>Creating Animation is a move</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fimage002.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19341 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/image002.jpg" alt="download asset create godot enemies" width="780" height="307" srcset="https://anonyviet.com/wp-content/uploads/2020/04/image002.jpg 780w, https://anonyviet.com/wp-content/uploads/2020/04/image002-300x118.jpg 300w, https://anonyviet.com/wp-content/uploads/2020/04/image002-768x302.jpg 768w, https://anonyviet.com/wp-content/uploads/2020/04/image002-750x295.jpg 750w" sizes="auto, (max-width: 780px) 100vw, 780px" title="[Lập Trình Game]  Lesson 10: Creating Enemies in Godot Programming - Part 1 16"/></a></p>
<p>If the photo is blurry, you guys <strong>Import</strong> come back</p>
<p>Next <strong>set collision</strong> for it, here I set the lower part not the upper one so that the upper part can let the character jump and destroy it</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fimage003.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19342 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/image003.jpg" alt="set collision" width="780" height="335" srcset="https://anonyviet.com/wp-content/uploads/2020/04/image003.jpg 780w, https://anonyviet.com/wp-content/uploads/2020/04/image003-300x129.jpg 300w, https://anonyviet.com/wp-content/uploads/2020/04/image003-768x330.jpg 768w, https://anonyviet.com/wp-content/uploads/2020/04/image003-750x322.jpg 750w" sizes="auto, (max-width: 780px) 100vw, 780px" title="[Lập Trình Game]  Lesson 10: Creating Enemies in Godot Programming - Part 1 17"/></a></p>
<p>Lock it and create a new script and this script will be named enemy</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fimage004.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19333 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/image004.jpg" alt="create enemy scripts" width="779" height="380" srcset="https://anonyviet.com/wp-content/uploads/2020/04/image004.jpg 779w, https://anonyviet.com/wp-content/uploads/2020/04/image004-300x146.jpg 300w, https://anonyviet.com/wp-content/uploads/2020/04/image004-768x375.jpg 768w, https://anonyviet.com/wp-content/uploads/2020/04/image004-750x366.jpg 750w" sizes="auto, (max-width: 779px) 100vw, 779px" title="[Lập Trình Game]  Lesson 10: Creating Enemies in Godot Programming - Part 1 18"/></a></p>
<p>We will create the following variables</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">var Vitri = 1&#13;
var  vantoc = Vector2.ZERO //hoặc Vector2() đều giống như nhau&#13;
var  Tocdo = tùy bạn&#13;
var Trongluc = tùy bạn&#13;
var  FLOOR = Vector2(0,-1)</pre>
<p>here const is the statement used to lock the number, that is, when you declare a variable with const, it will lock the number and never be able to modify its value.</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fimage005-1.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19334 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/image005-1.png" alt="code create enemy enemy godot engine" width="551" height="296" srcset="https://anonyviet.com/wp-content/uploads/2020/04/image005-1.png 551w, https://anonyviet.com/wp-content/uploads/2020/04/image005-1-300x161.png 300w" sizes="auto, (max-width: 551px) 100vw, 551px" title="[Lập Trình Game]  Lesson 10: Creating Enemies in Godot Programming - Part 1 19"/></a></p>
<p>Next we will create a physical motion function</p>
<p>And will code like this</p>
<p><strong>Assign gravity to it </strong></p>
<p><code>vantoc.y  =  trongluc</code></p>
<p><strong>Assign speed to it</strong></p>
<p><code>vantoc.x  += tocdo * delta * vitri</code>  (Here * delta to reduce enemy speed)</p>
<p><strong>Add move_and_slide statement to be able to move</strong></p>
<p><code>vantoc = move_and_slide(vantoc)</code></p>
<p>Next you will instance it outside of our sence:</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fimage006.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-19335" src="https://anonyviet.com/wp-content/uploads/2020/04/image006.jpg" alt="[Lập Trình Game]  Lesson 10: Creating Enemies in Godot Programming - Part 1 6" width="780" height="341" srcset="https://anonyviet.com/wp-content/uploads/2020/04/image006.jpg 780w, https://anonyviet.com/wp-content/uploads/2020/04/image006-300x131.jpg 300w, https://anonyviet.com/wp-content/uploads/2020/04/image006-768x336.jpg 768w, https://anonyviet.com/wp-content/uploads/2020/04/image006-750x328.jpg 750w" sizes="auto, (max-width: 780px) 100vw, 780px" title="[Lập Trình Game]  Lesson 10: Creating Enemies in Godot Programming - Part 1 20"/></a></p>
<p>And instance it out</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fimage007.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-19336" src="https://anonyviet.com/wp-content/uploads/2020/04/image007.jpg" alt="[Lập Trình Game]  Lesson 10: Creating Enemies in Godot Programming - Part 1 7" width="243" height="287" title="[Lập Trình Game]  Lesson 10: Creating Enemies in Godot Programming - Part 1 21"/></a></p>
<p>Run the game and you will see it move</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fimage008.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-19337" src="https://anonyviet.com/wp-content/uploads/2020/04/image008.jpg" alt="[Lập Trình Game]  Lesson 10: Creating Enemies in Godot Programming - Part 1 8" width="401" height="191" srcset="https://anonyviet.com/wp-content/uploads/2020/04/image008.jpg 401w, https://anonyviet.com/wp-content/uploads/2020/04/image008-300x143.jpg 300w" sizes="auto, (max-width: 401px) 100vw, 401px" title="[Lập Trình Game]  Lesson 10: Creating Enemies in Godot Programming - Part 1 22"/></a></p>
<p>Here, I set the collection mode to see it, so there&#8217;s nothing wrong</p>
<p>Next we will code so it can move left, and animation</p>
<p>And here I will have 1 command is:</p>
<p><code>if is_on_wall()</code>  : is_on_wall() is a statement that returns true if the Body is on the Wall, and it only executes when called with move_and_slide</p>
<p>And next below if is_on_wall() we will add one more line of code:</p>
<p><code>vitri = vitri * -1</code>  and this line when touching something vitri is 1 then it will * -1 and it will move backwards</p>
<p><strong>Oh and if you run the game and see that the character is running slowly, check if move_and_slide has FLOOR, if not, add it if it is but still slow, adjust the speed to about 20-30</strong></p>
<p>And next we will code the animation for it</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">if vitri == 1:&#13;
$AnimatedSprite.flip_h = false&#13;
else:&#13;
$AnimatedSprite.flip_h = true</pre>
<p>The above 2 lines are the 2 lines that will change the image of the enemy, <code>flip_h = false</code> the picture will flip to the right <code>flip_h = true</code> is to the left</p>
<p><code>if vitri == 1</code>  : means that the position is equal to 1 but = 1, it will move to the right but our enemy moves to the right first, so flip_h will = false</p>
<p>And vice versa</p>
<p>Then please call animation move for me</p>
<p><code>$AnimatedSprite.play("Move")</code></p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fimage009.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19338 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/image009.jpg" alt="how to create enemies" width="425" height="364" srcset="https://anonyviet.com/wp-content/uploads/2020/04/image009.jpg 425w, https://anonyviet.com/wp-content/uploads/2020/04/image009-300x257.jpg 300w" sizes="auto, (max-width: 425px) 100vw, 425px" title="[Lập Trình Game]  Lesson 10: Creating Enemies in Godot Programming - Part 1 23"/></a></p>
<p>Mine is fine after running the game</p>
<p>And in the next post, I will guide you to create raycast so that the enemy can move on the tilemap as shown below without dropping.</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fimage010.png" rel="noopener" class="local-link"><img alt="[Lập Trình Game] Lesson 10: Creating Enemies in Godot Programming &#8211; Part 1" title="[Lập Trình Game] Lesson 10: Creating Enemies in Godot Programming &#8211; Part 1" post-id="8193" fifu-featured="1" decoding="async" loading="lazy" class="aligncenter wp-image-19339 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/image010.png" alt="[Lập Trình Game] Lesson 10: Creating Enemies in Godot Programming &#8211; Part 1" title="[Lập Trình Game] Lesson 10: Creating Enemies in Godot Programming &#8211; Part 1" width="538" height="362" srcset="https://anonyviet.com/wp-content/uploads/2020/04/image010.png 538w, https://anonyviet.com/wp-content/uploads/2020/04/image010-300x202.png 300w" sizes="auto, (max-width: 538px) 100vw, 538px" title="[Lập Trình Game]  Lesson 10: Creating Enemies in Godot Programming - Part 1 24"/></a></p>
<div class="kk-star-ratings kksr-auto kksr-align-right kksr-valign-bottom" data-payload="{&quot;align&quot;:&quot;right&quot;,&quot;id&quot;:&quot;19332&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;100&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;\u0110\u00e1nh gi\u00e1 b\u00e0i vi\u1ebft post&quot;,&quot;legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: 5\/5 - (100 b\u00ecnh ch\u1ecdn)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;width&quot;:&quot;142.5&quot;,&quot;_legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: {score}\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}">
<p>            The article achieved: 5/5 &#8211; (100 votes)    </p>
</p></div>
<p><!-- AI CONTENT END 2 --></p></div>
]]></content:encoded>
					
					<wfw:commentRss>https://en.anonyviet.com/lap-trinh-game-lesson-10-creating-enemies-in-godot-programming-part-1/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<media:content url="https://anonyviet.com/wp-content/uploads/2020/04/image010.png" medium="image"></media:content>
            	</item>
		<item>
		<title>[Lập Trình Game] Lesson 12: Create HP for Enemy in Godot Engine</title>
		<link>https://en.anonyviet.com/lap-trinh-game-lesson-12-create-hp-for-enemy-in-godot-engine/</link>
					<comments>https://en.anonyviet.com/lap-trinh-game-lesson-12-create-hp-for-enemy-in-godot-engine/#respond</comments>
		
		<dc:creator><![CDATA[AnonyViet]]></dc:creator>
		<pubDate>Wed, 01 Feb 2023 23:52:51 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[create]]></category>
		<category><![CDATA[Enemy]]></category>
		<category><![CDATA[Engine]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Godot]]></category>
		<category><![CDATA[lập]]></category>
		<category><![CDATA[Lesson]]></category>
		<category><![CDATA[trình]]></category>
		<guid isPermaLink="false">https://en.anonyviet.com/?p=8144</guid>

					<description><![CDATA[Continuing with the enemy, in this article we will create hp for the enemy and this article is quite short, in the next post I will guide you to create slash animation (because anonyviet&#8217;s available assets do not have slash animation, so I will get animation. and if you use another asset that has an [&#8230;]]]></description>
										<content:encoded><![CDATA[<p></p>
<div>
<p><strong>Continuing with the enemy, in this article we will create hp for the enemy and this article is quite short, in the next post I will guide you to create slash animation (because anonyviet&#8217;s available assets do not have slash animation, so I will get animation. and if you use another asset that has an animation attack, use it) and kill the enemy.</strong></p>
<div class="code-block code-block-16" style="margin: 8px 0; clear: both;">
<div align="center">
<table class=" aligncenter" style="background-color: #c0c0c0; border-collapse: collapse; width: 59.9985%;">
<tbody>
<tr>
<td style="width: 100%; text-align: center;"><span style="font-size: 12pt;"><strong>Join the channel <span style="color: #0000ff;">Telegram</span> of the <span style="color: #008080;">AnonyViet </span> 👉 <span style="text-decoration: underline;"><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Ft.me%2Fanonyvietchat" class="local-link" rel="noopener">Link</a></span>  👈</strong></span></td>
</tr>
</tbody>
</table>
</div>
</div>
<h2>USE EXPORT</h2>
<p>Go to the script enemy and then you declare your HP variable</p>
<p>I will declare as:</p>
<p><code>export var hp = 2</code></p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fxximage001.png" rel="noopener" class="local-link"><img decoding="async" class="aligncenter wp-image-19469 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/xximage001.png" alt="use export declare variable HP" width="589" height="105" srcset="https://anonyviet.com/wp-content/uploads/2020/04/xximage001.png 589w, https://anonyviet.com/wp-content/uploads/2020/04/xximage001-300x53.png 300w" sizes="(max-width: 589px) 100vw, 589px" title="[Lập Trình Game]  Lesson 12: Create HP for Enemy in Godot Engine 10"/></a></p>
<p>And Export here is the declaration command that takes the value out of the table <strong>Properties</strong> to edit</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fxximage002.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19470 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/xximage002.png" alt="Properties panel to edit" width="254" height="368" srcset="https://anonyviet.com/wp-content/uploads/2020/04/xximage002.png 254w, https://anonyviet.com/wp-content/uploads/2020/04/xximage002-207x300.png 207w" sizes="auto, (max-width: 254px) 100vw, 254px" title="[Lập Trình Game]  Lesson 12: Create HP for Enemy in Godot Engine 11"/></a></p>
<p>You can also do with the same variables if you want and Export it has nothing to do with your code, it just has the function of putting the variable value out for easier editing without having to edit the code.</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fxximage003.jpg" rel="noopener" class="local-link"><img alt="[Lập Trình Game] Lesson 12: Create HP for Enemy in Godot Engine" title="[Lập Trình Game] Lesson 12: Create HP for Enemy in Godot Engine" post-id="8144" fifu-featured="1" decoding="async" loading="lazy" class="aligncenter wp-image-19471 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/xximage003.jpg" alt="[Lập Trình Game] Lesson 12: Create HP for Enemy in Godot Engine" title="[Lập Trình Game] Lesson 12: Create HP for Enemy in Godot Engine" width="781" height="244" srcset="https://anonyviet.com/wp-content/uploads/2020/04/xximage003.jpg 781w, https://anonyviet.com/wp-content/uploads/2020/04/xximage003-300x94.jpg 300w, https://anonyviet.com/wp-content/uploads/2020/04/xximage003-768x240.jpg 768w, https://anonyviet.com/wp-content/uploads/2020/04/xximage003-750x234.jpg 750w" sizes="auto, (max-width: 781px) 100vw, 781px" title="[Lập Trình Game]  Lesson 12: Create HP for Enemy in Godot Engine 12"/></a></p>
<p>And you can apply it to many other things</p>
<p>Here I will show you a trick to choose something like color etc</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fxximage004.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19472 size-full" src="https://anonyviet.com/wp-content/uploads/2020/04/xximage004.jpg" alt="Color change code" width="780" height="250" srcset="https://anonyviet.com/wp-content/uploads/2020/04/xximage004.jpg 780w, https://anonyviet.com/wp-content/uploads/2020/04/xximage004-300x96.jpg 300w, https://anonyviet.com/wp-content/uploads/2020/04/xximage004-768x246.jpg 768w, https://anonyviet.com/wp-content/uploads/2020/04/xximage004-750x240.jpg 750w" sizes="auto, (max-width: 780px) 100vw, 780px" title="[Lập Trình Game]  Lesson 12: Create HP for Enemy in Godot Engine 13"/></a></p>
<p><strong>Export(String,”text”) var tenbien</strong> is to be</p>
<p>Here if you want to change the color, you code as follows:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">if ColorMode == "Mau Do":&#13;
    $Sprite.modulate = Color(0, 0, 1, 1)&#13;
elif ColorMode == "Mau Xanh":&#13;
    $Sprite.modulate = Color(0.75, 0.75, 0.75, 1)&#13;
elif ColorMode == "Mau Cua Anonyviet":&#13;
    print(“Dep Trai Khong Bao Gio Sai)&#13;
</pre>
<p>What color is the if statement to compare?</p>
<p>$Call sprite or AnimationSprite or whatever and modulate to change color</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F04%2Fxximage005.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-19468" src="https://anonyviet.com/wp-content/uploads/2020/04/xximage005.png" alt="[Lập Trình Game]  Lesson 12: Create HP for Enemy in Godot Engine 4" width="231" height="288" title="[Lập Trình Game]  Lesson 12: Create HP for Enemy in Godot Engine 14"/></a></p>
<p>You can func create a function that contains the command to change the color and then call the function to change the color in physic or process</p>
<p>Examples are as follows:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic"># ham process goi du lieu ben trong tren tung khung hinh	&#13;
Func _process(delta):&#13;
#goi set color&#13;
Setcolor()&#13;
# ham set color&#13;
Func setcolor():&#13;
    if ColorMode == "Mau Do":&#13;
        $Sprite.modulate = Color(0, 0, 1, 1)&#13;
    elif ColorMode == "Mau Xanh":&#13;
        $Sprite.modulate = Color(0.75, 0.75, 0.75, 1)&#13;
    elif ColorMode == "Mau Cua Anonyviet":&#13;
        print(“Dep Trai Khong Bao Gio Sai)&#13;
</pre>
<div class="kk-star-ratings kksr-auto kksr-align-right kksr-valign-bottom" data-payload="{&quot;align&quot;:&quot;right&quot;,&quot;id&quot;:&quot;19467&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;100&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;\u0110\u00e1nh gi\u00e1 b\u00e0i vi\u1ebft post&quot;,&quot;legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: 5\/5 - (100 b\u00ecnh ch\u1ecdn)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;width&quot;:&quot;142.5&quot;,&quot;_legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: {score}\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}">
<p>            The article achieved: 5/5 &#8211; (100 votes)    </p>
</p></div>
<p><!-- AI CONTENT END 2 --></p></div>
]]></content:encoded>
					
					<wfw:commentRss>https://en.anonyviet.com/lap-trinh-game-lesson-12-create-hp-for-enemy-in-godot-engine/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<media:content url="https://anonyviet.com/wp-content/uploads/2020/04/xximage003.jpg" medium="image"></media:content>
            	</item>
		<item>
		<title>Guide to Programming Game With Godot Online On Website</title>
		<link>https://en.anonyviet.com/guide-to-programming-game-with-godot-online-on-website/</link>
					<comments>https://en.anonyviet.com/guide-to-programming-game-with-godot-online-on-website/#respond</comments>
		
		<dc:creator><![CDATA[AnonyViet]]></dc:creator>
		<pubDate>Wed, 01 Feb 2023 16:34:54 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Godot]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[online]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Website]]></category>
		<guid isPermaLink="false">https://en.anonyviet.com/?p=7965</guid>

					<description><![CDATA[Today I will teach you how to program games with Godot on the website and can be programmed on the phone. Godot Editor on the web was launched on May 29, which is the day I wrote this article. Godot Engine is software that helps you easily program and design games with specialized support for [&#8230;]]]></description>
										<content:encoded><![CDATA[<p></p>
<div>
<p><strong>Today I will teach you how to program games with <a target="_blank" href="https://en.anonyviet.com/next-link?url=http%3A%2F%2Fanonyviet.com%2F%3Fs%3DGodot" rel="noopener" class="local-link">Godot</a> on the website and can be programmed on the phone.  Godot Editor on the web was launched on May 29, which is the day I wrote this article.  Godot Engine is software that helps you easily program and design games with specialized support for games.  If before, you needed to download Godot to your computer, then install it, now you can program Games with Godot Online right on the Website.  Of course, you need to have Internet to code on the Website.</strong></p>
<div class="code-block code-block-16" style="margin: 8px 0; clear: both;">
<div align="center">
<table class=" aligncenter" style="background-color: #c0c0c0; border-collapse: collapse; width: 59.9985%;">
<tbody>
<tr>
<td style="width: 100%; text-align: center;"><span style="font-size: 12pt;"><strong>Join the channel <span style="color: #0000ff;">Telegram</span> of the <span style="color: #008080;">AnonyViet </span> 👉 <span style="text-decoration: underline;"><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Ft.me%2Fanonyvietchat" class="local-link" rel="noopener">Link</a></span>  👈</strong></span></td>
</tr>
</tbody>
</table>
</div>
</div>
<h2>How To Program Game With Godot Online On Website</h2>
<p>The function of programming the Godot Online Game on the Website is supported by the genuine Website.</p>
<p>First you access the link: <a target="_blank" href="https://en.anonyviet.com/next-link/?url=https%3A%2F%2Fgodotengine.org%2Fonline%2Fgodot.tools.html" rel="noopener external nofollow" class="ext-link" onclick="this.target='_blank';">https://godotengine.org/online/godot.tools.html</a></p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F05%2Fgodot-website-online.jpg" rel="noopener" class="local-link"><img decoding="async" class="aligncenter wp-image-19823 size-full" src="https://anonyviet.com/wp-content/uploads/2020/05/godot-website-online.jpg" alt="Game Programming With Godot Online On Website" width="686" height="196" srcset="https://anonyviet.com/wp-content/uploads/2020/05/godot-website-online.jpg 686w, https://anonyviet.com/wp-content/uploads/2020/05/godot-website-online-300x86.jpg 300w" sizes="(max-width: 686px) 100vw, 686px" title="Instructions for Programming Game With Godot Online On Website 14"/></a></p>
<p>This is a beta version so there are still bugs</p>
<p>You will see like the picture</p>
<p>At the<strong> Select persistence mode</strong>: Then there will be 4 selection boxes:</p>
<ul>
<li>None : You will lose data when closing the page or reloading the page</li>
<li>IndexDB: uses the IndexedDB API to store your files. Usually limited to 50 megabytes on desktop and 5 megabytes on mobile (I recommend this). <strong>for now</strong> That&#8217;s when I wrote this post, it can be updated later)</li>
<li>Dropbox: will store your files in a Dropbox folder created specifically for the test app.  You&#8217;ll also be able to upload files directly to Dropbox and they&#8217;ll be available in the tool (after page refresh). It&#8217;s a very powerful tool but quite slow at the moment, both on loading and saving (it will need to load). down the entire directory on startup and changes will be stored asynchronously). <strong>Note: At the time of your reading, Dropbox support may not work due to a limit on the maximum number of users.(</strong>I think it will be fixed later on<strong>)</strong></li>
<li>FileSystem API: uses the new FileSystem Web API, potentially revealing <strong>native file system support (File System)</strong> in the future, if the browser vendors agree on a safe way to do it.  This, again, is taken as a proof of concept and browser support is very limited so far.</li>
</ul>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F05%2Fnone.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19824 size-full" src="https://anonyviet.com/wp-content/uploads/2020/05/none.jpg" alt="Code Game With Godot Online On Website" width="623" height="244" srcset="https://anonyviet.com/wp-content/uploads/2020/05/none.jpg 623w, https://anonyviet.com/wp-content/uploads/2020/05/none-300x117.jpg 300w" sizes="auto, (max-width: 623px) 100vw, 623px" title="Guide to Programming Game With Godot Online On Website 15"/></a></p>
<p>Here I will choose IndexDB you can explore others</p>
<p>Then Press Start</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F05%2Fstart-godot.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19825 size-full" src="https://anonyviet.com/wp-content/uploads/2020/05/start-godot.jpg" alt="start godot editor" width="568" height="204" srcset="https://anonyviet.com/wp-content/uploads/2020/05/start-godot.jpg 568w, https://anonyviet.com/wp-content/uploads/2020/05/start-godot-300x108.jpg 300w" sizes="auto, (max-width: 568px) 100vw, 568px" title="Instructions for Programming Game With Godot Online On Website 16"/></a></p>
<p>Wait a moment for it to load on my device, it will appear in 30 seconds</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F05%2Fman-hinh-godot.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter wp-image-19826 size-full" src="https://anonyviet.com/wp-content/uploads/2020/05/man-hinh-godot.jpg" alt="godot engine online screen" width="784" height="410" srcset="https://anonyviet.com/wp-content/uploads/2020/05/man-hinh-godot.jpg 784w, https://anonyviet.com/wp-content/uploads/2020/05/man-hinh-godot-300x157.jpg 300w, https://anonyviet.com/wp-content/uploads/2020/05/man-hinh-godot-768x402.jpg 768w, https://anonyviet.com/wp-content/uploads/2020/05/man-hinh-godot-750x392.jpg 750w" sizes="auto, (max-width: 784px) 100vw, 784px" title="Instructions for Game Programming With Godot Online On Website 17"/></a></p>
<p>Then you create the Project as usual</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F05%2Ftao-project.jpg" rel="noopener" class="local-link"><img post-id="7965" fifu-featured="1" decoding="async" loading="lazy" class="aligncenter wp-image-19827 size-full" src="https://anonyviet.com/wp-content/uploads/2020/05/tao-project.jpg" alt="Guide to Programming Game With Godot Online On Website" title="Guide to Programming Game With Godot Online On Website" width="781" height="350" srcset="https://anonyviet.com/wp-content/uploads/2020/05/tao-project.jpg 781w, https://anonyviet.com/wp-content/uploads/2020/05/tao-project-300x134.jpg 300w, https://anonyviet.com/wp-content/uploads/2020/05/tao-project-768x344.jpg 768w, https://anonyviet.com/wp-content/uploads/2020/05/tao-project-750x336.jpg 750w" sizes="auto, (max-width: 781px) 100vw, 781px" title="Instructions for Programming Game With Godot Online On Website 18"/></a></p>
<p>And it will appear to us</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F05%2Fman-hinh-dau-cong.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-19828" src="https://anonyviet.com/wp-content/uploads/2020/05/man-hinh-dau-cong.jpg" alt="Guide to Programming Game With Godot Online On Website 7" width="780" height="350" srcset="https://anonyviet.com/wp-content/uploads/2020/05/man-hinh-dau-cong.jpg 780w, https://anonyviet.com/wp-content/uploads/2020/05/man-hinh-dau-cong-300x135.jpg 300w, https://anonyviet.com/wp-content/uploads/2020/05/man-hinh-dau-cong-768x345.jpg 768w, https://anonyviet.com/wp-content/uploads/2020/05/man-hinh-dau-cong-750x337.jpg 750w" sizes="auto, (max-width: 780px) 100vw, 780px" title="Guide to Game Programming With Godot Online On Website 19"/></a></p>
<p>It&#8217;s the same as the windows tool, isn&#8217;t it?</p>
<p>You can already start creating games with Godot Online</p>
<p>If you want to exit, press the X next to Editor</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F05%2Feditor.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-19829" src="https://anonyviet.com/wp-content/uploads/2020/05/editor.jpg" alt="Instructions for Programming Game With Godot Online On Website 8" width="460" height="177" srcset="https://anonyviet.com/wp-content/uploads/2020/05/editor.jpg 460w, https://anonyviet.com/wp-content/uploads/2020/05/editor-300x115.jpg 300w" sizes="auto, (max-width: 460px) 100vw, 460px" title="Instructions for Game Programming With Godot Online On Website 20"/></a>It will take you back to the first page</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F05%2Floader.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-19830" src="https://anonyviet.com/wp-content/uploads/2020/05/loader.jpg" alt="Guide to Game Programming With Godot Online On Website 9" width="670" height="241" srcset="https://anonyviet.com/wp-content/uploads/2020/05/loader.jpg 670w, https://anonyviet.com/wp-content/uploads/2020/05/loader-300x108.jpg 300w" sizes="auto, (max-width: 670px) 100vw, 670px" title="Guide to Game Programming With Godot Online On Website 21"/></a></p>
<p>Then you click Start Godot again</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F05%2Fscan.jpg" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-19831" src="https://anonyviet.com/wp-content/uploads/2020/05/scan.jpg" alt="Instructions for Programming Game With Godot Online On Website 10" width="771" height="331" srcset="https://anonyviet.com/wp-content/uploads/2020/05/scan.jpg 771w, https://anonyviet.com/wp-content/uploads/2020/05/scan-300x129.jpg 300w, https://anonyviet.com/wp-content/uploads/2020/05/scan-768x330.jpg 768w, https://anonyviet.com/wp-content/uploads/2020/05/scan-750x322.jpg 750w" sizes="auto, (max-width: 771px) 100vw, 771px" title="Guide to Game Programming With Godot Online On Website 22"/></a></p>
<p>That&#8217;s it, if you choose IndexxDB, I think you won&#8217;t be able to get the project file.  I&#8217;m not very familiar with this, maybe I&#8217;m wrong, but with IndexDB you will make the game under 50mb, if you are quick, just dropbox and use it.  So here it is done and see you in the next post ^^!</p>
<div class="kk-star-ratings kksr-auto kksr-align-right kksr-valign-bottom" data-payload="{&quot;align&quot;:&quot;right&quot;,&quot;id&quot;:&quot;19822&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;100&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;\u0110\u00e1nh gi\u00e1 b\u00e0i vi\u1ebft post&quot;,&quot;legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: 5\/5 - (100 b\u00ecnh ch\u1ecdn)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;width&quot;:&quot;142.5&quot;,&quot;_legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: {score}\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}">
<p>            The article achieved: 5/5 &#8211; (100 votes)    </p>
</p></div>
<p><!-- AI CONTENT END 2 --></p></div>
]]></content:encoded>
					
					<wfw:commentRss>https://en.anonyviet.com/guide-to-programming-game-with-godot-online-on-website/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<media:content url="https://anonyviet.com/wp-content/uploads/2020/05/tao-project.jpg" medium="image"></media:content>
            	</item>
		<item>
		<title>Overview of the interface and how it works on Godot Engine</title>
		<link>https://en.anonyviet.com/overview-of-the-interface-and-how-it-works-on-godot-engine/</link>
					<comments>https://en.anonyviet.com/overview-of-the-interface-and-how-it-works-on-godot-engine/#respond</comments>
		
		<dc:creator><![CDATA[AnonyViet]]></dc:creator>
		<pubDate>Wed, 01 Feb 2023 09:42:21 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Engine]]></category>
		<category><![CDATA[Godot]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[overview]]></category>
		<category><![CDATA[Works]]></category>
		<guid isPermaLink="false">https://en.anonyviet.com/?p=7857</guid>

					<description><![CDATA[Hi! Hello friends! Today&#8217;s article I will introduce an overview of the interface and how it works Godot Engine. This is also one of the articles in the series The Ultimate Guide to Godot Engine. Follow along with the article! Join the channel Telegram of the AnonyViet 👉 Link 👈 CHAPTER I: GODOT ENGINE BASIC [&#8230;]]]></description>
										<content:encoded><![CDATA[<p></p>
<div id="ftwp-postcontent">
<p><strong>Hi!  Hello friends!  Today&#8217;s article I will introduce an overview of the interface and how it works <a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Ftag%2FGodot%2F" rel="noopener" class="local-link">Godot Engine</a>.  This is also one of the articles in the series The Ultimate Guide to Godot Engine.  Follow along with the article!</strong></p>
<div class="code-block code-block-16" style="margin: 8px 0; clear: both;">
<div align="center">
<table class=" aligncenter" style="background-color: #c0c0c0; border-collapse: collapse; width: 59.9985%;">
<tbody>
<tr>
<td style="width: 100%; text-align: center;"><span style="font-size: 12pt;"><strong>Join the channel <span style="color: #0000ff;">Telegram</span> of the <span style="color: #008080;">AnonyViet </span> 👉 <span style="text-decoration: underline;"><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Ft.me%2Fanonyvietchat" class="local-link" rel="noopener">Link</a></span>  👈</strong></span></td>
</tr>
</tbody>
</table>
</div>
</div>
<p style="text-align: center;"><strong>CHAPTER I: GODOT ENGINE BASIC</strong></p>
<h2 id="ftoc-giao-dien-cach-thuc-hoat-dong" class="ftwp-heading"><strong><span style="font-size: 14pt;">INTERFACE &#038; HOW IT WORKS</span></strong></h2>
<p><i><span style="font-weight: 400;">Overview of the interface and how it works on Godot Engine.</span></i></p>
<h3 id="ftoc-tong-quan-giao-dien" class="ftwp-heading">Interface overview</h3>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F06%2FPicture1-1.png" rel="noopener" class="local-link"><img post-id="7857" fifu-featured="1" decoding="async" class="aligncenter wp-image-20099 size-full" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture1-1.png" alt="Overview of the interface and how it works on Godot Engine" title="Overview of the interface and how it works on Godot Engine" width="677" height="369" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture1-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture1-1-300x164.png 300w" sizes="(max-width: 677px) 100vw, 677px" title="Overview of the interface and how it works on Godot Engine 10"/></a></p>
<h3 id="ftoc-cach-thuc-hoat-dong" class="ftwp-heading">How it works:</h3>
<p>Godot works on objects (Objects/Classes) and multiple objects composing contexts (Scenes).</p>
<p>So what is an object?  There are many concepts of an object, we can roughly understand it as a tangible or intangible existence.  Each different object has different properties and characteristics.</p>
<p>Example: A ball is an object with the characteristic ROUND and the ability to roll on a plane.  The roundness of the ball can be called properties, while the ability to roll is called the method.</p>
<p>Another example is the cat:</p>
<table>
<tbody>
<tr>
<td colspan="2" width="601"><strong>Cat (Class)</strong></td>
</tr>
<tr>
<td width="312"><strong>Properties</strong></td>
<td width="289"><strong>Method (method)</strong></td>
</tr>
<tr>
<td width="312">Name: Meow</p>
<p>Category: Tabby cats</p>
<p>Gender: Male</p>
</td>
<td width="289">Walk(3000 steps)</p>
<p>Run(5000 km)</p>
<p>Sleep(10,000 years)</p>
<p>Eat)</p>
<p>Scratch()</p>
</td>
</tr>
</tbody>
</table>
<p>Syntax for calling properties and methods:</p>
<p><code>&lt;class_name&gt; . &lt;properties name&gt;</code>  // call the property (variable).  Ex: Cat.Name, Cat.Gender</p>
<p><code>&lt;class_name&gt; . &lt;method name[parameters]&gt;</code>  // call the method (function).  Ex: Cat.Scratch(), Cat.Eat(rice), Cat.Go(3000 steps)</p>
<p><strong>Note:</strong> “Object can be called Class”</p>
<p>Context is also an object</p>
<p>A scene can contain many objects and other contexts.  Eg:</p>
<p><strong>Scene 1:</strong></p>
<p><strong>Scene 2:</strong></p>
<table>
<tbody>
<tr>
<td width="601"><strong>Vegetable bed</strong></td>
</tr>
<tr>
<td width="601"><strong>Cilantro</strong></p>
<p><strong>Laksa leaves</strong></p>
<p><strong>Weed</strong></p>
</td>
</tr>
</tbody>
</table>
<p><strong>Scene 3:</strong></p>
<table>
<tbody>
<tr>
<td width="601"><strong>Back garden</strong></td>
</tr>
<tr>
<td width="601"><strong>Fish Dress (Scene 1)</strong></p>
<p><strong>Vegetable bed (Scene 2)</strong></p>
<p><strong>Chicken</strong></p>
<p><strong>Duck</strong></p>
</td>
</tr>
</tbody>
</table>
<p>– Objects in Godot are called nodes (Node)</p>
<p>– White Node (Node) to indicate invisible objects</p>
<p>– Blue Node (Node2D) to indicate 2D . objects</p>
<p>– Red node (Spatial) to indicate 3D objects</p>
<p>– Green node (Control) to indicate the objects that make up the game interface (GUI)</p>
<p>– Purple node to indicate control objects</p>
<p>Tree Structure in Godot (Tree Graph)</p>
<p>– Nodes in Godot are linked together in the form of a graph tree (Scene Tree)</p>
<p>– Node has 3 basic properties: Name (name), Type and ID</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F06%2FPicture3-1-1.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-20108" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture3-1-1.png" alt="Overview of the interface and how it works on Godot Engine 7" width="353" height="396" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture3-1-1.png 353w, https://anonyviet.com/wp-content/uploads/2020/06/Picture3-1-1-267x300.png 267w" sizes="auto, (max-width: 353px) 100vw, 353px" title="Overview of the interface and how it works on Godot Engine 11"/></a></p>
<p>– Graph tree structure:</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F06%2FPicture2-1-1.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-20107" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture2-1-1.png" alt="Overview of the interface and how it works on Godot Engine 8" width="677" height="402" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture2-1-1.png 677w, https://anonyviet.com/wp-content/uploads/2020/06/Picture2-1-1-300x178.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" title="Overview of the interface and how it works on Godot Engine 12"/></a></p>
<h2 id="ftoc-tao-va-truy-cap-node" class="ftwp-heading"><strong><span style="font-size: 14pt;">CREATE AND ACCESS NODE</span></strong></h2>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F06%2FPicture4-1-1.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-20109" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture4-1-1.png" alt="Overview of the interface and how it works on Godot Engine 9" width="606" height="444" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture4-1-1.png 606w, https://anonyviet.com/wp-content/uploads/2020/06/Picture4-1-1-300x220.png 300w" sizes="auto, (max-width: 606px) 100vw, 606px" title="Overview of the interface and how it works on Godot Engine 13"/></a></p>
<p>By Clicking Create New Node.  You can create many Nodes with different Type and rename Node according to your purpose.</p>
<ul>
<li>Node access &#038; interaction through script</li>
</ul>
<p>– Sequential access:</p>
<p><a target="_blank" href="https://en.anonyviet.com/next-link?url=https%3A%2F%2Fanonyviet.com%2Fwp-content%2Fuploads%2F2020%2F06%2FPicture5-1-1.png" rel="noopener" class="local-link"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-20110" src="https://anonyviet.com/wp-content/uploads/2020/06/Picture5-1-1.png" alt="Overview of the interface and how it works on Godot Engine 10" width="362" height="410" srcset="https://anonyviet.com/wp-content/uploads/2020/06/Picture5-1-1.png 362w, https://anonyviet.com/wp-content/uploads/2020/06/Picture5-1-1-265x300.png 265w" sizes="auto, (max-width: 362px) 100vw, 362px" title="Overview of the interface and how it works on Godot Engine 14"/></a></p>
<p>– If a parent node has many children, the sequence of child nodes is numbered from 0 to n-1 .</p>
<p>– You can sequentially access other Nodes from child Nodes with 3 functions</p>
<p>+  <code>get_parent()</code> // call to the parent Node</p>
<p>+ <code>get_child(index)</code> // call down the child node</p>
<p>+ <code>get_children()[index]</code> // call down the sub-Node array</p>
<p>_ <code>get_tree().get_root()</code> // call up Node Root</p>
<p>+ Keyword <code>self</code> to call the Node itself</p>
<p>– For example from Node I want to access the parent Node and print out the father&#8217;s name, then call <code>get_parent().name</code></p>
<p>– For example from Node I want to access the Cousin Node and print my Cousin name, then call <code>get_parent().get_parent().get_child(1).get_child(0).name</code></p>
<ul>
<li>Access by path by keyword get_node(&#8220;Node path&#8221;) or $&#8221;Node path&#8221;</li>
</ul>
<p>&#8211; Eg <code>get_node("/root/OngNoi/Cha/Toi").name</code> // print the name of My Node or $”/root/OngNoi/Cha/Toi”.name</p>
<p>– <code>get_node(".") = self</code></p>
<p><em>Today&#8217;s article I introduced and shared with you the basic interface &#038; operation of Node on Godot Engine.  If you have any questions, feel free to leave comments and suggestions!  For more information, you can refer to the basic videos at https://www.youtube.com/playlist?list=PLOk8LhtEwUVn8e3RUfk-rX_RB3f9_ulYg.  Thank you for following this post!  🙂 </em></p>
<div class="kk-star-ratings kksr-auto kksr-align-right kksr-valign-bottom" data-payload="{&quot;align&quot;:&quot;right&quot;,&quot;id&quot;:&quot;20092&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;100&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;\u0110\u00e1nh gi\u00e1 b\u00e0i vi\u1ebft post&quot;,&quot;legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: 5\/5 - (100 b\u00ecnh ch\u1ecdn)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;width&quot;:&quot;142.5&quot;,&quot;_legend&quot;:&quot;B\u00e0i vi\u1ebft \u0111\u1ea1t: {score}\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}">
<p>            The article achieved: 5/5 &#8211; (100 votes)    </p>
</p></div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://en.anonyviet.com/overview-of-the-interface-and-how-it-works-on-godot-engine/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<media:content url="https://anonyviet.com/wp-content/uploads/2020/06/Picture1-1.png" medium="image"></media:content>
            	</item>
	</channel>
</rss>
