<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ unity - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ unity - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sat, 23 May 2026 16:27:20 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/unity/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Build Reusable Modular Unity Packages to Speed Up Development ]]>
                </title>
                <description>
                    <![CDATA[ How many times have you rewritten the same systems across different Unity projects? Or copied entire folders from an old project, only to spend hours fixing references, renaming namespaces, and adapti ]]>
                </description>
                <link>https://www.freecodecamp.org/news/build-reusable-modular-unity-packages-to-speed-up-development/</link>
                <guid isPermaLink="false">6998ee96a20b74e093d7e671</guid>
                
                    <category>
                        <![CDATA[ unity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ C# ]]>
                    </category>
                
                    <category>
                        <![CDATA[ modularity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Game Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Talha Cagatay ISIK ]]>
                </dc:creator>
                <pubDate>Fri, 20 Feb 2026 23:30:30 +0000</pubDate>
                <media:content url="https://cloudmate-test.s3.us-east-1.amazonaws.com/uploads/covers/5e1e335a7a1d3fcc59028c64/7a3eeaef-4bab-403c-b9ef-3ebc785efb2f.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>How many times have you rewritten the same systems across different Unity projects? Or copied entire folders from an old project, only to spend hours fixing references, renaming namespaces, and adapting the code to fit a slightly different architecture?</p>
<p>That repetition doesn’t just waste time – it slows down your development and creates maintenance headaches across projects.</p>
<p>This guide walks you through a set of reusable, modular Unity packages you can drop into any project to speed up development. You’ll build them once as packages and install them via Git wherever you need them, instead of reimplementing the same systems every time.</p>
<p>The article covers four core packages:</p>
<ol>
<li><p><strong>com.core.initializer</strong> – Finds and initializes your game controllers at runtime (MVC-style) so startup and dependencies centralized.</p>
</li>
<li><p><strong>com.core.data</strong> – Handles local (and optionally cloud) save data using MemoryPack binary serialization and a provider abstraction so you can switch or extend storage backends.</p>
</li>
<li><p><strong>com.core.ui</strong> – Manages popups and full-screen UIs in a consistent way so you can show dialogs, panels, and screens without duplicating logic.</p>
</li>
<li><p><strong>com.core.dotween</strong> – Wraps the DoTween tween engine as a Unity package so <strong>com.core.ui</strong> (and other packages) can reference it for animations.</p>
</li>
</ol>
<p>In this tutorial, we’ll build all four packages step by step. The Initializer, Data, UI, and DoTween packages are all documented so you can easily follow along. All packages are also upload to github which you can find the links at the end.</p>
<h2 id="heading-table-of-contents"><strong>Table of Contents</strong></h2>
<ul>
<li><p><a href="#heading-what-you-will-learn">What You Will Learn</a></p>
</li>
<li><p><a href="#heading-prerequisites">Prerequisites</a></p>
</li>
<li><p><a href="#heading-set-up-your-development-project">Set Up Your Development Project</a></p>
</li>
<li><p><a href="#heading-package-1-the-initializer">Package 1: The Initializer Package</a></p>
</li>
<li><p><a href="#heading-package-2-the-data-package">Package 2: The Data Package</a></p>
</li>
<li><p><a href="#heading-package-3-comcoredotween">Package 3: The DoTween Package</a></p>
</li>
<li><p><a href="#heading-package-4-the-ui-package">Package 4: The UI Package</a></p>
</li>
<li><p><a href="#heading-summary">Summary</a></p>
</li>
</ul>
<h2 id="heading-what-you-will-learn"><strong>What You Will Learn</strong></h2>
<ul>
<li><p>How to create a Unity package with the Package Manager</p>
</li>
<li><p>How to set up the package structure</p>
</li>
<li><p>How to built a centralized initialization flow for your packages</p>
</li>
<li><p>How to use UniTask for async initialization on Unity's main thread</p>
</li>
<li><p>How the Data package uses <code>IDataProvider</code> and <strong>MemoryPack</strong> for local save/load</p>
</li>
<li><p>How the UI package uses popups (stack) and screens (single active) with DoTween animations</p>
</li>
</ul>
<h2 id="heading-prerequisites"><strong>Prerequisites</strong></h2>
<p>Before you start, make sure you have:</p>
<ul>
<li><p>Unity installed (any Long Term Support version compatible with the packages. The referenced packages target Unity 6000.3)</p>
</li>
<li><p>Git installed</p>
</li>
<li><p>Jetbrains Rider or Visual Studio Community installed</p>
</li>
<li><p>Know how to use Unity game engine</p>
</li>
<li><p>Know C# and async/await structures</p>
</li>
</ul>
<p>You will use the Unity Package Manager to create packages, then upload and install them via Git in other projects.</p>
<h2 id="heading-set-up-your-development-project"><strong>Set Up Your Development Project</strong></h2>
<p>Create a new Unity project if you don’t already have one. We’ll use it as a playground to build and test your packages. This project (and not the packages themselves) is your development environment.</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770938731026/c2afbae6-69a7-4cd2-a2c3-2d43b0c68fe6.png" alt="Creating a new unity project via Unity Hub" width="600" height="400" loading="lazy">

<h2 id="heading-package-1-the-initializer"><strong>Package 1: The Initializer</strong></h2>
<p>The first package is <strong>com.core.initializer</strong>. It finds all your controllers, runs their async initialization before the first scene loads, and lets the rest of the game access them via a single handler.</p>
<h3 id="heading-what-comcoreinitializer-does">What com.core.initializer Does</h3>
<ul>
<li><p><strong>Early initialization</strong>: Runs at <code>RuntimeInitializeLoadType.BeforeSceneLoad</code>, so all controllers exist and are initialized before the first scene loads.</p>
</li>
<li><p><strong>Central access</strong>: Stores each controller by its type and exposes them through a type-safe getter.</p>
</li>
<li><p><strong>Completion signaling</strong>: Exposes a static event (<code>ControllersInitialized</code>) and a <code>UniTaskCompletionSource</code> (<code>InitializationCompleted</code>) so you can run code only after all controllers have finished initializing.</p>
</li>
</ul>
<h3 id="heading-create-the-initializer-package">Create the Initializer Package</h3>
<p>To start, open Window → Package Manager (under Package Management). Then click the + button and choose Create package.</p>
<p>Name the package <code>com.core.initializer</code> (or your preferred name).</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770939190680/3d9d3c0e-94f7-40bf-b5b7-d3d05ff90301.png" alt="Opening Unity Package Manager" width="600" height="400" loading="lazy">

<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771030017622/bc551fb9-69d5-4fa6-8309-293fd34d6cc5.png" alt="Creating a new package" width="600" height="400" loading="lazy">

<p>Unity creates the essential package files for you.</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770939568125/86637464-89c7-4dc6-861b-cb071cc2d942.png" alt="Example package folders and files" width="600" height="400" loading="lazy">

<p>You can edit <code>package.json</code> and the assembly definition (asmdef) names to match your naming. The full set of changes is not listed here. The final package is available on GitHub (linked at the end).</p>
<h3 id="heading-add-the-unitask-dependency">Add the UniTask Dependency</h3>
<p>Unity runs on the main thread, and C# Tasks can be problematic in that context. They don’t know about the Unity Editor's play state and keep running after exiting play mode for example. So you’ll need to handle these cases manually. For these reasons, this package uses <a href="https://github.com/Cysharp/UniTask">UniTask</a> instead of C# Tasks for async operations.</p>
<p>Git-based dependencies are supported at the project level but not at the package level. Add UniTask via OpenUPM by following the <a href="https://openupm.com/packages/com.cysharp.unitask/#modal-manualinstallation">manual installation steps</a>.</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770988159264/9d2db898-9e1f-4514-aeda-53fb4a190045.png" alt="Adding OpenUPM and UniTask to scoped registries" width="600" height="400" loading="lazy">

<p>Add UniTask as a dependency in package.json of initializer package:</p>
<img src="https://cloudmate-test.s3.us-east-1.amazonaws.com/uploads/covers/698d2f3c217bebae73c3f5e8/035b9242-f111-4c96-8483-4b02452a13bc.png" alt="package.json file of initializer package" width="600" height="400" loading="lazy">

<pre><code class="language-json">"dependencies": {
  "com.cysharp.unitask": "2.5.10"
}
</code></pre>
<p>Also reference UniTask in the asmdef file.</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771255181446/9812cea2-d278-4920-88e5-43e89cd41a91.png" alt="Referencing UniTask within Initializer package's asmdef file" width="600" height="400" loading="lazy">

<p>You’ll need to follow this dependency flow for the rest of the packages you create.</p>
<h3 id="heading-implement-the-package-structure">Implement the Package Structure</h3>
<p>The initializer uses an MVC-like architecture. Controllers handle both initialization and game logic. You could later split initialization into services and keep business logic in controllers (for example, an MVCS-style setup). This tutorial keeps things simple and uses only controllers.</p>
<p>Target layout:</p>
<ul>
<li><p><strong>Runtime/Interface/</strong> – <code>IController</code></p>
</li>
<li><p><strong>Runtime/Helper/</strong> – <code>Creator</code> (reflection-based instance creation)</p>
</li>
<li><p><strong>Runtime/</strong> – <code>ControllerHandler</code> (orchestrates initialization)</p>
</li>
</ul>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771255216106/90741270-2166-4694-874f-fcc7aec539fe.png" alt="Initializer package final folders and files" width="600" height="400" loading="lazy">

<p>All controllers implement the <code>IController</code> interface. The <code>Initialize</code> method returns a <code>UniTask</code> so initialization can be async on the main thread.</p>
<pre><code class="language-csharp">using Cysharp.Threading.Tasks;

namespace com.core.initializer
{
    public interface IController
    {
        bool IsInitialized { get; }

        UniTask Initialize();
    }
}
</code></pre>
<h3 id="heading-create-the-creator-helper">Create the Creator Helper</h3>
<p>You’ll need to find all types that implement <code>IController</code>, create instances of them at runtime, and also find MonoBehaviours that implement <code>IController</code> (since those cannot be created via reflection). The <code>Creator</code> class does both.</p>
<pre><code class="language-csharp">using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;

namespace com.core.initializer
{
    public static class Creator
    {
        /// &lt;summary&gt;
        /// Creates instances of every type which inherits from T interface.
        /// &lt;/summary&gt;
        public static IEnumerable&lt;T&gt; CreateInstancesOfType&lt;T&gt;(params Type[] exceptTypes)
        {
            var interfaceType = typeof(T);

            var result = AppDomain.CurrentDomain.GetAssemblies().SelectMany(x =&gt; x.GetTypes()).Where
                (
                 x =&gt; interfaceType.IsAssignableFrom(x) &amp;&amp;
                      !x.IsInterface                    &amp;&amp;
                      !x.IsAbstract                     &amp;&amp;
                      exceptTypes.All(type =&gt; !x.IsSubclassOf(type) &amp;&amp; x != type)
                ).Select(Activator.CreateInstance);

            return result.Cast&lt;T&gt;();
        }

        public static IEnumerable&lt;T&gt; GetMonoControllers&lt;T&gt;() =&gt; UnityEngine.Object.FindObjectsByType&lt;MonoBehaviour&gt;(FindObjectsInactive.Include, FindObjectsSortMode.None).OfType&lt;T&gt;();
    }
}
</code></pre>
<p>Using reflection at runtime has some overhead. You can optimize this later with baking the reflection in editor and using it at runtime. For MonoBehaviours, <code>FindObjectsByType</code> is used here for simplicity. In a larger project, you might use a dependency injection solution such as <a href="https://github.com/hadashiA/VContainer">VContainer</a> or <a href="https://github.com/gustavopsantos/Reflex">Reflex</a>.</p>
<h3 id="heading-implement-the-controllerhandler">Implement the ControllerHandler</h3>
<p>The <code>ControllerHandler</code> uses <code>Creator</code> to gather all <code>IController</code> instances (both reflection-created and MonoBehaviours), initializes them in order, and exposes an event and a <strong>UniTaskCompletionSource</strong> so the rest of the game can wait for startup to finish.</p>
<pre><code class="language-csharp">using System;
using System.Collections.Generic;
using System.Linq;
using Cysharp.Threading.Tasks;
using UnityEngine;

namespace com.core.initializer
{
    public class ControllerHandler
    {
        public static readonly UniTaskCompletionSource InitializationCompleted = new();

        public static event Action ControllersInitialized;

        private static Dictionary&lt;Type, IController&gt; _controllers = new();

        [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
        public static async void Initialize()
        {
            var controllers = Creator.CreateInstancesOfType&lt;IController&gt;(typeof(MonoBehaviour)).ToList();
            controllers.AddRange(Creator.GetMonoControllers&lt;IController&gt;());

            Debug.Log("Initializing controller");

            foreach (var controller in controllers)
            {
                Debug.Log($"&lt;color=yellow&gt;Initializing {controller.GetType().Name}&lt;/color&gt;");
                await controller.Initialize();
                _controllers.Add(controller.GetType(), controller);
                Debug.Log($"&lt;color=green&gt;Initialized {controller.GetType().Name}&lt;/color&gt;");
            }

            Debug.Log("&lt;color=green&gt;All controllers are initialized&lt;/color&gt;");
            ControllersInitialized?.Invoke();
            InitializationCompleted?.TrySetResult();
        }

        public static T GetController&lt;T&gt;() where T : class, IController =&gt; _controllers[typeof(T)] as T;
    }
}
</code></pre>
<h3 id="heading-how-to-test-the-initializer">How to Test the Initializer</h3>
<ol>
<li><p>Create a class that implements <code>IController</code> (or a MonoBehaviour that implements it).</p>
</li>
<li><p>Implement <code>Initialize()</code> with your setup logic (you can use <code>await</code> and UniTask).</p>
</li>
<li><p>After initialization, access the controller with:<br><code>var myController = ControllerHandler.GetController&lt;MyController&gt;();</code></p>
</li>
</ol>
<p>You can also subscribe to <code>ControllerHandler.ControllersInitialized</code> or await <code>ControllerHandler.InitializationCompleted.Task</code> to run code after all controllers are ready.</p>
<p>There are some limitations here. First, it can be hard to handle dependencies between different controllers. Second, it’s easy to run into circular dependencies.</p>
<p>When you check the <a href="https://github.com/TalhaCagatay/com.core.initializer">GitHub repo</a>, a DI framework may already be implemented to address these limitations. Make sure to open an issue if you want this feature.</p>
<h2 id="heading-package-2-the-data-package">Package 2: The Data Package</h2>
<p>com.core.data handles local saving with a binary serializer. The package uses <a href="https://github.com/Cysharp/MemoryPack">MemoryPack</a> for fast, binary serialization and defines an <code>IDataProvider</code> interface so you can plug in different providers (local, cloud, or hybrid).</p>
<p><strong>Package dependency:</strong> <code>com.cysharp.memorypack</code> (version 1.10.0). Add it to your project via OpenUPM and add it to package.json and the asmdef for com.core.data.</p>
<p>Create a new package and name it com.core.data. Use a structure such as:</p>
<ul>
<li><p><strong>Runtime/Interface/</strong> – <code>IDataProvider</code></p>
</li>
<li><p><strong>Runtime/Providers/</strong> – <code>LocalDataProvider</code></p>
</li>
<li><p><strong>Runtime/</strong> – optional sample <code>DataController</code> (in your game assembly) that implements <code>IController</code> and uses an <code>IDataProvider</code></p>
</li>
</ul>
<img src="https://cloudmate-test.s3.us-east-1.amazonaws.com/uploads/covers/698d2f3c217bebae73c3f5e8/b6192b39-04d1-4c5a-90e6-b0ed9f1a4ce4.png" alt="Adding MemoryPack to scoped registries" style="display:block;margin:0 auto" width="600" height="400" loading="lazy">

<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771266043719/9cd79a74-4a72-4882-b803-8c53ca95eaa0.png" alt="Data package final folders and files" width="600" height="400" loading="lazy">

<p>All data providers use the IDataProvider interface.</p>
<pre><code class="language-csharp">using Cysharp.Threading.Tasks;

namespace com.core.data
{
    public interface IDataProvider
    {
        bool     IsInitialized { get; }
        void     Save&lt;T&gt;(string key, T data);
        T        Load&lt;T&gt;(string key, T defaultValue = default);
        bool     HasKey(string  key);
        string[] GetKeys();
        UniTask  Delete(string key);
        UniTask  DeleteAll();
    }
}
</code></pre>
<p>You will use UniTask in the data package as well. Add com.cysharp.unitask to package.json since both IController and IDataProvider uses it.</p>
<p>Here’s the DataController:</p>
<pre><code class="language-csharp">using System;
using System.Collections.Generic;
using System.Text;
using com.core.data;
using com.core.initializer;
using Cysharp.Threading.Tasks;
using UnityEngine;

namespace com.core.data
{
    public class DataController : IController
    {
        private const string PLAYER_VERSION_KEY = "player-version-key";

        private IDataProvider _provider;

        public bool IsInitialized { get; private set; }

        public UniTask Initialize()
        {
            _provider = new LocalDataProvider();
            SaveUserVersion();
            IsInitialized = true;
            return UniTask.CompletedTask;
        }

        private void SaveUserVersion()
        {
            var versionHistory = Load(PLAYER_VERSION_KEY, new List&lt;string&gt;());
            var sb             = new StringBuilder();
            versionHistory.ForEach(vh =&gt; sb.Append(vh + Environment.NewLine));
            Debug.Log($"[DataController] Player version history: {sb}");

            if (!versionHistory.Contains(Application.version))
            {
                Debug.Log($"[DataController] Player's current version: {Application.version}");
                versionHistory.Add(Application.version);
                Save(PLAYER_VERSION_KEY, versionHistory);
            }
        }

        public void Save&lt;T&gt;(string key, T data) =&gt; _provider.Save(key, data);

        public T Load&lt;T&gt;(string key, T defaultValue = default) =&gt; _provider.Load(key, defaultValue);

        public bool         HasKey(string key)  =&gt; _provider.HasKey(key);
        public string[]     GetKeys()           =&gt; _provider.GetKeys();
        public UniTask      Delete(string key)  =&gt; _provider.Delete(key);
        public UniTask      DeleteAll()         =&gt; _provider.DeleteAll();
        public List&lt;string&gt; GetVersionHistory() =&gt; Load(PLAYER_VERSION_KEY, new List&lt;string&gt;());
    }
}
</code></pre>
<p>The controller delegates all logic to LocalDataProvider, which uses MemoryPack to serialize and write bytes to a "Data" folder under <code>Application.persistentDataPath</code>. The controller also keeps the user's app version history, which is useful for upgrade prompts or blocking old versions.</p>
<p>Here’s the full implementation:</p>
<pre><code class="language-csharp">using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Cysharp.Threading.Tasks;
using MemoryPack;
using UnityEngine;

namespace com.core.data
{
    public class LocalDataProvider : IDataProvider
    {
        private const    string StorageFolderName = "Data";
        private readonly string _storagePath;

        private static readonly UTF8Encoding KeyEncoding = new(false);

        public bool IsInitialized =&gt; true;

        public LocalDataProvider()
        {
            _storagePath = Path.Combine(Application.persistentDataPath, StorageFolderName);
            EnsureStorageDirectoryExists();
        }

        public void Save&lt;T&gt;(string key, T data)
        {
            if (string.IsNullOrEmpty(key)) { Debug.LogWarning("[LocalDataProvider] Save called with null or empty key."); return; }
            if (data == null) { Debug.LogWarning("[LocalDataProvider] Save called with null data."); Delete(key).Forget(); return; }
            try
            {
                byte[] bin = MemoryPackSerializer.Serialize(data);
                WriteBytes(key, bin);
            }
            catch (Exception ex) { Debug.LogError($"[LocalDataProvider] Save failed for key '{key}': {ex.Message}"); throw; }
        }

        public T Load&lt;T&gt;(string key, T defaultValue = default)
        {
            if (string.IsNullOrEmpty(key)) { Debug.LogWarning("[LocalDataProvider] Load called with null or empty key."); return defaultValue; }
            if (!ReadBytes(key, out byte[] bin)) return defaultValue;
            try { return MemoryPackSerializer.Deserialize&lt;T&gt;(bin) ?? defaultValue; }
            catch (Exception ex) { Debug.LogError($"[LocalDataProvider] Load failed for key '{key}': {ex.Message}"); return defaultValue; }
        }

        public bool HasKey(string key) =&gt; !string.IsNullOrEmpty(key) &amp;&amp; File.Exists(GetFilePath(key));

        public UniTask Delete(string key)
        {
            if (string.IsNullOrEmpty(key)) return UniTask.CompletedTask;
            try { var filePath = GetFilePath(key); if (File.Exists(filePath)) File.Delete(filePath); }
            catch (Exception ex) { Debug.LogError($"[LocalDataProvider] Delete failed for key '{key}': {ex.Message}"); }
            return UniTask.CompletedTask;
        }

        public UniTask DeleteAll()
        {
            try
            {
                if (!Directory.Exists(_storagePath)) return UniTask.CompletedTask;
                foreach (string file in Directory.GetFiles(_storagePath))
                {
                    try { File.Delete(file); }
                    catch (Exception ex) { Debug.LogWarning($"[LocalDataProvider] Could not delete file '{file}': {ex.Message}"); }
                }
            }
            catch (Exception ex) { Debug.LogError($"[LocalDataProvider] DeleteAll failed: {ex.Message}"); }
            return UniTask.CompletedTask;
        }

        public string[] GetKeys()
        {
            if (!Directory.Exists(_storagePath)) return Array.Empty&lt;string&gt;();
            var keys = new List&lt;string&gt;();
            foreach (string file in Directory.GetFiles(_storagePath))
            {
                try { string key = DecodeKeyFromFileName(Path.GetFileName(file)); if (key != null) keys.Add(key); }
                catch { Debug.LogWarning($"[LocalDataProvider] Could not read file '{file}'."); }
            }
            return keys.ToArray();
        }

        private void EnsureStorageDirectoryExists() { if (!Directory.Exists(_storagePath)) Directory.CreateDirectory(_storagePath); }
        private void WriteBytes(string key, byte[] bin) { EnsureStorageDirectoryExists(); File.WriteAllBytes(GetFilePath(key), bin); }
        private bool ReadBytes(string key, out byte[] bin) { string filePath = GetFilePath(key); if (!File.Exists(filePath)) { bin = null; return false; } bin = File.ReadAllBytes(filePath); return true; }
        private string GetFilePath(string key) =&gt; Path.Combine(_storagePath, EncodeKeyToFileName(key));
        private static string EncodeKeyToFileName(string key) { byte[] bytes = KeyEncoding.GetBytes(key); string base64 = Convert.ToBase64String(bytes); return base64.Replace('+', '-').Replace('/', '_'); }
        private static string DecodeKeyFromFileName(string fileName) { try { string base64 = fileName.Replace('-', '+').Replace('_', '/'); return KeyEncoding.GetString(Convert.FromBase64String(base64)); } catch { return null; } }
    }
}
</code></pre>
<p>You can implement another IDataProvider (for example JSON via <a href="https://openupm.com/packages/com.newtonsoft.json/">Newtonsoft</a> or <a href="https://docs.unity3d.com/6000.3/Documentation/PlayerPrefs.html">PlayerPrefs</a>) and swap it in your DataController.</p>
<p>In production, you might use a local and a cloud provider and sync data based on the player's online status. The com.core.data <a href="https://github.com/TalhaCagatay/com.core.data">GitHub repo</a> may be updated with cloud saving and syncing. You can open an issue if you need that feature.</p>
<h2 id="heading-package-3-comcoredotween"><strong>Package 3: com.core.dotween</strong></h2>
<p>com.core.dotween is a Unity package wrapper around <a href="https://dotween.demigiant.com/">DOTween</a> (Demigiant). DoTween is a widely used, production-ready tween engine. The UI package uses it for popup show/hide animations.</p>
<p>DOTween is not available on OpenUPM, so you’ll typically need to download it from the <a href="https://assetstore.unity.com/packages/tools/animation/dotween-hotween-v2-27676">Unity Asset Store</a> and import it into your project (for example, under Assets/Plugins).</p>
<p>Then you’ll run the DOTween setup window(it should pop automatically after importing) and click Create ASMDEF so assembly definition files are generated and you can reference them from other packages.</p>
<img src="https://cloudmate-test.s3.us-east-1.amazonaws.com/uploads/covers/698d2f3c217bebae73c3f5e8/1d2a1ea1-1cc4-4bc0-95b8-5e23d22d3f17.png" alt="1d2a1ea1-1cc4-4bc0-95b8-5e23d22d3f17" width="600" height="400" loading="lazy">

<p>Next, create a new package (for example, com.core.dotween) and move the Demigiant folder from Assets/Plugins into the package folder so that com.core.ui (or any other package) can depend on com.core.dotween via Package Manager or Git.</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771252964839/36d9e2f0-31a1-445f-b536-8560d0987131.png" alt="Dotween package folders and files" width="600" height="400" loading="lazy">

<p>After that, reference com.core.dotween in com.core.ui's asmdef(You will create the UI package right after this) so you can use <code>DG.Tweening</code> namespace in BasePopup and other UI scripts.</p>
<p>com.core.dotween has no external dependencies – it only wraps the DOTween asset.</p>
<h2 id="heading-package-4-the-ui-package">Package 4: The UI Package</h2>
<p>com.core.ui centralizes how you show popups and full-screen UIs. It contains:</p>
<ul>
<li><p><strong>Popups</strong> – Modal or non-modal dialogs (confirm/cancel, alerts, forms) with a consistent API so you don’t duplicate panel logic in every screen. Popups are stacked – the top one is closed first.</p>
</li>
<li><p><strong>Screens</strong> – Full-screen panels (for example, loading, main menu). Only one screen is active at a time, and switching a screen hides the current one and shows the new one.</p>
</li>
</ul>
<p>Create a new package named com.core.ui with a structure such as:</p>
<ul>
<li><p><strong>Runtime/Interface/</strong> – <code>IUI</code></p>
</li>
<li><p><strong>Runtime/UIs/</strong> – <code>BasePopup</code>, <code>BaseScreen</code></p>
</li>
<li><p><strong>Runtime/</strong> – <code>UIController</code>, <code>UIParent</code></p>
</li>
<li><p><strong>Runtime/Resources/UIPrefabs/</strong> – <code>UIParent</code> prefab, and subfolders Popups and Screens</p>
</li>
</ul>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771254115546/a71fd415-901c-472c-b46b-f919b5e6ec82.png" alt="UI package folders and files" width="600" height="400" loading="lazy">

<p>Add com.core.dotween, com.core.initializer, and com.cysharp.unitask as dependencies in package.json and asmdef.</p>
<p>Popups work like a stack: each popup is shown on top of the previous one and closed from top to bottom. Screens are single-active: only one screen is visible at a time. UIController hides the current one when you show another. UIController is the single point of contact for both screens and popups and handles stacking, caching, and background placement.</p>
<h3 id="heading-iui-interface">IUI Interface</h3>
<p>Both BasePopup and BaseScreen implement IUI:</p>
<pre><code class="language-csharp">using System;
using Cysharp.Threading.Tasks;

namespace com.core.ui
{
    public interface IUI
    {
        event Action&lt;IUI&gt; Showed;
        event Action&lt;IUI&gt; Hidden;

        UniTask ShowAsync();
        UniTask HideAsync();
    }
}
</code></pre>
<p>IUI is a very basic interface with 2 async Show/Hide methods and 2 events to be fired upon completion of those methods.</p>
<h3 id="heading-basepopup">BasePopup</h3>
<p>BasePopup uses DoTween to animate scale on show/hide and exposes events and overridable animation methods:</p>
<pre><code class="language-csharp">using System;
using Cysharp.Threading.Tasks;
using DG.Tweening;
using UnityEngine;

namespace com.core.ui
{
    public abstract class BasePopup : MonoBehaviour, IUI
    {
        public event Action&lt;IUI&gt; StartedShowing;
        public event Action&lt;IUI&gt; Showed;
        public event Action&lt;IUI&gt; Hidden;

        [SerializeField] private float   openingTime  = 0.35f;
        [SerializeField] private float   closingTime  = 0.25f;
        [SerializeField] private Vector3 initialScale = new(0.75f, 0.75f, 0.75f);
        [SerializeField] private Ease   openingEase  = Ease.OutBack;
        [SerializeField] private Ease   closingEase  = Ease.InBack;

        protected virtual Tweener PlayShowAnimation(Action completedCallback) =&gt; transform.DOScale(Vector3.one, openingTime).SetEase(openingEase).SetUpdate(true).OnComplete(() =&gt; completedCallback?.Invoke());
        protected virtual Tweener PlayHideAnimation(Action completedCallback) =&gt; transform.DOScale(initialScale, closingTime).SetEase(closingEase).SetUpdate(true).OnComplete(() =&gt; completedCallback?.Invoke());

        public UniTask ShowAsync()
        {
            StartedShowing?.Invoke(this);
            transform.SetAsLastSibling();
            var utcs = new UniTaskCompletionSource();
            transform.localScale = initialScale;
            gameObject.SetActive(true);

            PlayShowAnimation(() =&gt; OnAnimationShowed(utcs));
            return utcs.Task;
        }

        public void Show() =&gt; ShowAsync().Forget();

        public UniTask HideAsync()
        {
            var utcs = new UniTaskCompletionSource();
            PlayHideAnimation(() =&gt; OnAnimationCompleted(utcs));
            return utcs.Task;
        }

        private void OnAnimationShowed(UniTaskCompletionSource utcs)
        {
            Showed?.Invoke(this);
            utcs.TrySetResult();
        }

        private void OnAnimationCompleted(UniTaskCompletionSource utcs)
        {
            transform.SetAsFirstSibling();
            gameObject.SetActive(false);
            Hidden?.Invoke(this);
            utcs.TrySetResult();
        }

        public void Hide() =&gt; HideAsync().Forget();
    }
}
</code></pre>
<p>You can see that DoTween is the core component in this class and a lot of parameters are configurable like opening/closing times and easings. Notice how DoTween completion callbacks are utilized to fire Showed and Hidden events.</p>
<p>Another important thing here is the usage of SetUpdate(true) for animations. This makes animations to ignore timescale. I found that most of the time it's best to ignore the timescale for animations but if you don't want this then feel free to change it.</p>
<h3 id="heading-basescreen"><strong>BaseScreen</strong></h3>
<p>BaseScreen only enables/disables the GameObject and raises events. There’s no animation:</p>
<pre><code class="language-csharp">using System;
using Cysharp.Threading.Tasks;
using UnityEngine;

namespace com.core.ui
{
    public abstract class BaseScreen : MonoBehaviour, IUI
    {
        public event Action&lt;IUI&gt; Showed;
        public event Action&lt;IUI&gt; Hidden;

        public virtual UniTask ShowAsync()
        {
            gameObject.SetActive(true);
            Showed?.Invoke(this);
            return UniTask.CompletedTask;
        }

        public UniTask HideAsync()
        {
            gameObject.SetActive(false);
            Hidden?.Invoke(this);
            return UniTask.CompletedTask;
        }
    }
}
</code></pre>
<p>You will notice that BaseScreen doesn't need UniTask since it is not performing any async operations but it is still beneficial to have this since it doesn't cause any overheads and if we ever need an animation for any of our screens like popups, we have it ready.</p>
<h3 id="heading-uicontroller"><strong>UIController</strong></h3>
<p>UIController implements <code>IController</code>, instantiates UIParent from Resources, and provides APIs to push/pop popups and show/hide screens. It caches popup and screen instances by type and loads prefabs from Resources:</p>
<ul>
<li><p><strong>UIParent</strong>: <code>Resources/UIPrefabs/UIParent</code></p>
</li>
<li><p><strong>Popups</strong>: <code>Resources/UIPrefabs/Popups/&lt;TypeName&gt;.prefab</code></p>
</li>
<li><p><strong>Screens</strong>: <code>Resources/UIPrefabs/Screens/&lt;TypeName&gt;.prefab</code></p>
</li>
</ul>
<pre><code class="language-csharp">using System;
using System.Collections.Generic;
using com.core.initializer;
using Cysharp.Threading.Tasks;
using UnityEngine;
using Object = UnityEngine.Object;

namespace com.core.ui
{
    public class UIController : IController
    {
        private const string UI_PARENT_PATH    = "UIPrefabs/UIParent";
        private const string POPUPS_RESOURCES  = "UIPrefabs/Popups";
        private const string SCREENS_RESOURCES = "UIPrefabs/Screens";

        private readonly Stack&lt;BasePopup&gt;             _popupStack  = new();
        private readonly Dictionary&lt;Type, BasePopup&gt;  _popupCache  = new();
        private readonly Dictionary&lt;Type, BaseScreen&gt; _ScreenCache = new();

        private BaseScreen _currentScreen;
        private UIParent   _uiParent;

        public bool IsInitialized { get; private set; }

        public UniTask Initialize()
        {
            var uiParentPrefab = Resources.Load&lt;UIParent&gt;(UI_PARENT_PATH);
            if (uiParentPrefab == null)
            {
                Debug.LogError($"[UIController] UIParent prefab not found at {UI_PARENT_PATH}. Ensure it exists in a Resources folder.");
                return UniTask.CompletedTask;
            }

            _uiParent      = Object.Instantiate(uiParentPrefab);
            _uiParent.name = "UIParent";

            Object.DontDestroyOnLoad(_uiParent.gameObject);

            IsInitialized = true;
            return UniTask.CompletedTask;
        }

        public async UniTask&lt;TPopup&gt; PushPopupAsync&lt;TPopup&gt;() where TPopup : BasePopup
        {
            var popup = GetOrCreatePopup&lt;TPopup&gt;();
            _popupStack.Push(popup);
            var popupTask = popup.ShowAsync();
            UpdateBackgroundForTopPopup();
            await popupTask;
            return popup;
        }

        public void PushPopup&lt;TPopup&gt;() where TPopup : BasePopup =&gt; PushPopupAsync&lt;TPopup&gt;().Forget();

        public async UniTask PopPopupAsync()
        {
            if (_popupStack.Count == 0)
            {
                Debug.LogWarning("[UIController] PopPopup called but popup stack is empty.");
                return;
            }

            var top = _popupStack.Pop();
            await top.HideAsync();
            UpdateBackgroundForTopPopup();
        }

        public void PopPopup() =&gt; PopPopupAsync().Forget();

        public BasePopup PeekPopup() =&gt; _popupStack.Count &gt; 0 ? _popupStack.Peek() : null;

        public async UniTask&lt;TScreen&gt; ShowScreenAsync&lt;TScreen&gt;() where TScreen : BaseScreen
        {
            var screen = GetOrCreateScreen&lt;TScreen&gt;();

            if (_currentScreen == screen &amp;&amp; screen.gameObject.activeSelf) return screen;
            if (_currentScreen != null   &amp;&amp; _currentScreen != screen &amp;&amp; _currentScreen.gameObject.activeSelf) await _currentScreen.HideAsync();

            _currentScreen = screen;
            await screen.ShowAsync();
            return screen;
        }

        public async UniTask HideScreenAsync&lt;TScreen&gt;() where TScreen : BaseScreen
        {
            var type = typeof(TScreen);
            if (!_ScreenCache.TryGetValue(type, out var screen))
            {
                Debug.LogWarning($"[UIController] HideScreenAsync&lt;{type.Name}&gt; called but Screen was never shown (not in cache).");
                return;
            }

            await screen.HideAsync();

            if (_currentScreen == screen) _currentScreen = null;
        }

        public void ShowScreen&lt;TScreen&gt;() where TScreen : BaseScreen =&gt; ShowScreenAsync&lt;TScreen&gt;().Forget();
        public void HideScreen&lt;TScreen&gt;() where TScreen : BaseScreen =&gt; HideScreenAsync&lt;TScreen&gt;().Forget();

        private TPopup GetOrCreatePopup&lt;TPopup&gt;() where TPopup : BasePopup
        {
            var type = typeof(TPopup);
            if (_popupCache.TryGetValue(type, out var cached) &amp;&amp; cached != null) return (TPopup)cached;

            var prefab = LoadPopupPrefab&lt;TPopup&gt;();
            if (prefab == null)
            {
                Debug.LogError($"[UIController] Popup prefab for {type.Name} not found at {POPUPS_RESOURCES}/{type.Name}. Ensure the prefab exists in a Resources folder.");
                return null;
            }

            var instance = UnityEngine.Object.Instantiate(prefab, _uiParent.PopupParent);
            instance.gameObject.SetActive(false);

            var popup = instance.GetComponent&lt;TPopup&gt;();
            _popupCache[type] = popup;

            return popup;
        }

        private TScreen GetOrCreateScreen&lt;TScreen&gt;() where TScreen : BaseScreen
        {
            var type = typeof(TScreen);
            if (_ScreenCache.TryGetValue(type, out var cached) &amp;&amp; cached != null) return (TScreen)cached;

            var prefab = LoadScreenPrefab&lt;TScreen&gt;();
            if (prefab == null)
            {
                Debug.LogError($"[UIController] Screen prefab for {type.Name} not found at {SCREENS_RESOURCES}/{type.Name}. Ensure the prefab exists in a Resources folder.");
                return null;
            }

            var instance = UnityEngine.Object.Instantiate(prefab, _uiParent.ScreenParent);
            instance.gameObject.SetActive(false);

            var screen = instance.GetComponent&lt;TScreen&gt;();
            _ScreenCache[type] = screen;

            return screen;
        }

        private TPopup  LoadPopupPrefab&lt;TPopup&gt;() where TPopup : BasePopup     =&gt; LoadViewPrefab&lt;TPopup&gt;(POPUPS_RESOURCES);
        private TScreen LoadScreenPrefab&lt;TScreen&gt;() where TScreen : BaseScreen =&gt; LoadViewPrefab&lt;TScreen&gt;(SCREENS_RESOURCES);

        private static T LoadViewPrefab&lt;T&gt;(string resourcesPath) where T : MonoBehaviour
        {
            var type = typeof(T);
            var path = $"{resourcesPath}/{type.Name}";
            var go   = Resources.Load&lt;GameObject&gt;(path);
            return go != null ? go.GetComponent&lt;T&gt;() : null;
        }

        private void UpdateBackgroundForTopPopup()
        {
            var backgroundGO = _uiParent.BackgroundGO;
            if (backgroundGO == null) return;

            if (_popupStack.Count &gt; 0)
            {
                var topPopup = _popupStack.Peek();
                if (topPopup != null &amp;&amp; topPopup.gameObject.activeSelf)
                {
                    // Position background one step behind the top popup
                    var topPopupIndex = topPopup.transform.GetSiblingIndex();
                    backgroundGO.SetActive(true);
                    backgroundGO.transform.SetSiblingIndex(Mathf.Max(0, topPopupIndex - 1));
                }
                else
                {
                    // Top popup is inactive, hide background
                    backgroundGO.SetActive(false);
                }
            }
            else
            {
                // No popups in stack, hide background
                backgroundGO.SetActive(false);
            }
        }
    }
}
</code></pre>
<p>Usage:</p>
<pre><code class="language-csharp">var ui = ControllerHandler.GetController&lt;UIController&gt;();
await ui.PushPopupAsync&lt;MyPopup&gt;();
await ui.PopPopupAsync();
await ui.ShowScreenAsync&lt;MainMenuScreen&gt;();
await ui.HideScreenAsync&lt;LoadingScreen&gt;();
</code></pre>
<p>UIController also updates the background GameObject so it indexes behind the top popup.</p>
<p>It uses <code>GetOrCreatePopup&lt;TPopup&gt;()</code> / <code>GetOrCreateScreen&lt;TScreen&gt;()</code> to load and cache prefabs from <code>Resources/UIPrefabs/Popups/&lt;TypeName&gt;</code> and <code>Resources/UIPrefabs/Screens/&lt;TypeName&gt;</code>, pushes popups onto a stack, and shows/hides screens with async methods.</p>
<p>UIParent is a MonoBehaviour that holds references to ScreenParent, PopupParent, and BackgroundGO:</p>
<pre><code class="language-csharp">using UnityEngine;

namespace com.core.ui
{
    public class UIParent : MonoBehaviour
    {
        [SerializeField] private Transform  screensParent;
        [SerializeField] private Transform  popupsParent;
        [SerializeField] private GameObject backgroundGO;

        public Transform  ScreenParent =&gt; screensParent;
        public Transform  PopupParent  =&gt; popupsParent;
        public GameObject BackgroundGO =&gt; backgroundGO;
    }
}
</code></pre>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771288099657/6104e31e-e8e0-489c-bca5-592d5daec174.png" alt="UIParent prefab hierarchy" width="600" height="400" loading="lazy">

<p>UIParent prefab has a canvas and UIParent script attached:</p>
<img src="https://cloudmate-test.s3.us-east-1.amazonaws.com/uploads/covers/698d2f3c217bebae73c3f5e8/cb79381a-35c3-49ac-af50-da33b0f7f988.png" alt="UIParent prefab components" style="display:block;margin:0 auto" width="600" height="400" loading="lazy">

<p>There are a couple limitations here as well. First, popups and screens must live under Resources/UIPrefabs/Popups and Resources/UIPrefabs/Screens. Second, prefab name must match the script/type name (for example, TestPopup prefab name for a script named TestPopup).</p>
<h2 id="heading-summary"><strong>Summary</strong></h2>
<p>In this article, you set up a Unity project and walked through creating four reusable packages:</p>
<ul>
<li><p><strong>com.core.initializer</strong> – You created the package, added <strong>UniTask</strong>, defined <code>IController</code>, used the <code>Creator</code> helper to find and create controllers (including MonoBehaviours), and implemented <code>ControllerHandler</code> to run initialization at <code>BeforeSceneLoad</code> and expose controllers via <code>GetController&lt;T&gt;()</code>.</p>
</li>
<li><p><strong>com.core.data</strong> – You use <code>IDataProvider</code> and <code>LocalDataProvider</code> with MemoryPack for binary local save/load, and the <code>DataController</code> that implements <code>IController</code> and tracks version history.</p>
</li>
<li><p><strong>com.core.dotween</strong> – You wrap the <strong>DoTween</strong> asset as a package so other packages (like <strong>com.core.ui</strong>) can reference it for animations.</p>
</li>
<li><p><strong>com.core.ui</strong> – You created a modular UI package that you can use in your games to handle popups and full size screens. You can also extend this to add other UI types in the future.</p>
</li>
</ul>
<p>Building these as separate packages keeps your code modular and speeds up development across projects. You can install each package via Git into any Unity project.</p>
<p>Example manifest.json file to implement these packages:</p>
<pre><code class="language-json">{
  "dependencies"    : {
	"com.core.data"       : "https://github.com/TalhaCagatay/com.core.data.git#v0.1.0",
	"com.core.initializer": "https://github.com/TalhaCagatay/com.core.initializer.git#v0.1.0",
	"com.core.dotween"    : "https://github.com/TalhaCagatay/com.core.dotween.git#v0.1.0",
	"com.core.ui"         : "https://github.com/TalhaCagatay/com.core.ui.git#v0.1.0"
  },
  "scopedRegistries": [
	{
	  "name"  : "package.openupm.com",
	  "url"   : "https://package.openupm.com",
	  "scopes": [
		"com.cysharp.unitask",
		"com.cysharp.memorypack"
	  ]
	}
  ]
}
</code></pre>
<p><strong>Resources:</strong></p>
<ul>
<li><p>com.core.initializer on <a href="https://github.com/TalhaCagatay/com.core.initializer">GitHub</a></p>
</li>
<li><p>com.core.data on <a href="https://github.com/TalhaCagatay/com.core.data">GitHub</a></p>
</li>
<li><p>com.core.dotween on <a href="https://github.com/TalhaCagatay/com.core.dotween">Github</a></p>
</li>
<li><p>com.core.ui on <a href="https://github.com/TalhaCagatay/com.core.ui">Github</a></p>
</li>
<li><p><a href="https://play.google.com/store/apps/details?id=com.Focus.Matchingham">Example game</a> that I developed and used many modular systems like the ones you built in this article.</p>
</li>
</ul>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Create a 2D Pixel Art Game in Unity ]]>
                </title>
                <description>
                    <![CDATA[ Learn how to build a complete 2D Pixel Art Tower Defense game in Unity from scratch! We just posted a step-by-step tutorial on the freeCodeCamp.org YouTube channel that will guide you from a blank project to a fully playable game with a main menu, mu... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/create-a-2d-pixel-art-game-in-unity/</link>
                <guid isPermaLink="false">694417d0824ee9f1eae819f5</guid>
                
                    <category>
                        <![CDATA[ unity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ youtube ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Beau Carnes ]]>
                </dc:creator>
                <pubDate>Thu, 18 Dec 2025 15:03:44 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1766070221236/5ec09f0c-177f-48cd-aec9-0e698b2ede32.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Learn how to build a complete 2D Pixel Art Tower Defense game in Unity from scratch!</p>
<p>We just posted a step-by-step tutorial on the freeCodeCamp.org YouTube channel that will guide you from a blank project to a fully playable game with a main menu, multiple tower types, enemy waves, and three unique levels. Frank from Frank’s Laboratory developed this course.</p>
<p>You’ll learn how to create a modular, data-driven system using Scriptable Objects to manage towers, enemies, and waves, plus how to design forest, lava, and jungle levels with Unity Tilemaps.</p>
<p>In this tutorial, you’ll learn:</p>
<ul>
<li><p>How to set up 2D Tilemap levels in Unity</p>
</li>
<li><p>Animate pixel-art characters</p>
</li>
<li><p>Build towers and spawn enemy waves</p>
</li>
<li><p>Design diverse game worlds with Tilemaps</p>
</li>
<li><p>Export builds for Windows, Android, and Web</p>
</li>
<li><p>Publish and share your game online</p>
</li>
</ul>
<p>Watch the full course on <a target="_blank" href="https://youtu.be/dSIVVX0vAsY">the freeCodeCamp.org YouTube channel</a> (10-hour watch).</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/dSIVVX0vAsY" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Create a simple MMO Game in Unity ]]>
                </title>
                <description>
                    <![CDATA[ Creating an MMO (Massively Multiplayer Online) game may seem like a daunting task, but with the right tools and guidance, you can bring your game idea to life. Whether you're an aspiring game developer or just curious about how online multiplayer gam... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/create-a-simple-mmo-game-in-unity/</link>
                <guid isPermaLink="false">67c90a7950860cc5f8cd4d06</guid>
                
                    <category>
                        <![CDATA[ unity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ youtube ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Beau Carnes ]]>
                </dc:creator>
                <pubDate>Thu, 06 Mar 2025 02:37:45 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1741228630313/676dbb39-5da0-421e-aa31-8760b7f994a2.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Creating an MMO (Massively Multiplayer Online) game may seem like a daunting task, but with the right tools and guidance, you can bring your game idea to life. Whether you're an aspiring game developer or just curious about how online multiplayer games work, this Unity tutorial will provide a step-by-step guide to building your own simple MMO. You'll learn how to develop a scalable online game using Unity, C#, and SpacetimeDB, a powerful database designed for real-time multiplayer applications.</p>
<p>We just published a course on the <a target="_blank" href="http://freeCodeCamp.org">freeCodeCamp.org</a> YouTube channel that will teach you how to create an MMO game from scratch using Unity and SpacetimeDB. I created the course myself! This beginner-friendly course walks you through every step of the development process. The game you'll create is a space-themed version of <a target="_blank" href="http://agar.io"><em>agar.io</em></a>, where players control an entity that grows larger as it collects smaller objects while competing with others in real time. By the end of the course, you'll have a fully functional MMO game that can support hundreds of players simultaneously.</p>
<p>Throughout the course, you'll gain hands-on experience with:</p>
<ul>
<li><p><strong>Unity Game Development</strong> – Learn how to build and design your game using the Unity engine.</p>
</li>
<li><p><strong>C# Programming</strong> – Write scripts to control player movement, interactions, and game mechanics.</p>
</li>
<li><p><strong>SpacetimeDB</strong> – Implement a real-time multiplayer database to manage player data efficiently.</p>
</li>
<li><p><strong>Server and Client Architecture</strong> – Set up the game’s backend and handle communication between players.</p>
</li>
<li><p><strong>Multiplayer Game Mechanics</strong> – Create a competitive, interactive game world where players can grow, compete, and strategize.</p>
</li>
</ul>
<p>This course is perfect for beginners, though some prior experience with Unity or C# can be helpful. However, even if you're completely new, I will break everything down step by step, to make sure anyone can follow along and build their own MMO.</p>
<p>If you've ever wanted to create your own online game, this course is a great starting point. Check it out now on the <a target="_blank" href="https://youtu.be/msVwc0IwYl0">freeCodeCamp.org YouTube channel</a>.</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/msVwc0IwYl0" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Learn C# for Unity in Spanish ]]>
                </title>
                <description>
                    <![CDATA[ Unity is a very popular and powerful game engine that relies on C# as its primary scripting language. Learn how to bring your games to life with Unity and C#. We just published a course on the freeCodeCamp.org Spanish YouTube channel that will guide ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/learn-c-sharp-for-unity-in-spanish/</link>
                <guid isPermaLink="false">66aa29ea6bf09664d5699e04</guid>
                
                    <category>
                        <![CDATA[ C# ]]>
                    </category>
                
                    <category>
                        <![CDATA[ unity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Estefania Cassingena Navone ]]>
                </dc:creator>
                <pubDate>Wed, 31 Jul 2024 12:11:22 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1721941268910/09976618-e1f9-4e50-8815-42b01933d56f.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Unity is a very popular and powerful game engine that relies on C# as its primary scripting language. Learn how to bring your games to life with Unity and C#.</p>
<p>We just published a course on the <a target="_blank" href="https://www.youtube.com/freecodecampespanol">freeCodeCamp.org Spanish YouTube channel</a> that will guide you step by step through the fundamentals of C# for Unity. You will learn the core concepts that you need to know to start developing games in Unity with C#.</p>
<p>If you have Spanish-speaking friends, you are welcome to share the <a target="_blank" href="https://www.freecodecamp.org/espanol/news/aprende-c-sharp-para-unity-curso-desde-cero/"><strong>Spanish version of this article</strong></a> with them.</p>
<p>Luis Canary created this course. He is the Principal Gameplay Programmer at Pendulo Studios, a Madrid-based video game development company. He has taught courses at universities, schools, and companies and loves to share his passion for game development on his YouTube channel.</p>
<p>Before we dive into the course content, let's see what C# is, how it is related to Unity, and why you should learn both of them.</p>
<h2 id="heading-what-are-c-and-unity"><strong>What are C# and Unity?</strong></h2>
<p>C# is a versatile programming language known for its simplicity and power. Designed by Microsoft, it's part of the .NET family, a set of tools, libraries, and programming languages that work together to build various applications.</p>
<p>C# is a popular choice for building a wide range of applications, from desktop software and web applications to mobile apps and video games.</p>
<p>This course will focus on the fundamentals of C# for game development with Unity.</p>
<p>Unity is a popular game engine for creating 2D and 3D experiences. It uses C# as its primary scripting language and includes a comprehensive set of tools and features to design, develop, and deploy games across various platforms.</p>
<p>These are the platforms that are currently supported by Unity:</p>
<ul>
<li><p>Desktop</p>
</li>
<li><p>Mobile</p>
</li>
<li><p>Web</p>
</li>
<li><p>Consoles</p>
</li>
</ul>
<p>It also supports Augmented Reality (AR) and Virtual Reality (VR).</p>
<p>By learning C# for Unity development, you will be taking your first steps into a career in game development.</p>
<p>💡 <strong>Tip:</strong> This course is perfect for anyone who wants to start developing video games. It covers core programming concepts that will remain valid across different versions of C# and Unity.</p>
<h2 id="heading-c-for-unity-course-in-spanish"><strong>C# for Unity Course in Spanish</strong></h2>
<p>Awesome. Now that you know more about C# and Unity, let's see what you will learn during the course:</p>
<ul>
<li><p>Variables</p>
</li>
<li><p>Operators</p>
</li>
<li><p>Conditionals</p>
</li>
<li><p>Switch Statements</p>
</li>
<li><p>While Loops</p>
</li>
<li><p>Do-While Loops</p>
</li>
<li><p>For Loops</p>
</li>
<li><p>Arrays</p>
</li>
<li><p>Lists</p>
</li>
<li><p>Foreach Loops</p>
</li>
<li><p>Functions</p>
</li>
<li><p>Methods</p>
</li>
<li><p>Modifying components</p>
</li>
<li><p>Coroutines</p>
</li>
<li><p>Invoke</p>
</li>
<li><p>Destroy</p>
</li>
<li><p>PlayerPrefs</p>
</li>
<li><p>Classes</p>
</li>
<li><p>Inheritance</p>
</li>
</ul>
<p>By the end of the course, you will know the fundamentals of C# for Unity and you will be ready to start developing games in this programming language.</p>
<p>If you are ready to start learning C# for Unity, check out the course on the <a target="_blank" href="https://www.youtube.com/freecodecampespanol">freeCodeCamp.org Spanish YouTube channel</a>:</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/Wa5Wcb2AW28" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<p> </p>
<p>✍️ Course created by Luis Canary.</p>
<ul>
<li><p>YouTube: <a target="_blank" href="https://www.youtube.com/channel/UC_XaEmy0Rz49GkrhtpzqWlw">@LuisCanary</a></p>
</li>
<li><p>Instagram: <a target="_blank" href="https://www.instagram.com/luiscanary_/">@luiscanary_</a></p>
</li>
<li><p>Twitter: <a target="_blank" href="https://x.com/luiscanary">@luiscanary</a></p>
</li>
<li><p>TikTok: <a target="_blank" href="https://www.tiktok.com/@luiscanary?lang=es">@luiscanary</a></p>
</li>
<li><p>Twitch: <a target="_blank" href="https://www.twitch.tv/luiscanary">LuisCanary</a></p>
</li>
<li><p>Discord: <a target="_blank" href="https://discord.com/invite/BEQ2UZY">Invitación</a></p>
</li>
<li><p>Facebook: <a target="_blank" href="https://www.facebook.com/LuisCanaryy/">LuisCanaryy</a></p>
</li>
</ul>
<p><strong>💡 Tip:</strong> Once you've completed this C# for Unity course, we recommend taking a general introduction to Unity course to learn the basics of the user interface and the features of your current version of Unity.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How I Developed My First Adventure Game ]]>
                </title>
                <description>
                    <![CDATA[ It's hard to tell exactly when my journey creating Occulto, a point and click adventure game, started. But I have a significant date in mind: 3 May 2018. Here's one thing that got the ball rolling: Luigi: Hello Andrea. Sorry to bother you. I would l... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-i-developed-my-first-game/</link>
                <guid isPermaLink="false">66d46011b6b7f664236cbe00</guid>
                
                    <category>
                        <![CDATA[ Art ]]>
                    </category>
                
                    <category>
                        <![CDATA[ C ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #Game Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Game Development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ lessons learned ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technology ]]>
                    </category>
                
                    <category>
                        <![CDATA[ unity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Andrea Koutifaris ]]>
                </dc:creator>
                <pubDate>Wed, 09 Mar 2022 20:05:24 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/03/presentazione-new.min.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>It's hard to tell exactly when my journey creating Occulto, a point and click adventure game, started. But I have a significant date in mind:</p>
<p>3 May 2018.</p>
<p>Here's one thing that got the ball rolling:</p>
<blockquote>
<p>Luigi: Hello Andrea. Sorry to bother you. I would like to learn how to develop an app. Am I crazy?</p>
<p>Me (Andrea): Hmm... I don't have your number... who are you?</p>
</blockquote>
<p>Reading those two WhatsApp messages now makes me smile. But there are also two other pieces of interesting information:</p>
<p>First, that was May 2018. Now it is 2022... 3 years and some months later, we have published our very first game DEMO. So yes, it took us 3 years to release a demo.</p>
<p>But we are now producing at a steady pace, and in the first months of 2023 we will release the whole game.</p>
<p>That said, if you are planning to develop a game yourself, it won't necessarily take you 4 years…and I have some advice that hopefully will help!</p>
<p>Second, an app – everyone wants to make an app. Do we really need another app? What about a game instead? What I mean is: an adventure game is like a book, you install it, play it, enjoy and eventually uninstall it. It is not yet another app polluting your phone's memory.</p>
<p>Before I start, let me step back and explain what this article is about.</p>
<h2 id="heading-what-well-discuss-in-this-article">What We'll Discuss in This Article</h2>
<p>This article is about how I (Andrea) and Luigi developed <em>Occulto</em>, our first adventure game.</p>
<p>It will cover some technical aspects of the project, as well as how we managed creating and developing it. I'll discuss both psychological and practical parts of the journey.</p>
<p>I'll also provide a shallow comparison between using web technologies (like WebGL) for development vs Unity 2D.</p>
<p>This article consists of:</p>
<ul>
<li><p>A brief story about my passion for Adventure P&amp;C games, and how I ended up developing my own game.</p>
</li>
<li><p>A section about <em>Occulto</em>, the game I am developing</p>
</li>
<li><p>A tech section with a comparison between web technologies and Unity 2D</p>
</li>
<li><p>A section about what I learned through the process, along with some advice if you're creating your own game.</p>
</li>
</ul>
<h2 id="heading-how-i-got-into-adventure-games">How I got Into Adventure Games</h2>
<p>Many years ago, a good friend introduced me to <a target="_blank" href="https://amanita-design.net/games/machinarium.html">Machinarium</a>. Machinarium is one of the best adventure games I've ever played.</p>
<p>After I finished it, I felt the need to create my own adventure game. This feeling was not immediate, but grew stronger over time. Eventually it led me to find Luigi and be actually able to create my own indie game.</p>
<h3 id="heading-first-adventure-game-attempt">First adventure game attempt</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/10/newton-scene.jpeg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>In my first attempt at building a game, I contacted some friends and created a small group of people who were enthusiastic about creating an artistic P&amp;C game.</p>
<p>We managed to create a draft of the first scene (see the illustration above). The idea was to make an apple fall on Newton's head, who is resting under the tree.</p>
<p>I used the <a target="_blank" href="https://github.com/playn/playn">Playn Java framework</a> to write in Java and export to Android, iOS and web. At the time I was a Java developer. Playn is still an active project, it may be worth considering if you are looking for a Java 2D game framework.</p>
<p>This first attempt didn't last long. We had a dinner all together, and asked two friends to present us with a draft story of the game. And then I didn't get any feedback from the others and the project vanished into nothing.</p>
<h3 id="heading-second-attempt">Second attempt</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/10/cover-red-moony.min.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>In my second attempt I managed to create four scenes and some game-play among them. But the project failed because I wasn't ready to lead the project. You'll read about that soon.</p>
<p>Below you can see an image of one of the scenes of the game. It was intended to be a modern revisiting of Little Red Riding Hood were wolves were not bad :).</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/10/room.min.jpeg" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-third-and-final-adventure-game-attempt-occulto">Third and Final Adventure Game Attempt: Occulto</h2>
<p>Developing <em>Occulto</em> is my 3rd attempt at creating an adventure game – and hopefully this one is successful!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/10/village-editor.min.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>Unity Editor: 1° Village</em></p>
<h3 id="heading-intro-to-the-game">Intro to the game</h3>
<p>It is a beautiful morning, and Eliot, a young mage apprentice, is going to the studio of his magister for a lesson about magical potions. Something is wrong from the first moment: why isn't the magister opening the door?</p>
<p>Inside the studio everything is a mess, and a note tells Eliot to go to the church in the village. What is going on? Where is the magister?</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/10/studio.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>2° Magister studio</em></p>
<p>Will you help Eliot in his journey to find his magister and regain possession of the powerful forbidden book titled "The never written book" that an evil figure is trying to steal?</p>
<p>The demo consists of four scenes:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/10/monastery.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>3° Monastery</em></p>
<p>and one secret passage between the monastery and the private studio of a monk.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/10/secret-passage.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>4° Secret passage</em></p>
<p>Below you can see the last scene of the demo.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/10/hunckback-studio.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>5° Monk private studio</em></p>
<h2 id="heading-tech-i-used-to-build-my-adventure-game">Tech I Used to Build My Adventure Game</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/03/unity-vs-pixijs.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>We developed <em>Occulto</em> in the beginning using <a target="_blank" href="https://pixijs.com/">Pixi.JS</a> and HTML. Then, later, I switched to Unity using the 2D features that are now included as default in the editor.</p>
<p>Since this article is quite long, I will not enter in the details of the code. But I will provide a description of the technologies we used and the process of creating the game.</p>
<p>I am planning to write a second article for the technical part.</p>
<p>We are a group of 3 people:</p>
<ul>
<li><p>Myself, Andrea, the developer and project/technical manager. I contribute to the story and game/riddle design as well. I am a software engineer.</p>
</li>
<li><p>Luigi, the wonderful artistic designer who designs and draws the scenes. He is also responsible for the game story and game-play. If you like the illustrations above, then you like Luigi's work :). He graduated in Mathematics.</p>
</li>
<li><p>Antonio is the music and sounds designer. He is a software engineer.</p>
</li>
</ul>
<p>Luigi draws the scenes using <a target="_blank" href="https://www.adobe.com/products/photoshop.html">Photoshop</a> and makes the animations using <a target="_blank" href="https://www.adobe.com/products/aftereffects.html">After Effects</a>. Then he exports everything into images (jpg and png) that I later use to assemble the scenes.</p>
<p>In addition Antonio provides me with the sounds and music for the scenes. We are using mp3 files at the moment, but we are planning to switch to <a target="_blank" href="https://www.fmod.com/">FMOD</a> in the future.</p>
<p>The game uses FHD (1920x1080) images, and runs also on low end mobile devices. If you want to run on a device with 1 GB of RAM, you need to reduce the amount of FHD images. If you load in memory more than 50/60 FHD images, the game may crash on devices with not enough memory.</p>
<p>In normal Unity memory management, the entire scene is loaded on memory, so you have to pay attention to what you add to the scene.</p>
<p>A simple and classic solution to reduce the memory imprint, is to use sprite sheets for the animations. Most of the time an animation will fit in a 2048x2048 sprite. I use <a target="_blank" href="https://www.codeandweb.com/texturepacker">Texture Packer</a> to create and import animation sprite sheets in Unity.</p>
<p>In addition I use <a target="_blank" href="https://imagemagick.org/index.php">ImageMagick</a> <a target="_blank" href="https://en.wikipedia.org/wiki/Command-line_interface">CLI</a> to trim images with an object inside. My input is a FHD transparent PNG with an object inside placed in the right position. Then I use:</p>
<pre><code class="lang-bash">magick mogrify -trim -verbose *.png &gt; trim.txt
</code></pre>
<p>to trim the image and get the precise position of the object.</p>
<p>Finally I add the trimmed image to the scene and place it using a script I made that maps the coordinates inside <em>trim.txt</em> file to the x,y values of the Unity scene.</p>
<p>By trimming and using sprite-sheets, I solved all memory problems. Also smaller images means lower time when loading a scene. In cheap mobile devices, loading a scene can require like 5 or 6 seconds (whereas in more powerful devices it takes less than a second).</p>
<p>Regarding fps and performance, Unity is good – so basically you don't have to do anything special. You just need to avoid bad design. And pay attention to <a target="_blank" href="https://en.wikipedia.org/wiki/Time_complexity">time complexity</a>. For example, avoid searching for an element on every tick of the game loop.</p>
<p>As I mentioned earlier, I am planning to write a tech article about how I developed the game using Unity 2D. If you are interested, follow me or follow us on one of our social accounts.</p>
<h3 id="heading-unity-vs-webgl">Unity vs WebGL</h3>
<p>Even if I used both technologies, I am not an expert (this is my first game). So below I will just list some of the pro and cons of both technologies.</p>
<h4 id="heading-pros-of-webgl">Pros of WebGL</h4>
<ul>
<li><p>Easy to port everywhere with <a target="_blank" href="https://capacitorjs.com/">Capacitor</a> or <a target="_blank" href="https://www.electronjs.org/">Electron</a>.</p>
</li>
<li><p>Programmers friendly: <a target="_blank" href="https://pixijs.com/">PixiJS</a> makes it very easy.</p>
</li>
<li><p>Almost the only working solution if you need a web responsive version.</p>
</li>
<li><p>Continuous integration and delivery to web is very easy, since the output is a bunch of files.</p>
</li>
<li><p>Web development is mature, and you have access to tons of libraries, utilities as well as a web packers, like <a target="_blank" href="https://webpack.js.org/">Webpack</a>.</p>
</li>
<li><p>Collaboration is very easy and mature with Git. There is something about collaboration in Unity, I didn't explore it. I don't know what happens if two people work on the same scene.</p>
</li>
</ul>
<h4 id="heading-cons-of-webgl">Cons of WebGL</h4>
<ul>
<li><p>Slightly lower performances compared to more native frameworks.</p>
</li>
<li><p>Subject to WebViews bugs (which you cannot solve).</p>
</li>
<li><p>It can be difficult for programmers who do not know web development.</p>
</li>
<li><p>WebViews doesn't seem to be ready to perfectly support WebGL. The game wasn't working well on my Neffos, and who knows on which devices it had issues. Maybe WebViews are not yet ready for gaming, but they are definitely ready for HTML and hybrids app.</p>
</li>
</ul>
<h4 id="heading-pros-of-unity">Pros of Unity</h4>
<ul>
<li><p>Graphical editor: it is easier to visualize/update the scene and fine tuning.</p>
</li>
<li><p>Easy and complete: it has almost everything you need.</p>
</li>
<li><p>Good performance: 60 fps even on low end devices at 1920 x 1080 resolution.</p>
</li>
<li><p>Cross platform, but the WebGL version does not work well on mobile phones.</p>
</li>
<li><p>A lot of indie games are made using Unity. If the Unity team introduces a bug, it will be found very soon.</p>
</li>
</ul>
<h4 id="heading-cons-of-unity">Cons of Unity</h4>
<ul>
<li><p>Graphical editor: you need a working updated Unity editor in each of the computers you are going to use. With Linux it's not that simple.</p>
</li>
<li><p><a target="_blank" href="https://store.unity.com/compare-plans">Closed licence</a> but it has a free tier if you earned up to $100K in the last 12 months.</p>
</li>
<li><p>At the moment the mobile web version is not officially supported.</p>
</li>
<li><p>Linux Unity editor is alpha (and I managed to make it work after many attempts).</p>
</li>
<li><p>Not a lot of helpful info about it: most of the posts I read to find help about a particular topic were low quality or were videos. That's far away from stack overflow quality. But the documentation is well done.</p>
</li>
</ul>
<p>Keep in mind that this section is not intended to be an exhaustive comparison between Unity 3D and WebGl frameworks. Depending on your target, one technology could be better than the other.</p>
<p>That said, even if I am a web developer, I must admit that Unity is great for developing a 2D games (and I guess 3D games too).</p>
<h2 id="heading-what-i-learned-while-building-occulto">What I learned While Building Occulto</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/03/1_zGuG4nFo8O4e0WMoNWVbMA.jpeg" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-someone-needs-to-lead-the-project">Someone needs to lead the project</h3>
<p>This is my first insight: if it is you who propose a project to others (a game, an app or whatever), they will assume you will lead the project.</p>
<p>At the time I was thinking that I was just a programmer, and didn't act like a project leader. It won't work if someone doesn't actively follow every person in the project.</p>
<h3 id="heading-have-the-right-attitude">Have the right attitude</h3>
<p>It is important to have the right attitude towards people that are participating in the project. You also need to understand if they can be productive.</p>
<p>In this context, "productive" does not have the same meaning it has at work. Productive means "actually able to produce". At work it means how much you produce and how good is your output.</p>
<p>Before I go on, let me tell you a story:</p>
<p>Before embarking on <em>Occulto</em> game development, I decided to help a guy develop the interface for his board game. I did it because I thought the game he invented was a good game that had some brilliant parts to it.</p>
<p>In this case I was the developer, and he was leading the project (being the inventor of a game, doesn't unfortunately imply that you are also good as a project leader).</p>
<p>In the beginning everything was good, and I enjoyed developing the game. In addition I was learning React, which I used as the framework to build the game app. (It is a board game, not a classic one, so React was a good choice, and also it had a lot of pages, not just the game page).</p>
<p>Then things started to become weird: he started asking for deadlines, complaining about delays on the development, and asking for features which I thought weren't really useful in the first version of the game.</p>
<p>In the end it didn't work out and I couldn't work well with him, so I blocked all communication. Remember that I worked on his game for free, and I even solved a nasty bug that caused the back end side of the game to stop working.</p>
<p>So, why this story? To tell you that making a game with a bunch of friends is a very different job than what you do at work. Some advice:</p>
<ul>
<li><p><strong>Don't push people too hard</strong>: if you are making a game for fun, it must be fun. Motivate people and help them. They are working (as you are) for free on a project they believe in.</p>
</li>
<li><p><strong>Don't act like a boss</strong>: even if you direct and follow every step of the game, people should regard you more as a project manager/team leader than a boss.</p>
</li>
</ul>
<h3 id="heading-work-in-your-spare-time">Work in your spare time</h3>
<p>Being able to be "productive" applies also to you. Are you able to work in your spare time on the game? Can you provide a steady output, without long periods of time away from the project?</p>
<p>This is the first obstacle I encountered in my previous attempts. I wasn't able to provide a constant, timely output and people thought the project was falling apart.</p>
<p>In this case, as a programmer, it is important to integrate the output of your other team members (images, animations and sounds) as soon as possible. People will be more engaged if they see their work quickly integrated in the game. Also the sooner you integrate others' work, the sooner you will find and solve problems.</p>
<h3 id="heading-remove-as-many-obstacles-as-you-can">Remove as many obstacles as you can</h3>
<p>In order to work in your spare time, you have to reduce or remove all the obstacles. These can be physical (slow computer, too small a screen, ...) or psychological. The psychological ones are the most subtle. I will try to list some of them:</p>
<p><strong>Feeling guilty for not working</strong>: this is hard, and I think is one of the main reasons for quitting. You have to enjoy working on your project. So deadlines, pushing others to produce more, threatening (like "If you don't work enough you are out") do NOT work.</p>
<p>It is better to motivate people and help them understand what's blocking them (or you) to produce some output.</p>
<p><strong>Obstacles that delays the moment you can actually work</strong>: you may think something like "I'd like to finish that thing I started, I think I can complete it in 10 minutes." Then you think: "But the PC is slow and it will take forever to start... may be tomorrow, now I'll just serf on Instagram".</p>
<p>It is important that when you think you can work a bit on the game, you can actually do it without any delay or obstacle.</p>
<p><strong>Too tired to work on the game</strong>: indeed you must not overdo it. It is important to find a balance between how much you work and how much you rest. But it is also important to avoid long periods of not working on the game.</p>
<p>I noticed that small actions can help: for example for me it is enough to start the Unity Editor to increase the chances that I'll actually work on the game.</p>
<p><strong>Share your results with the others</strong>: even though non technical people may not fully understand what you are doing (and vice-versa), it is satisfying to explain that you solved a performance problem, or that you reduced the bundle size, for example.</p>
<p>In fact, in agile methodologies, telling what you did and what your are going to do is one of the main points.</p>
<p><strong>Persist</strong>. Not everything will be easy. You will have to persist. Even though you are probably making a game because of passion, it is still requires a lot of work and sometimes you have to persevere and overcome problems/blocks. You probably do that all the time at work, you can do it also for your game.</p>
<p><strong>Not every moment is a moment of pleasure</strong>. Imagine when I discovered that the demo, almost ready to be published, wasn't working on some mobile devices and I had to rewrite everything in Unity. I really had a bad weekend.</p>
<p>But then I manage to change my attitude, start with Unity, and regain pleasure in working on the game.</p>
<p>Fortunately Luigi, my partner in the game, understood it and accepted that we needed to delay the release date of the game demo. While it took a lot of time to write the demo (2 years, if you count from the first commit), it took me 3 months to rewrite it.</p>
<h3 id="heading-focus-on-developing-the-game">Focus on developing the game</h3>
<p>It is extremely important to focus on making the game, and not the framework for the game.</p>
<p>Being a programmer you will probably want to write more code than necessary and use your preferred language. Chose a framework based on your needs (cross platform? 2D or 3D? ...) and try to develop a simple level to understand if you made the right choices.</p>
<p>When you start, you won't necessarily have a clear view of the possible frameworks/technologies available to build a game – and there are a lot. In addition you will be biased towards some languages/features.</p>
<p>About that, I can tell you 2 mistakes I made:</p>
<p>I used PixiJS and HTML technologies at first. As opposite as you may think, I was able to go at 60 fps with FHD (1920x1080) resolution even in medium performance mobile devices.</p>
<p>This is because most of the work is done by WebGL. But at a certain point the game started flickering on my old mobile phone (Neffos X1 Max) when ported to a mobile app using Capacitor (webview). But it was working well on the browser and on the other phones I had. Even on my Motorola Moto G first generation (2013 low end device).</p>
<p>I should have tested earlier on mobile (not just with the browser). Also the game wasn't smooth on the my lower end device Moto G (still it was running near 30 fps).</p>
<p>I decided that I wanted my game to run smoothly even on low end devices, so I switched to Unity 2D. Unity is used by a lot of indie game developers, and C# is quite easy. I didn't try Unreal Engine, because I am too rusty on C++. Now it runs smoothly also on my Moto G (60 FPS).</p>
<p>The second thing that was almost a mistake is that I developed a library to find the shortest path on polygon areas with polygon holes. <a target="_blank" href="https://github.com/Kouty/shortest-path-polygon-area">Here</a> you can find the JS code (I have ported it to C#, but not yet release on GitHub).</p>
<p>I took me 3 attempts to get it working properly, and a lot of time. Fortunately by the time I started developing <em>Occulto</em>, the library was ready and working. Now I can just draw the walkable area and have the main character move inside it, avoiding obstacles (polygon holes).</p>
<p>The fact is that having an algorithm to move things inside a walk-able area is not strictly necessary, and it is better to focus on actually making the game. Other P&amp;C games do not use this feature, they just move characters along predefined paths.</p>
<p>So, before you embark on something that is not strictly necessary for the game, see if you can find something already implemented or if it is really worth it.</p>
<h3 id="heading-release-a-one-scene-version-of-the-game">Release a one scene version of the game</h3>
<p>After you've chosen the right framework, take a scene, and develop the entire game which will consist on one scene plus a menu and every UI component that is cross scene. It is important to learn everything you need and to find problems as soon as possible.</p>
<p>Also, submit the game for internal testing (not public) to the stores you are going to use. Yes, do everything that's necessary from developing to publishing (privately) the game.</p>
<p>When I published the game demo on iOS, one animation wasn't working. It was working on Android, Desktop, and even on iPhone with the developer build. So yes, you need to test everything as soon as possible, even the process of publishing.</p>
<p>I made the mistake to first develop the whole demo (four scenes, plus menu and some other screens) just to find out that WebGL technology was not the right choice for my game.</p>
<h2 id="heading-final-notes">Final Notes</h2>
<p>I hope you enjoyed reading this article and found some interesting advice. Maybe I will write another article when I have published the whole game, sharing other insights.</p>
<p>If you are curious about <a target="_blank" href="https://www.sirioartgames.com/"><em>Occulto</em></a> game, follow us on:</p>
<ul>
<li><p>Twitter: <a target="_blank" href="https://twitter.com/SirioArtGames">https://twitter.com/SirioArtGames</a></p>
</li>
<li><p>Instagram: <a target="_blank" href="https://www.instagram.com/sirioartgames/">https://www.instagram.com/sirioartgames</a></p>
</li>
<li><p>Our website: <a target="_blank" href="https://www.sirioartgames.com/">https://www.sirioartgames.com</a></p>
</li>
</ul>
<p>or <a target="_blank" href="http://onelink.to/mxsak4">try the demo</a>: <a target="_blank" href="http://onelink.to/occulto">http://onelink.to/occulto</a>!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Make a Video Game – Create Your Own Game From Scratch Tutorial ]]>
                </title>
                <description>
                    <![CDATA[ Game development is a popular field within the software industry. But what does it take to start building games from scratch? In this article, I will talk about the different game engines and tools that you can use to build your own games. I will als... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-make-a-video-game-create-your-own-game-from-scratch-tutorial/</link>
                <guid isPermaLink="false">66b8d99498b552b8a8592b26</guid>
                
                    <category>
                        <![CDATA[ Game Development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ unity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ unreal-engine ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Video games ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Jessica Wilkins ]]>
                </dc:creator>
                <pubDate>Tue, 12 Oct 2021 15:34:31 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/10/branden-skeli-r4YWfVVwTQ8-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Game development is a popular field within the software industry. But what does it take to start building games from scratch?</p>
<p>In this article, I will talk about the different game engines and tools that you can use to build your own games. I will also provide you with dozens of resources and tutorials to help get you started.</p>
<p>There are many tools and game engines out there but I will cover a few of the popular ones. </p>
<ol>
<li><a class="post-section-overview" href="#heading-unity">Unity</a></li>
<li><a class="post-section-overview" href="#heading-unreal">Unreal Engine</a></li>
<li><a class="post-section-overview" href="#heading-godot">Godot</a></li>
<li><a class="post-section-overview" href="#heading-phaser">Phaser</a></li>
<li><a class="post-section-overview" href="#heading-gamemaker-studio">GameMaker Studio</a> </li>
<li><a class="post-section-overview" href="#heading-cryengine">CryEngine</a></li>
<li><a class="post-section-overview" href="#heading-amazon-lumberyard">Amazon Lumberyard</a></li>
<li><a class="post-section-overview" href="#heading-renpy-visual-novel-engine">Ren'Py Visual Novel Engine</a></li>
<li><a class="post-section-overview" href="#heading-pygame">Pygame</a></li>
<li><a class="post-section-overview" href="#heading-love">LÖVE</a></li>
<li><a class="post-section-overview" href="#heading-kaboomjs">Kaboom.js</a></li>
</ol>
<h2 id="heading-unity">Unity</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/10/Screen-Shot-2021-10-12-at-1.47.43-AM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>This is a cross platform video game engine that is popular with game developers. Unity supports many platforms including iOS, Android, Windows, Mac, Linux and game consoles such as PlayStation and Xbox.</p>
<p>Some popular games that have been built with Unity include Cuphead, Pillars Of Eternity, Ori And The Blind Forest, Escape Plan, and Hearthstone. </p>
<p>Unity provides you with the opportunity to create your own 2D and 3D games. You can create shooter games, platformer games, educational games and more with Unity.</p>
<p>The programming language used with Unity is C#. If you are new to C#, you can take <a target="_blank" href="https://www.youtube.com/watch?v=GhQdlIFylQ8">this freeCodeCamp YouTube course</a>. </p>
<p>To get started with Unity, you can sign up for a free plan on their website. They offer <a target="_blank" href="https://store.unity.com/#plans-individual">free plans</a> for both students and individual use. </p>
<p>Unity also provides hours of courses, project tutorials, live training sessions and certifications. All of this education is available on their <a target="_blank" href="https://unity.com/learn#explore-how-you-can-develop-your-skills--2">website</a>. </p>
<p>freeCodeCamp also provides many resources to help you get started.</p>
<ul>
<li><a target="_blank" href="https://www.freecodecamp.org/news/game-development-for-beginners-unity-course/">Game Development for Total Beginners - Free Unity Course</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/learn-unity-multiplayer-basics-with-mirror/">Learn Unity Multiplayer Basics with Mirror</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/learn-c-and-unity-by-making-digital-tabletop-games/">Learn C# and Unity by Making Digital Tabletop Games</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/unity-game-engine-guide-how-to-get-started-with-the-most-popular-game-engine-out-there/">Unity Game Engine Guide: How to Get Started with the Most Popular Game Engine Out There</a></li>
</ul>
<h2 id="heading-unreal">Unreal</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/10/Screen-Shot-2021-10-12-at-1.56.37-AM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Unreal is a game engine where you can build 3D games. Unreal supports many platforms including iOS, Android, Windows, Mac, Linux and game consoles such as PlayStation, Xbox and Nintendo Switch.</p>
<p>Popular games built with the Unreal game engine include Fortnite, Yoshi's Crafted World, Hellblade: Senua's Sacrifice, Street Fighter 5, and Star Wars Jedi: Fallen Order. </p>
<p>The programming language used with Unreal is C++. If you are new to C++, you can take <a target="_blank" href="https://www.youtube.com/watch?v=vLnPwxZdW4Y">this freeCodeCamp YouTube course</a>. </p>
<p>You can download the Unreal game engine for free on <a target="_blank" href="https://www.unrealengine.com/en-US/download">their website</a>. They also provide 100's of hours of <a target="_blank" href="https://www.unrealengine.com/en-US/learn">free online tutorials</a>.  </p>
<p>freeCodeCamp also provides many resources to help you get started.</p>
<ul>
<li><a target="_blank" href="https://www.freecodecamp.org/news/learn-unreal-engine-by-creating-three-games/">Learn Unreal Engine 4 by Coding 3 Games - A Free 5-hour Game Dev Video Course</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/unreal-engine-course-create-a-2d-snake-game/">Unreal Engine Course: Create a 2D Snake Game</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/create-a-2-5d-platformer-game-with-unreal-engine/">How to Build A 2.5D Platformer Game With Unreal Engine – a Free 3-hour Course</a></li>
</ul>
<h2 id="heading-godot">Godot</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/10/Screen-Shot-2021-10-12-at-2.36.55-AM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Godot is a free open source game engine designed to create 2D and 3D games. Godot supports many platforms including iOS, Android, Windows, Mac, and Linux. </p>
<p>Some popular games that have been built with Godot include Carol Reed Mysteries, Commander Keen in Keen Dreams, and Cruelty Squad. </p>
<p>Godot supports a few programming languages but the main ones are GDScript and VisualScript. To learn more about supported languages, please visit the <a target="_blank" href="https://docs.godotengine.org/en/stable/getting_started/step_by_step/scripting.html">documentation</a>.</p>
<p>To get started working with Godot, you can go to their <a target="_blank" href="https://godotengine.org/download">download page</a>. Godot provides many free tutorials in their <a target="_blank" href="https://docs.godotengine.org/en/stable/">learn section</a>.   </p>
<p>freeCodeCamp also provides <a target="_blank" href="https://www.freecodecamp.org/news/create-a-2d-platformer-game-using-the-godot/">this YouTube tutorial</a> on Godot. </p>
<h2 id="heading-phaser">Phaser</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/10/Screen-Shot-2021-10-12-at-2.58.38-AM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Phaser is a free open source platform where you can build HTML 5 games for mobile and desktop. Phaser supports iOS, Android, as well as like Apache Cordova and phonegap.</p>
<p>Phaser provides you the opportunity to create your own shooter games, platformer games, educational games, and more. The primary languages used are JavaScript and TypeScript. </p>
<p>If you are new to either of those languages you can look into these freeCodeCamp beginner tutorials. </p>
<ul>
<li><a target="_blank" href="https://www.youtube.com/watch?v=PkZNo7MFNFg">Learn JavaScript - Full Course for Beginners</a></li>
<li><a target="_blank" href="https://www.youtube.com/watch?v=gp5H0Vw39yw">Learn TypeScript - Full Course for Beginners</a></li>
</ul>
<p>To get started working with Phaser, you can go to <a target="_blank" href="https://phaser.io/download">the download page</a> on their website. Phaser offers dozens of <a target="_blank" href="https://phaser.io/learn">free tutorials</a> to help you get started creating your first games. </p>
<p>If you have experience working with Node, Express, Vue or Socket.IO, then you can look into these tutorials. </p>
<ul>
<li><a target="_blank" href="https://www.freecodecamp.org/news/how-to-build-a-multiplayer-tabletop-game-simulator/">How to Build a Multiplayer Tabletop Game Simulator with Vue, Phaser, Node, Express, and Socket.IO</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/how-to-build-a-multiplayer-card-game-with-phaser-3-express-and-socket-io/">How to Build a Multiplayer Card Game with Phaser 3, Express, and Socket.IO</a></li>
</ul>
<h2 id="heading-gamemaker-studio">GameMaker Studio</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/10/Screen-Shot-2021-10-12-at-3.15.30-AM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>GameMaker Studio is a cross platform video game engine where you can create your own 2D games. GameMaker supports many platforms including iOS, Android, Windows, Mac and game consoles such as PlayStation and Xbox.</p>
<p>Popular games made with GameMaker Studio include Undertale: Overwhelmingly Positive, Shovel Knight: Treasure Trove: Overwhelmingly Positive and Katana Zero: Overwhelmingly Positive.</p>
<p>GameMaker Studio uses the GameMaker Language and you can learn more by visiting the <a target="_blank" href="https://manual.yoyogames.com/#t=GameMaker_Language%2FGameMaker_Language_Index.htm">documentation</a>. </p>
<p>They also offer <a target="_blank" href="https://www.yoyogames.com/en/tutorials">dozens of tutorials</a> to get you started making games. Gamemaker has a free option and you can <a target="_blank" href="https://accounts.yoyogames.com/register">create an account</a> on their website. </p>
<h2 id="heading-cryengine">CryEngine</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/10/Screen-Shot-2021-10-12-at-3.32.14-AM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>CryEngine allows you to create interactive 3D games and supports platforms like Windows, Linux, PlayStation, Xbox, and Oculus Rift. You can create shooter games, platformer games, educational games and more with CryEngine.</p>
<p>Some popular games that have been built with CryEngine include Kingdom Come: Deliverance, Far Cry, State of Decay, and Ryse: Son of Rome. </p>
<p>Programming languages used for CryEngine include C#, C++, and Lua. If you are not familiar with those languages, then you can look into these resources. </p>
<ul>
<li><a target="_blank" href="https://www.youtube.com/watch?v=GhQdlIFylQ8">C# Tutorial - Full Course for Beginners</a></li>
<li><a target="_blank" href="https://www.youtube.com/watch?v=vLnPwxZdW4Y">C++ Tutorial for Beginners - Full Course</a></li>
<li><a target="_blank" href="https://www.lua.org/pil/1.html">Lua Get Started Guide</a></li>
</ul>
<p>CryEngine has dozens of <a target="_blank" href="https://www.cryengine.com/tutorials">tutorials</a> to help you get started building games and it is free to <a target="_blank" href="https://www.cryengine.com/download">download</a> on their website.   </p>
<h2 id="heading-amazon-lumberyard">Amazon Lumberyard</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/10/Screen-Shot-2021-10-12-at-4.03.19-AM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Amazon Lumberyard is a free cross platform video game engine where you can create your own 3D games. Amazon Lumberyard supports many platforms including iOS, Android, Windows and game consoles such as PlayStation and Xbox.</p>
<p>Some games using Amazon Lumberyard include New World and The Grand Tour Game. </p>
<p>Programming languages used for Amazon Lumberyard include C++, and Lua. If you are not familiar with those languages, then you can look into these resources.</p>
<ul>
<li><a target="_blank" href="https://www.youtube.com/watch?v=vLnPwxZdW4Y">C++ Tutorial for Beginners - Full Course</a></li>
<li><a target="_blank" href="https://www.lua.org/pil/1.html">Lua Get Started Guide</a></li>
</ul>
<p>Amazon Lumberyard is free to <a target="_blank" href="https://aws.amazon.com/lumberyard/downloads/">download</a> and there are dozens of <a target="_blank" href="https://aws.amazon.com/lumberyard/videos/">tutorials</a> to get you started building your own games. </p>
<h2 id="heading-renpy-visual-novel-engine">Ren'Py Visual Novel Engine</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/10/Screen-Shot-2021-10-12-at-4.04.35-AM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Ren'Py Visual Novel Engine is a free engine where you can create interactive visual novels and games. Ren'Py supports many platforms including iOS, Android, Windows, Mac, and Linux.</p>
<p>Some popular games and novels created with Ren'Py include, Doki Doki Literature Club!, Zero Deaths, and UFO Swamp Odyssey.</p>
<p>The programming language used with Ren'Py is Python. If you are new to Python, you can take <a target="_blank" href="https://www.youtube.com/watch?v=rfscVS0vtbw">this freeCodeCamp YouTube course</a>.</p>
<p>You can <a target="_blank" href="https://www.renpy.org/latest.html">download</a> Ren'Py for free on their website. They also provide a <a target="_blank" href="https://www.renpy.org/doc/html/quickstart.html">Quickstart</a> guide to creating your first game or novel. </p>
<p>freeCodeCamp also has a walk through <a target="_blank" href="https://www.freecodecamp.org/news/use-python-to-create-a-visual-novel/">tutorial</a> on how to make a visual novel game using Ren'Py. </p>
<h2 id="heading-pygame">Pygame</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/10/Screen-Shot-2021-10-12-at-4.15.49-AM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Pygame comes with modules, sounds, and graphics to allow you to create video games using Python. Pygame supports platforms including Linux, Mac and Windows. </p>
<p>Popular games built with Pygame include Frets on Fire and Dangerous High School Girls in Trouble!</p>
<p>The programming language used with Pygame is Python. If you are new to Python, you can take <a target="_blank" href="https://www.youtube.com/watch?v=rfscVS0vtbw">this freeCodeCamp YouTube course</a>.</p>
<p>To get started with Pygame, you can go through their <a target="_blank" href="https://www.pygame.org/wiki/GettingStarted">Getting Started guide</a> on their website. freeCodeCamp also has a <a target="_blank" href="https://www.youtube.com/watch?v=FfWpgLFMI7w">YouTube course</a> on getting started with Pygame. </p>
<h2 id="heading-love">LÖVE</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/10/Screen-Shot-2021-10-12-at-4.25.28-AM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>LÖVE is a free game engine where you can build 2D games. LÖVE supports many platforms including iOS, Android, Windows, Mac, and Linux.</p>
<p>Some popular games that have been built with LÖVE include Blue Revolver, Move or Die, and Warlocks Tower. </p>
<p>The programming language used for LÖVE is Lua. You can learn about Lua in their <a target="_blank" href="https://www.lua.org/pil/1.html">get started guide</a> on the website. </p>
<h2 id="heading-kaboomjs">Kaboom.js</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/10/Screen-Shot-2021-10-12-at-4.34.35-AM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Kaboom.js is a library that allows you to build computer games using JavaScript. If you are unfamiliar with JavaScript, then you can take this <a target="_blank" href="https://www.youtube.com/watch?v=PkZNo7MFNFg">freeCodeCamp YouTube course</a>.  </p>
<p>To get setup, you can use their CDN, NPM or official Replit template. All of the information to get started can be found on their <a target="_blank" href="https://kaboomjs.com/doc/setup">website</a>. </p>
<p>Kaboom.js also provides a walk through <a target="_blank" href="https://kaboomjs.com/doc/intro">tutorial</a> to building your first game. You can recreate classic games like Mario and Space invaders using Kaboom.js. </p>
<p>You can also go through <a target="_blank" href="https://www.youtube.com/watch?v=4OaHB0JbJDI">this freeCodeCamp YouTube course,</a> to get started building classic games. </p>
<p>I hope you enjoy my list of popular game engines and tools to get started learning how to build your own games. </p>
<p>I encourage to keep exploring and find even more game options that were not mentioned in this article so you can continue your learning. </p>
<p>Best of luck on your game development journey. </p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Make a Bouncing Basketball in Unity with Materials and Textures 🏀 ]]>
                </title>
                <description>
                    <![CDATA[ By Rajat Kumar Gupta In this article, I'll teach you how to make a basketball using materials and textures in Unity. You can extend this micro-concept to create any kind of ball like a football, tennis ball, or snooker balls.  That said, these techni... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-make-a-basketball-in-unity-with-materials-and-textures/</link>
                <guid isPermaLink="false">66d45f6336c45a88f96b7ce1</guid>
                
                    <category>
                        <![CDATA[ #Game Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Game Development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ unity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Thu, 27 May 2021 15:16:34 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/05/basketball-image.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Rajat Kumar Gupta</p>
<p>In this article, I'll teach you how to make a basketball using materials and textures in Unity. You can extend this micro-concept to create any kind of ball like a football, tennis ball, or snooker balls. </p>
<p>That said, these techniques aren't just limited to creating round 3D objects like balls. You should be able to use this concept to customize the look of any type of geometry (or mesh).</p>
<p>Here is what you will create👇🏻</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/1.gif" alt="A basketball bouncing on a plane surface" width="600" height="400" loading="lazy">
<em>Basketball🏀</em></p>
<p>Think of the basketball as a sphere (that is, a mesh) wrapped up with a pretty paper (that is, a texture).</p>
<p>Let’s get started.</p>
<h3 id="heading-prerequisites">Prerequisites</h3>
<p>To make the bouncing ball, your sample scene should have  the following:</p>
<ol>
<li>A plane</li>
<li>A sphere with a custom material</li>
</ol>
<p>Let's see how to do that first.</p>
<h2 id="heading-step-1-how-to-add-a-plane-and-a-sphere-to-the-scene">Step 1: How to Add a Plane and a Sphere to the Scene</h2>
<p>First go to the Hierarchy Panel in Unity. Right click and select plane to drop a plane in your scene. Do the same to add a sphere.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/plane-and-sphere.gif" alt="Image" width="600" height="400" loading="lazy">
<em>Add a plane and a sphere to the scene</em></p>
<h2 id="heading-step-2-how-to-create-a-folder-that-contains-all-the-colors">Step 2: How to Create a Folder that Contains All the Colors</h2>
<p>It’s always a good practice to begin by creating a folder that contains all your colors and materials. This helps you create a palette (or a collection of colors and materials) and makes it easier for you to apply the assets in your palette to the Game Objects.</p>
<p>Simply go to the Projects panel. Then right click in the assets sub-panel, click create, and then select folder. Name this folder "Materials".</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/ColorFolder-min.gif" alt="Image" width="600" height="400" loading="lazy">
<em>Right-click in Assets Panel &gt; Create &gt; Folder &gt; Name it “Materials”</em></p>
<h2 id="heading-step-3-how-to-create-a-material-for-the-plane">Step 3: How to Create a Material for the Plane</h2>
<p>The next step is to create colors (or materials) for the plane.</p>
<p>Go inside the materials folder that you created in the above step by double clicking on it. Right click and select create. Then select "Material" from the dropdown.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/1_5PyYNjCGe3_lYB4LYwb5KA.gif" alt="Image" width="600" height="400" loading="lazy">
<em>Go inside Materials Folder &gt; Right-click &gt; Create &gt; Material &gt; Name it “MyColor”(or whatever you want)</em></p>
<h2 id="heading-step-4-how-to-change-the-albedo-property-of-the-material">Step 4: How to Change the Albedo Property of the Material</h2>
<p>Next select the created material and check out its properties in the Inspector Panel on the right-hand side. </p>
<p>Note that you only need to change the albedo property of the plane's material and <strong>not</strong> the sphere's material. We will create a material for the sphere later in this article.</p>
<p>It is important that your sphere has a custom material in this step. Otherwise, you will not be able to view or modify the various properties of the Material.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/change-albedo-property.gif" alt="Image" width="600" height="400" loading="lazy">
<em>Change the “albedo” property to whatever color you want.</em></p>
<p>Great! Now you can create a collection of colors using the same technique.</p>
<p>Now we can apply the color to any Game Object like this👇.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/1_n1b2BxGPRFe5hV6uiBMTCw.gif" alt="Image" width="600" height="400" loading="lazy">
<em>Drag and drop the material into the Game Object (in our case it will be a plane instead of a cube)</em></p>
<h2 id="heading-step-5-how-to-add-the-rigidbody-component-to-the-ball">Step 5: How to Add the Rigidbody Component to the Ball</h2>
<p>Since we need our ball to obey the laws of physics, we will have to attach the Rigidbody component to it.</p>
<p>To do so, select the Sphere from your Scene Hierarchy panel. Click on Add Component and then make sure the "Use Gravity" box is checked. We don’t want the ball to float off into space 😅.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/1_i5YL1YYQ5zDSYM2X3TCLFg.gif" alt="Image" width="600" height="400" loading="lazy">
<em>Select the Sphere &gt; Add Component &gt; Rigid Body &gt; Keep “Use Gravity” box checked</em></p>
<h2 id="heading-step-6-how-to-create-a-bouncy-material">Step 6: How to Create a "Bouncy" Material</h2>
<p>Go to the assets panel. Right click and then click create. Make sure you select the "Physic Material" and <strong>not</strong> Material. Name the material anything you want to. I named it "Bouncy" for obvious reasons.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/1_b_3AtywJx2c4owi9uGamOg.gif" alt="Image" width="600" height="400" loading="lazy">
<em>Right-click in the assets panel &gt; Create &gt; Physic Material &gt; Name it “Bouncy”</em></p>
<h2 id="heading-step-7-how-to-change-the-properties-of-the-bouncy-material">Step 7: How to Change the Properties of the Bouncy Material</h2>
<p>Select the Bouncy Material. You should be able to view the properties of this material on the right-hand side in the the Inspector panel. Now change the properties.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/1_D9khGemDSHYutFoTs08WzQ.gif" alt="Image" width="600" height="400" loading="lazy">
<em>Set Friction to 0 and Bounciness to 1</em></p>
<h2 id="heading-step-8-how-to-apply-the-material-to-the-sphere">Step 8: How to Apply the Material to the Sphere</h2>
<p>Now apply this material to the sphere (that is, the ball) in our scene by simply dragging and dropping the bouncy material to the sphere.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/1_cCrIarAzTFKxQJ0tOciSyQ.gif" alt="Image" width="600" height="400" loading="lazy">
<em>Drag and drop the Bouncy Material into the Sphere</em></p>
<p>That’s it! 🎉 This step confirms that the sphere will bounce on the floor.</p>
<h2 id="heading-step-9-hit-the-play-button">Step 9: Hit the Play Button</h2>
<p>On top of the Game panel you will find the play button. Click on it and the ball will start bouncing. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/1_c0PLeoiv2A4LRUgu7s_zKw.gif" alt="Image" width="600" height="400" loading="lazy">
<em>Our ball is bouncing now. Yayyy!</em></p>
<p>Notice how the bouncing stops after some time. This is expected behavior and we will fix this in the next step.</p>
<h2 id="heading-step-10-how-to-change-the-properties-of-the-bouncy-material">Step 10: How to Change the Properties of the "Bouncy" Material</h2>
<p>Different balls bounce differently. You can control the number of times the ball bounces. Try experimenting with different properties of the “Bouncy” material. </p>
<p>Select the "Bouncy" material in the Materials folder and try changing the values of the properties. If you want the ball to bounce forever set the value of Bounce Combine to Maximum.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/1_aH8Epn0bCvlrZEy-nn6WJQ.gif" alt="Image" width="600" height="400" loading="lazy">
<em>Set the value of Bounce Combine to Maximum and our ball won’t stop bouncing at all</em></p>
<p>Alright. Now let's make that ball look like a real basketball. </p>
<h2 id="heading-step-11-how-to-create-a-folder-that-will-contain-all-your-textures">Step 11: How to Create a Folder that Will Contain All Your Textures</h2>
<p>To keep things organized, let’s create a folder that will contain all the textures.</p>
<p>To do so, go to the assets panel and create a new folder called "Textures". This is where we will store all our textures.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/2.gif" alt="Right-click in Assets Panel. Then select Create. Then select Folder. Name it &quot;Textures&quot;" width="600" height="400" loading="lazy">
<em>Right-click in Assets Panel &gt; Create &gt; Folder &gt; Name it “Textures”</em></p>
<h2 id="heading-step-12-how-to-download-a-texture">Step 12: How to Download a Texture</h2>
<p>Since we need a texture for a basketball, simply download one online. A texture is just an image in .png or .jpg format. For now, you can download the basketball texture from here:</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://www.robinwood.com/Catalog/FreeStuff/Textures/TexturePages/BallMaps.html">https://www.robinwood.com/Catalog/FreeStuff/Textures/TexturePages/BallMaps.html</a></div>
<p>Make sure you have the appropriate license to use a texture that you download. The above textures are free to use.</p>
<h2 id="heading-step-13-how-to-drop-the-texture-into-your-unity-project">Step 13: How to Drop the Texture into your Unity Project</h2>
<p>Simply drag and drop the textures into the Textures folder as shown below👇</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/3.gif" alt="Image" width="600" height="400" loading="lazy">
<em>Drag and drop the downloaded texture into the “Textures” folder that you created in Step 1 above.</em></p>
<h2 id="heading-step-14-how-to-apply-the-downloaded-texture-to-the-sphere">Step 14: How to Apply the Downloaded Texture to the Sphere</h2>
<p>Select the sphere to view all its properties in the Inspector panel. Then drag and drop the "BasketballColor" texture to the square box on the left hand side of the Albedo property.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/05/4.gif" alt="Drag and drop the downloaded texture to the box at the left of the Albedo property." width="600" height="400" loading="lazy">
<em>Drag and drop the downloaded texture to the box at the left of the Albedo property.</em></p>
<p>You've successfully used Materials and Textures to create a basketball. Now you can do the same for all your games or AR/VR experiences that you develop.</p>
<p>Different types of balls behave differently. Try experimenting with the bounciness and tweaking the different parameters of the Rigid Body Component attached to the sphere to create a golf ball, a football, or a tennis ball.</p>
<p>Enjoy!👏🏻</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://buymeacoffee.com/knightcube">https://buymeacoffee.com/knightcube</a></div>
<h3 id="heading-you-can-connect-with-me-on-social-media-here">You can connect with me on social media here:</h3>
<ul>
<li>Twitter id: <a target="_blank" href="https://twitter.com/knightcube">@knightcube</a></li>
<li><a target="_blank" href="https://www.youtube.com/channel/UCvB2-KQUEwXSrzX4-lhEfPg?sub_confirmation=1">Subscribe to my YouTube channel to learn more about AR/VR</a></li>
<li>Read more articles <a target="_blank" href="https://knightcube.medium.com/">on my Medium profile here</a></li>
</ul>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Game Development for Total Beginners - Free Unity Course ]]>
                </title>
                <description>
                    <![CDATA[ Almost half of all games are created using the Unity game engine. Unity is great for both new and experienced game developers. We just published a 7-hour course on the freeCodeCamp.org YouTube channel that will teach you how to create games using Uni... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/game-development-for-beginners-unity-course/</link>
                <guid isPermaLink="false">66b2028c08bc664c3c097e8a</guid>
                
                    <category>
                        <![CDATA[ unity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ youtube ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Beau Carnes ]]>
                </dc:creator>
                <pubDate>Thu, 15 Apr 2021 17:08:48 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/04/unitybeg.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Almost half of all games are created using the Unity game engine. Unity is great for both new and experienced game developers.</p>
<p>We just published a 7-hour course on the freeCodeCamp.org YouTube channel that will teach you how to create games using Unity. This is the perfect course for a complete beginner.</p>
<p>Fahir from AwesomeTuts developed this course. He has been creating Unity tutorials for years and he knows exactly what beginners need to know.</p>
<p>The course starts with teaching how to install Unity, an overview of using Unity, and the basics of C#. Then you will learn how to create a complete game from start-to-finish.  And all the assets you need are included for free—just check the links in the video description.</p>
<p>Here are all the sections in this course:</p>
<ul>
<li>Downloading Unity And Unity Hub</li>
<li>About Unity Versions And Creating A New Project</li>
<li>Introduction To Unity's Interface</li>
<li>Starting With Unity's Basics</li>
<li>Rigid Bodies And Colliders</li>
<li>Audio Source And UI Elements</li>
<li>Moving Our Character With Code</li>
<li>Introduction To Variables</li>
<li>Operations With Variables</li>
<li>Functions</li>
<li>Conditional Statements</li>
<li>Loops</li>
<li>Coroutines</li>
<li>Classes</li>
<li>Accessibility Modifiers(Data Encapsulation)</li>
<li>Inheritance</li>
<li>Getting Components</li>
<li>Monster Chase Game Intro</li>
<li>Importing Assets</li>
<li>Creating Player Animations</li>
<li>Sorting Layers And Order In Layer</li>
<li>Creating The Game Background</li>
<li>Player Movement</li>
<li>Animating The Player Via Code</li>
<li>Player Jumping</li>
<li>Camera Follow Player</li>
<li>Enemy Animations</li>
<li>Enemy Script</li>
<li>Enemy Spawner</li>
<li>Enemy Collision</li>
<li>The Collector Script</li>
<li>Unity's UI System</li>
<li>Creating Main Menu</li>
<li>Navigating Between Scenes</li>
<li>Selecting A Character</li>
<li>Static Variables</li>
<li>Singleton Pattern</li>
<li>Events And Delegates</li>
<li>Instantiating The Selected Character</li>
<li>Finishing Our Game</li>
</ul>
<p>You can watch the full course below or <a target="_blank" href="https://youtu.be/gB1F9G0JXOo">on the freeCodeCamp.org YouTube channel</a> (7-hour watch).</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/gB1F9G0JXOo" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Learn Unity Multiplayer Basics with Mirror ]]>
                </title>
                <description>
                    <![CDATA[ By M. S. Farzan Unity is one of the most well-known and established engines for game development, and Mirror is a third-party, open source networking solution that allows you to add multiplayer to your games. With this new tutorial, we'll walk throug... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/learn-unity-multiplayer-basics-with-mirror/</link>
                <guid isPermaLink="false">66d851fde0db794d56c01bfd</guid>
                
                    <category>
                        <![CDATA[ C ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Game Development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ learn to code ]]>
                    </category>
                
                    <category>
                        <![CDATA[ unity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 22 Jun 2020 01:35:40 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9a21740569d1a4ca23b4.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By M. S. Farzan</p>
<p><a target="_blank" href="https://unity.com/">Unity</a> is one of the most well-known and established engines for game development, and <a target="_blank" href="https://mirror-networking.com/">Mirror</a> is a third-party, open source networking solution that allows you to add multiplayer to your games.</p>
<p>With this new tutorial, we'll walk through the basics of Unity multiplayer development with Mirror!</p>
<p>Follow along (57 minute watch):</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/YTs1Kvyxpuc" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<p>You can continue by learning how to build a 2D multiplayer card game with Unity <a target="_blank" href="https://www.freecodecamp.org/news/how-to-build-a-multiplayer-card-game-with-unity-2d-and-mirror/">here</a>.</p>
<p>Happy coding!</p>
<p>If you enjoyed this article, please consider <a target="_blank" href="https://www.nightpathpub.com/">checking out my games and books</a>, <a target="_blank" href="https://www.youtube.com/msfarzan?sub_confirmation=1">subscribing to my YouTube channel</a>, or <a target="_blank" href="https://discord.gg/RF6k3nB">joining the <em>Entromancy</em> Discord</a>.</p>
<p>M. S. Farzan, Ph.D. has written and worked for high-profile video game companies and editorial websites such as Electronic Arts, Perfect World Entertainment, Modus Games, and MMORPG.com, and has served as the Community Manager for games like <em>Dungeons &amp; Dragons Neverwinter</em> and <em>Mass Effect: Andromeda</em>. He is the Creative Director and Lead Game Designer of <em><a target="_blank" href="https://www.nightpathpub.com/rpg">Entromancy: A Cyberpunk Fantasy RPG</a></em> and author of <em><a target="_blank" href="http://nightpathpub.com/books">The Nightpath Trilogy</a></em>. Find M. S. Farzan on Twitter <a target="_blank" href="https://twitter.com/sominator">@sominator</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Learn C# and Unity by Making Digital Tabletop Games ]]>
                </title>
                <description>
                    <![CDATA[ By M. S. Farzan Building 2D games can be a great way to learn C# and Unity, especially when working through the basics of complex tabletop game logic. In this series, I’m going to introduce you to the basics of C# programming using Unity. But a lot o... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/learn-c-and-unity-by-making-digital-tabletop-games/</link>
                <guid isPermaLink="false">66d851f962a291dea89878e6</guid>
                
                    <category>
                        <![CDATA[ C ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Game Development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ learn to code ]]>
                    </category>
                
                    <category>
                        <![CDATA[ unity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Fri, 12 Jun 2020 18:22:06 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9a4f740569d1a4ca24d6.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By M. S. Farzan</p>
<p>Building 2D games can be a great way to learn C# and Unity, especially when working through the basics of complex tabletop game logic.</p>
<p>In this series, I’m going to introduce you to the basics of C# programming using Unity. But a lot of the concepts we’re going to learn will be applicable in other programming languages as well, and game development in general.</p>
<p>Throughout this series, I’ll be providing an emphasis on learning Unity for digital tabletop game development. This should be useful for anyone who wants to learn to code in C# or work with Unity.  </p>
<p>After learning some C# and getting comfortable with the Unity editor, along with some practice projects and outside learning of your own, you’ll be able to run simulations, make your own games, and begin exploring the wider Unity ecosystem.</p>
<p>If you’re not specifically interested in digital tabletop game development, you’ll probably still find this series to be helpful. We’ll be learning core concepts that are central to C# coding and Unity game development that you’ll be able to apply to other programming languages and engines.  </p>
<p>I’m a big proponent of using digital tabletop games in learning to code. Tabletop games are great because they involve a lot of logic and complex rulesets, but not physics, vector math, animation, and that sort of thing.</p>
<p>Start by learning the basics (Beginner Series):</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/Wz6R5tg5FRw" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<p>Take a tour of Unity 2D (Beginner Tutorial):</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/w2hxVVnbEFA" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<p>Learn Unity multiplayer basics with Mirror (Intermediate Tutorial):</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/YTs1Kvyxpuc" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<p>Build a 2D multiplayer card game (Advanced Series):</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/0-dUB52eEMk" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<p>Happy coding!</p>
<p>If you enjoyed this article, please consider <a target="_blank" href="https://www.nightpathpub.com/">checking out my games and books</a>, <a target="_blank" href="https://www.youtube.com/msfarzan?sub_confirmation=1">subscribing to my YouTube channel</a>, or <a target="_blank" href="https://discord.gg/RF6k3nB">joining the <em>Entromancy</em> Discord</a>.</p>
<p>M. S. Farzan, Ph.D. has written and worked for high-profile video game companies and editorial websites such as Electronic Arts, Perfect World Entertainment, Modus Games, and MMORPG.com, and has served as the Community Manager for games like <em>Dungeons &amp; Dragons Neverwinter</em> and <em>Mass Effect: Andromeda</em>. He is the Creative Director and Lead Game Designer of <em><a target="_blank" href="https://www.nightpathpub.com/rpg">Entromancy: A Cyberpunk Fantasy RPG</a></em> and author of <em><a target="_blank" href="http://nightpathpub.com/books">The Nightpath Trilogy</a></em>. Find M. S. Farzan on Twitter <a target="_blank" href="https://twitter.com/sominator">@sominator</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Build a Multiplayer Card Game with Unity 2D and Mirror (UPDATED) ]]>
                </title>
                <description>
                    <![CDATA[ By M. S. Farzan Working with the canvas in Unity 2D can feel complicated at first, particularly if you're attempting to learn the editor while also tackling C# scripting. It can also be daunting to think about turning a single-player game into a mult... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-build-a-multiplayer-card-game-with-unity-2d-and-mirror/</link>
                <guid isPermaLink="false">66d851e9e0db794d56c01bf7</guid>
                
                    <category>
                        <![CDATA[ C ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Game Development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ learn to code ]]>
                    </category>
                
                    <category>
                        <![CDATA[ unity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Fri, 03 Apr 2020 03:30:11 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9bd0740569d1a4ca2e0f.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By M. S. Farzan</p>
<p>Working with the canvas in <a target="_blank" href="https://unity.com/">Unity 2D</a> can feel complicated at first, particularly if you're attempting to learn the editor while also tackling C# scripting.</p>
<p>It can also be daunting to think about turning a single-player game into a multiplayer experience, as there are a lot of new concepts to consider and several third-party packages from which to choose.</p>
<p>In Part 1 of this new video series, we'll create a basic 2D card game in Unity with randomized decks and draggable/droppable cards using the canvas, C# scripting, prefabs, and more (1 hour 10 minute watch):</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/0-dUB52eEMk" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<p>In Part 2, we'll continue the adventure by cleaning up our nested canvas prefabs and enabling a mouseover card preview (42 minute watch):</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/eo6-FIT3G0M" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<p>In Part 3, we'll add basic multiplayer functionality with <a target="_blank" href="https://mirror-networking.com/">Mirror</a> (1 hour 26 minute watch):</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/X7rKFVDGT64" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<p>In Part 4, we'll continue to work with Mirror to improve our multiplayer experience (36 minute watch):</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/4gQgfJmZ7C0" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<p>In Part 5, we'll add game logic from one of my games, <em><a target="_blank" href="https://www.nightpathpub.com/hacker-battles">Entromancy: Hacker Battles</a></em>, to our multiplayer project (2 hour 34 minute watch):</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/r8I7FUfgWJ8" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<p>And in Part 6, we'll continue to add game logic along with a more robust user interface (1 hour 23 minute watch):</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/3J-Fc4AdAOI" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<p>You can also learn more about Unity multiplayer basics <a target="_blank" href="https://www.freecodecamp.org/news/learn-unity-multiplayer-basics-with-mirror/">here</a>.</p>
<p>Happy coding!</p>
<p>If you enjoyed this article, please consider <a target="_blank" href="https://www.nightpathpub.com/">checking out my games and books</a>, <a target="_blank" href="https://www.youtube.com/msfarzan?sub_confirmation=1">subscribing to my YouTube channel</a>, or <a target="_blank" href="https://discord.gg/RF6k3nB">joining the <em>Entromancy</em> Discord</a>.</p>
<p>M. S. Farzan, Ph.D. has written and worked for high-profile video game companies and editorial websites such as Electronic Arts, Perfect World Entertainment, Modus Games, and MMORPG.com, and has served as the Community Manager for games like <em>Dungeons &amp; Dragons Neverwinter</em> and <em>Mass Effect: Andromeda</em>. He is the Creative Director and Lead Game Designer of <em><a target="_blank" href="https://www.nightpathpub.com/rpg">Entromancy: A Cyberpunk Fantasy RPG</a></em> and author of <em><a target="_blank" href="http://nightpathpub.com/books">The Nightpath Trilogy</a></em>. Find M. S. Farzan on Twitter <a target="_blank" href="https://twitter.com/sominator">@sominator</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Unity Game Engine Guide: How to Get Started with the Most Popular Game Engine Out There ]]>
                </title>
                <description>
                    <![CDATA[ Game Development with Unity Unity is a cross-platform game engine developed by Unity Technologies, which is primarily used to develop video games and simulations for computers, consoles and mobile devices. First announced only for OS X, at Apple’s Wo... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/unity-game-engine-guide-how-to-get-started-with-the-most-popular-game-engine-out-there/</link>
                <guid isPermaLink="false">66c36412b737bb2ce70731ff</guid>
                
                    <category>
                        <![CDATA[ #Game Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Game Development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ toothbrush ]]>
                    </category>
                
                    <category>
                        <![CDATA[ unity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Thu, 13 Feb 2020 18:47:00 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9c98740569d1a4ca3316.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <h2 id="heading-game-development-with-unity"><strong>Game Development with Unity</strong></h2>
<p>Unity is a cross-platform game engine developed by Unity Technologies, which is primarily used to develop video games and simulations for computers, consoles and mobile devices. First announced only for OS X, at Apple’s Worldwide Developers Conference in 2005, it has since been extended to target 27 platforms.</p>
<h2 id="heading-overview"><strong>Overview</strong></h2>
<p>Unity is an all purpose game engine that supports 2D and 3D graphics, drag and drop functionality and scripting through <a target="_blank" href="https://guide.freecodecamp.org/csharp">C#</a>.</p>
<p>Unity is particularly popular for mobile game development and much of their focus is on mobile platforms. Unity3D’s 2D pipeline is a more recent addition to the engine, and is less mature than the 3D pipeline. Despite this Unity is an adequate platform for developing 2D games even when compared to other dedicated 2D engines, particularly if you plan to release the game across multiple mobile devices.</p>
<p>Unity is also a good choice for VR development, although VR is a very small market at the moment. The mobile and PSVR markets are the largest in VR, and Unity is already well positioned to port games to many platforms such as PS4 and PC, or many different mobile markets.</p>
<p>The engine targets the following graphics APIs: Direct3D on Windows and Xbox One; OpenGL on Linux, macOS, and Windows; OpenGL ES on Android and iOS; WebGL on the web; and proprietary APIs on the video game consoles.</p>
<p>Additionally, Unity supports the low-level APIs Metal on iOS and macOS and Vulkan on Android, Linux, and Windows, as well as Direct3D 12 on Windows and Xbox One. Within 2D games, Unity allows importation of sprites and an advanced 2D world renderer.</p>
<p>For 3D games, Unity allows specification of texture compression and resolution settings for each platform that the game engine supports, and provides support for bump mapping, reflection mapping, parallax mapping, screen space ambient occlusion (SSAO), dynamic shadows using shadow maps, render-to-texture and full-screen post-processing effects.</p>
<p>Unity also offers services to developers, these are: Unity Ads, Unity Analytics, Unity Certification, Unity Cloud Build, Unity Everyplay, Unity IAP, Unity Multiplayer, Unity Performance Reporting and Unity Collaborate. Besides this, Unity has an asset store where the developer community can download and upload both commercial and free third party resources such as textures, models, plugins, editor extensions and even entire game examples.</p>
<p>Unity is notable for its ability to target games for multiple platforms. The currently supported platforms are Android, Android TV, Facebook Gameroom, Fire OS, Gear VR, Google Cardboard, Google Daydream, HTC Vive, iOS, Linux, macOS, Microsoft HoloLens, Nintendo 3DS family, Nintendo Switch, Oculus Rift, PlayStation 4, PlayStation Vita, PlayStation VR, Samsung Smart TV, Tizen, tvOS, WebGL, Wii U, Windows, Windows Phone, Windows Store, and Xbox One.</p>
<p>Unity is the default software development kit (SDK) for Nintendo’s Wii U video game console platform, with a free copy included by Nintendo with each Wii U developer license. Unity Technologies calls this bundling of a third-party SDK an “industry first”.</p>
<h2 id="heading-interface"><strong>Interface</strong></h2>
<p><img src="https://github.com/pawelszpiczakowski/PublicStuff/raw/master/unityInterface.png" alt="Unity Interface" width="600" height="400" loading="lazy"></p>
<p>In picture above, you will notice five section:</p>
<ol>
<li>Section 1. <strong>Scene View</strong>: This is where you will be creating level for your game, scene or 3D project. All of your Game Objects will be placed and manipulated right here.</li>
<li>Section 2. <strong>Game View</strong>: This is where you will see your results, how your level or scene looks like. You need to have a Camera on the scene to see how it looks like. Sometimes its called Camera View.</li>
<li>Section 3. <strong>Hierarchy</strong>: This window will display all Game Objects placed directly on the scene. Basically everything that you see in Game View, needs to be listed here. This will include non-visual and visual game objects.</li>
<li>Section 4. <strong>Project</strong>: This is your project window. Basically it show whats inside Assets folder on your disk. Everything from Game Objects, Scripts, Textures, Folders, Models, Audio, Video and etc… will be accessible from this window.</li>
<li>Section 5. <strong>Inspector</strong>: This panel will display different attibutes and properties of selected Game Objects. Depending on the selection, the appropriate attributes and components will be listed.</li>
</ol>
<h2 id="heading-noteworthy-games"><strong>Noteworthy Games:</strong></h2>
<ul>
<li>Assassin’s Creed: Identity</li>
<li>Temple Run Trilogy</li>
<li>Battlestar Galactica Online</li>
<li>Hearthstone: Heroes of Warcraft</li>
<li>Inside</li>
<li>Cuphead</li>
</ul>
<h2 id="heading-history"><strong>History</strong></h2>
<p>Two other programming languages were supported: Boo, which was deprecated with the release of Unity 5 and UnityScript which was deprecated in August 2017 after the release of Unity 2017.1.</p>
<p>Unity formerly supported 7 other platforms including its own Unity Web Player.</p>
<p>Unity Web Player was a browser plugin that was supported in Windows and OS X only, which has been deprecated in favor of WebGL.</p>
<p>Unity is the engine used by Rust, Kerbal Space Program, and Cup Head.</p>
<h2 id="heading-more-info-on-unity">More info on Unity:</h2>
<ul>
<li><a target="_blank" href="https://www.freecodecamp.org/news/the-ultimate-beginners-guide-to-game-development-in-unity-f9bfe972c2b5/">Ultimate beginner's guide to game dev in Unity</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/how-to-create-a-2d-card-game-in-unity/">How to create a 2D game in Unity</a> (video)</li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/take-a-tour-of-unity-2d/">Take a tour of Unity 2D</a> (video)</li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/how-i-made-a-2d-prototype-in-different-game-engines/">Comparison of Unity and other game engines</a></li>
</ul>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Best Game Engines for Video Game Development ]]>
                </title>
                <description>
                    <![CDATA[ In this article, we'll look at some of the most popular game engines for video game development. You'll get a brief overview of each engine so you can choose which to use for your project. Unity Probably the most popular engine, Unity, has its own ar... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/best-game-engines-for-video-game-development/</link>
                <guid isPermaLink="false">66c345864f7405e6476b0182</guid>
                
                    <category>
                        <![CDATA[ #Game Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Game Development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ toothbrush ]]>
                    </category>
                
                    <category>
                        <![CDATA[ unity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 04 Feb 2020 19:49:00 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9ccb740569d1a4ca343d.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>In this article, we'll look at some of the most popular game engines for video game development. You'll get a brief overview of each engine so you can choose which to use for your project.</p>
<h2 id="heading-unity">Unity</h2>
<p>Probably the most popular engine, Unity, has its own article <a target="_blank" href="https://guide.freecodecamp.org/game-development/unity/">here</a>. Check it out and learn all about its many features.</p>
<h2 id="heading-gamemaker-studio"><strong>GameMaker Studio</strong></h2>
<p>GameMaker Studio, previously known as GameMaker, is a cross-platform game development software primarily focused on creating 2d games using drag and drop action sequences or a scripting language known as Game Maker Language (GML).</p>
<h3 id="heading-overview"><strong>Overview:</strong></h3>
<p>GameMaker allows it’s users to create and prototype games quickly without the need to learn a programming language. GameMaker games usually consists of at least 3 things: sprites (images &amp; animations), objects (logic &amp; interactivity) and rooms (screens &amp; levels). Each game needs at least one room which is used for both menus and levels, and the transitioning between each.</p>
<p>GameMaker Studio 2 released on 2 November 2016.</p>
<h3 id="heading-supported-platforms"><strong>Supported Platforms:</strong></h3>
<ul>
<li>Microsoft Windows</li>
<li>macOS</li>
<li>Ubuntu</li>
<li>HTML5</li>
<li>Android</li>
<li>iOS</li>
<li>Amazon Fire TV</li>
<li>Android TV</li>
<li>Microsoft UWP</li>
<li>PlayStation 4</li>
<li>PlayStation Vita</li>
<li>Nintendo Switch (September 2018)</li>
</ul>
<p>PlayStation Portable and Raspberry Pi support was demonstrated but not released.</p>
<h3 id="heading-popular-games-made-with-gamemaker-studio"><strong>Popular games made with GameMaker Studio:</strong></h3>
<ul>
<li>Spelunky</li>
<li>Hotline Miami</li>
<li>Hyper Light Drifter</li>
<li>Crashlands</li>
<li>VA-11 Hall-A</li>
<li>Undertale</li>
<li>Nuclear Throne</li>
</ul>
<h2 id="heading-unreal-engine"><strong>Unreal Engine</strong></h2>
<p>Unreal Engine is a cross-platform game engine developed by Epic Games. The Unreal Engine was initially developed for the 1998 FPS title Unreal, but has been subsequently used for many thousands of commercial and non-commercial titles. The most recent version of the engine, Unreal Engine 4, targets PC, PlayStation 4, Xbox One, Mac OS X, iOS, Android, many VR systems, Linux, SteamOS, and HTML5, and the editor can run on Windows, OS X and Linux.</p>
<p>Uscript is the engine’s native scripting language, used for creating game code and gameplay events before the release of Unreal Engine 4, and was designed for high level programming. The script was written and programmed by Tim Sweeney, also the creator of another scripting language, ZZT-oop.</p>
<p>Since 2015 the Unreal Engine has been free to use, with Epic charging a 5% royalty on sales of titles produced using the engine. Epic make the majority of their codebase freely available via their Github, although source for closed platforms such as the Playstation 4 and Xbox One is only available for registered platform developers.</p>
<h3 id="heading-unreal-versions"><strong>Unreal Versions</strong></h3>
<p>Unreal has gone through 4 major revisions. Although some code is common between releases, each major version is a separate engine and projects cannot be moved between them. Within each major engine release, there are multiple minor versions.</p>
<ul>
<li>Unreal Engine 1 Released in 1998 and targeted Windows PC, Linux, Mac, PlayStation 2 and Dreamcast. The engine was written in C++, and easily moddable using the Unreal Script language.</li>
<li>Unreal Engine 2 Released in 2002 and targeted Windows PC, Linux, Mac, Playstation 2 and Xbox. The engine was written in C++, utilized the Unreal Script language.</li>
<li>Unreal Engine 3 Released in 2004 and targeted Windows PC, Linux, Mac, iOS, Playstation 3 and Xbox 360. Development is split between Unreal Script and C++, with an additional visual scripting interface called Kismet.</li>
<li>Unreal Engine 4 Released in 2015 and targets PC, PlayStation 4, Xbox One, Mac OS X, iOS, Android, many VR systems, Linux, SteamOS, and HTML5, and the editor can run on Windows, OS X and Linux. Unreal Script has been removed and replaced with dynamically reloaded C++ modules, and a more advanced visual scripting interface called Blueprints.</li>
</ul>
<h3 id="heading-popular-games-made-in-unreal"><strong>Popular Games made in Unreal</strong></h3>
<ul>
<li>Batman Arkham City</li>
<li>Mass Effect</li>
<li>Bioshock</li>
<li>Borderlands</li>
<li>Gears of War</li>
</ul>
<h2 id="heading-pygame"><strong>Pygame</strong></h2>
<h3 id="heading-game-development-with-pygame"><strong>Game Development with Pygame</strong></h3>
<p>Pygame is an open source, cross platform python library used for game development, written by Pete Shinners. The Pygame documentation and more information can be found on their website at <a target="_blank" href="https://pygame.org/">https://pygame.org</a>.</p>
<h3 id="heading-overview-1"><strong>Overview</strong></h3>
<p>The project started in the year 2000 as a result of the death of PySDL. The Pygame library version 1.0 was released after six months development in April of 2001.</p>
<h2 id="heading-libgdx"><strong>libGDX</strong></h2>
<p>libGDX is a free and open-source game-development application framework written in the Java programming language with some C and C++ components for performance dependent code.</p>
<h3 id="heading-overview-2"><strong>Overview</strong></h3>
<p>LibGDX supports both 2d and 3d game development, and is written in Java. In addition to Java, other JVM languages, such as Kotlin or Scala can be used to program libGDX games. At it’s core, libGDX uses LWJGL 3 to handle basic game functions such as graphics, input, and audio. LibGDX offers a large API to simplify game programming. LibGDX has an informative <a target="_blank" href="https://github.com/libgdx/libgdx/wiki">wiki</a> on it’s Github page, and there are many tutorials on the internet.</p>
<h2 id="heading-phaser"><strong>Phaser</strong></h2>
<p>Phaser is an open source framework for developing HTML5 games for desktop and mobile. You can read more about it on their website <a target="_blank" href="https://phaser.io/">here</a>.</p>
<h2 id="heading-minecraft-forge">Minecraft Forge</h2>
<p>If you've heard of Minecraft, chances are you've also heard of and used Forge. It allows you to mod your Minecraft game to make it do a bunch of cool stuff. Check it out in this article <a target="_blank" href="https://guide.freecodecamp.org/game-development/minecraft-forge/">here</a>.</p>
<h2 id="heading-something-a-little-different-terasology">Something a little different: Terasology</h2>
<p>An open-source voxel sandbox game!</p>
<p>The Terasology project was born from a Minecraft-inspired tech demo and is becoming a stable platform for various types of gameplay settings in a voxel world. The creators and maintainers are a diverse mix of software developers, designers, game testers, graphic artists, and musicians. We encourage others to join!</p>
<p>Source: <a target="_blank" href="http://terasology.org/">http://terasology.org/</a></p>
<p>Terasology is an open-source platform for gameplay of any kind in a voxel world. If you read that sentence attentively you can see I did not use the word ‘Game’. The reason behind that is the fact that Terasology itself is not a finished game! It’s merely a platform for you to modify yourself with your own code or pre-made modules. Do not worry though, there are loads of modules constantly developed by the multidisciplinary team.</p>
<h3 id="heading-the-open-source-spirit"><strong>The open-source spirit</strong></h3>
<p>Another really cool aspect of this game is fact that MovingBlocks (the organisation behind Terasology) participates in large events such as GCI (Google Code-In), GSOC (Google Summer of Code) and more! This makes the environment especially lively and it really empowers the community spirit. This is not some random product made by a greedy multinational, this is the work of a team. A team with a passion.</p>
<h3 id="heading-want-to-contribute"><strong>Want to contribute?</strong></h3>
<p>You too can contribute! Check out the repository here on GitHub and start hacking into the code! Make sure you format everything properly, use clear code and follow all of the repository-specific conventions! <a target="_blank" href="https://github.com/MovingBlocks/Terasology/wiki">https://github.com/MovingBlocks/Terasology/wiki</a></p>
<h2 id="heading-more-info-on-game-development">More info on Game Development:</h2>
<ul>
<li><a target="_blank" href="https://www.freecodecamp.org/news/what-is-game-development/">What is Game Development?</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/learn-unreal-engine-by-creating-three-games/">Learn Unreal Engine by coding 3 games (video)</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/the-ultimate-beginners-guide-to-game-development-in-unity-f9bfe972c2b5/">Ultimate beginner's guide to game dev in Unity</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/code-a-super-mario-brothers-game-to-learn-game-development/">Code a Super Mario Bros game to learn game dev (video)</a></li>
</ul>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Learn Unity 2D and Platformer Basics with this Overview ]]>
                </title>
                <description>
                    <![CDATA[ By M. S. Farzan If you're shopping around for a 2D game engine, you've undoubtedly come across Unity. Dipping your toe into Unity's editor can be overwhelming if you haven't had a good overview of where all of the tools live, particularly if it's als... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/take-a-tour-of-unity-2d/</link>
                <guid isPermaLink="false">66d851ffe0db794d56c01c01</guid>
                
                    <category>
                        <![CDATA[ C ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Game Development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ learn to code ]]>
                    </category>
                
                    <category>
                        <![CDATA[ unity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Sun, 17 Nov 2019 21:33:36 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9f41740569d1a4ca419d.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By M. S. Farzan</p>
<p>If you're shopping around for a 2D game engine, you've undoubtedly come across <a target="_blank" href="https://unity.com/">Unity</a>. Dipping your toe into Unity's editor can be overwhelming if you haven't had a good overview of where all of the tools live, particularly if it's also your first time using C# to write scripts.</p>
<p>In this article, I'll give you a tour of Unity's 2D features with an overview of what tools you'll need to create a platformer - or any kind of 2D game - and where to find them in the editor!</p>
<p>If you're considering Unity among other 2D game engines, take a look at <a target="_blank" href="https://www.freecodecamp.org/news/what-2d-game-engine-to-use-for-your-next-game/">this article</a> for some options.</p>
<p>And if you'd prefer a visual tour of Unity, check out this video instead (28 minute watch):</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/w2hxVVnbEFA" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<p>In this overview, we'll be using the <a target="_blank" href="https://assetstore.unity.com/packages/2d/environments/warped-city-assets-pack-138128">Warped City Unity Assets Pack</a> by <a target="_blank" href="https://assetstore.unity.com/publishers/18720">Ansimuz</a>.</p>
<h2 id="heading-overview">Overview</h2>
<p>On first glance, Unity's editor will look familiar if you've used another "all-in-one" game engine, but if it's your initial entrée into game development, it might be overwhelming.  Moreover, if you don't already have some experience working in C#, I <em>highly recommend</em> doing some tutorials using <a target="_blank" href="https://dotnet.microsoft.com/learn">Microsoft's .NET</a> or similar.  Unity has a relatively steep learning curve, and if you can come to it with some basic proficiency with C#, you'll have an easier onboarding experience.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/11/Unity-1.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>A lot of your time will be spent in the hierarchy (1), which allows you to keep track of all of your game objects in a given "scene," which is a specific portion of your game (like your "Start" menu or a particular game world in your platformer).  With it, you can nest objects under others, manage your cameras and canvasses, and navigate through all of the game objects you've created.</p>
<p>You'll want to keep organized in your project tab (2), which acts as a file system that you can structure as you see fit.  One best practice, for example, is to collect all of your assets in one folder, animations in another, scripts in yet another, and so forth.  You can also click over to the console tab if you've instructed Unity to log stuff under circumstances that you dictate.</p>
<p>When clicking on a game object, either in the hierarchy or project tab, you'll be greeted with more details in the inspector (3).  These details will depend on what kind of object you've clicked, and what you've <em>attached</em> to that game object.  If you've created an empty game object, for example, there won't be much there.  But if you've made a player character that has a a sprite attached, along with an animation controller, rigidbody2d to manage physics, collider2d to manage collisions, and a script to manage user input and interactivity, all of these will appear in the inspector for you to tinker with.</p>
<p>The rest of the real estate within the editor is taken up by the scene itself (4), which is where you'll build your game world, drop in objects and triggers, and go about your game designing.  You can click over to the game tab to see what your game actually looks like when played (and play it by hitting the "play" button), or check out the Asset Store from the safety of your Unity client.</p>
<h2 id="heading-where-to-find-things-like-the-animator">Where to Find Things Like the Animator</h2>
<p>If you've read <a target="_blank" href="https://www.freecodecamp.org/news/what-2d-game-engine-to-use-for-your-next-game/">any of my writing about game engines</a>, you've heard me whinge about Unity's 2D support being shoehorned into a 3D environment, and about how difficult it can be to locate the tools you need to get your work done.</p>
<p>Let's just say that some things are difficult to accomplish in Unity compared to other 2D game engines, but they're all still possible.  If you're attempting to access the animator, for example, you'll need to select the Window &gt; Animation &gt; Animator, which is <em>different</em> from the location of the animations that you'll painstakingly create and save in your project tab.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/11/Unity-2.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Similarly, if you want to access Physics 2D settings, by all means, click on Edit &gt; Project Settings, which are <em>different</em> from your personal preferences, located under Edit &gt; Preferences.  And if you're looking to tinker with builds, you'll want to go to File &gt; Build Settings.</p>
<p>Similarly, if you just want to create a plain ol' game object, head to GameObject &gt; Create Empty (or 2D Object if you know what you're looking for).  If, conversely, you're trying to add a rigidbody to an existing game object, you'll need to go to Component &gt; Physics 2D &gt; Rigidbody 2D (or click "Add Component" in the inspector when you have the game object selected in the hierarchy).</p>
<p>I think it's clear by this point that finding the things that you'll need to get your work done can be complicated, nested as they are within different menus.  It doesn't help that some of the tools themselves, such as the animator, are clunky compared to their counterparts in other 2D game engines, but once you get a handle on how they work, you'll find them to be perfectly serviceable.</p>
<h2 id="heading-visual-studio-and-c-scripting">Visual Studio and C# Scripting</h2>
<p>Unity supports C# for writing scripts, and you can pair it with Visual Studio for a relatively painless integrated development environment.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/11/Unity-3.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Scripts are easily accessible through the editor, and you'll have to attach them to your game objects to make your game do pretty much anything.  One fun feature is to declare a public variable in a script - say, an integer called "jumpSpeed" - and then attach that script to a game object in the inspector.  You'll see that variable exposed in the Unity editor, and can change it on the fly while your game is running to see how your changes work in action.</p>
<h2 id="heading-prefabs">Prefabs</h2>
<p>Finally, Unity leverages the use of what they call "prefabs" to streamline your workflow.  In essence, a prefab is a type of reusable object that you've created so that you can drop it in your game world again and again without the need for repeat customization.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/11/Unity-4.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Let's say that you create a monster in your top-down 2D adventure game as an empty game object, then attach a sprite, rigidbody2d, collider2d, animations, and a controller script.  You can drag that monster into your project tab to make it a prefab, which allows you to use it again and again in your game world without having to go through the whole process every time.</p>
<p>Unity has several more features that support 2D game development, some of which I cover in the video above, and it would do to watch a few tutorials on specific aspects of the editor if you're considering using it for your next game.  I'd particularly recommend brushing up on C# before tackling the editor itself, as doing so will provide for a more gentle learning curve.</p>
<p>Hope this overview is helpful for your next game!</p>
<p>If you enjoyed this article, please consider <a target="_blank" href="https://www.nightpathpub.com/">checking out my games and books</a>, <a target="_blank" href="https://www.youtube.com/msfarzan?sub_confirmation=1">subscribing to my YouTube channel</a>, or <a target="_blank" href="https://discord.gg/RF6k3nB">joining the <em>Entromancy</em> Discord</a>.</p>
<p><strong>M. S. Farzan, Ph.D.</strong> has written and worked for high-profile video game companies and editorial websites such as Electronic Arts, Perfect World Entertainment, Modus Games, and MMORPG.com, and has served as the Community Manager for games like <em>Dungeons &amp; Dragons Neverwinter</em> and <em>Mass Effect: Andromeda</em>. He is the Creative Director and Lead Game Designer of <em><a target="_blank" href="https://www.entromancy.com/rpg">Entromancy: A Cyberpunk Fantasy RPG</a></em> and author of <em><a target="_blank" href="http://nightpathpub.com/books">The Nightpath Trilogy</a></em>. Find M. S. Farzan on Twitter <a target="_blank" href="http://www.twitter.com/sominator">@sominator</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What 2D Game Engine to Use for Your Next Game ]]>
                </title>
                <description>
                    <![CDATA[ By M. S. Farzan A few weeks ago, I posted about my experience attempting to make a prototype in a bunch of different 2D game engines/frameworks to learn what makes them tick. If you're shopping around for an engine for your next 2D game, this article... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-2d-game-engine-to-use-for-your-next-game/</link>
                <guid isPermaLink="false">66d85201c1231da2ef2b5a88</guid>
                
                    <category>
                        <![CDATA[ C ]]>
                    </category>
                
                    <category>
                        <![CDATA[ construct 3 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Game Development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ game-maker-2 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Godot ]]>
                    </category>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ phaser 3 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ React ]]>
                    </category>
                
                    <category>
                        <![CDATA[ unity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 04 Nov 2019 20:47:36 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9f9f740569d1a4ca4397.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By M. S. Farzan</p>
<p>A few weeks ago, I <a target="_blank" href="https://www.freecodecamp.org/news/how-i-made-a-2d-prototype-in-different-game-engines/">posted about my experience</a> attempting to make a prototype in a bunch of different 2D game engines/frameworks to learn what makes them tick.</p>
<p>If you're shopping around for an engine for your next 2D game, this article will provide some things to consider that may help in your discernment process.</p>
<p>Do note that I'm not attempting to cover every 2D game engine out there; nor am I positioning one engine or framework over another.  These recommendations are from my personal experience using different engines and frameworks for prototyping.</p>
<p>And if you'd prefer to watch rather than read, I've created a video version of this post (26 minute watch):</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/gtKEkuhsWOs" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<h2 id="heading-react">React</h2>
<p>At first glance, you might be thinking, "<a target="_blank" href="https://reactjs.org/">React</a> is a front end framework for making interactive websites. It's not a game engine!" And you'd be mostly correct.</p>
<p>React doesn't provide native support for game development basics, like, for example, 2D physics, but it <em>does</em> handle state extremely well.  If you're already a JavaScript developer and willing to pair React with something like <a target="_blank" href="https://boardgame.io/">boardgame.io</a> to make a simple 2D game, you could potentially get a prototype up and running pretty quickly.</p>
<p>For all other types of 2D games, you'll want to look elsewhere.</p>
<h2 id="heading-unity">Unity</h2>
<p><a target="_blank" href="https://unity.com/">Unity</a> has made itself ubiquitous in the 2D and 3D game development spaces. I'd position it as an excellent 3D game engine, and a serviceable 2D one.</p>
<p>The Unity editor is fairly complex, with a lot of nested menus that take some time to wrap your head around (check out <a target="_blank" href="https://www.freecodecamp.org/news/take-a-tour-of-unity-2d/">this article</a> for a tour of its 2D features).  If you don't already have a background in C#, which Unity uses for scripting, you'll want to brush up on it prior to learning Unity, as doing so will ease your overall learning curve.</p>
<p>Unity also does a lot of things the "hard way" when it comes to 2D game development, which doesn't <em>feel</em> native compared to other game engines.  Creating a 2D game world in Unity, for example, feels like you're shoehorning a 2D plane into a large 3D space, and things like animation and pixel perfection are more clunky than in other 2D-specific engines.</p>
<p>You can make any type of 2D game with Unity if you're willing to wrestle with the editor and underlying 3D idiosyncrasies. It has extensive community support, and you'll find that working with C# is a delight. Additionally, Unity's Asset Store has all kinds of art and templates for you to download and purchase, but buyer beware: you might spend as much time rewriting someone else's code to fit your project as you would just starting from scratch.</p>
<p>Unity is, in general, free to use, but pricing becomes more complex if you want to use <em>everything</em> it has to offer (see <a target="_blank" href="https://store.unity.com/compare-plans">this page</a> for more details).</p>
<h2 id="heading-godot">Godot</h2>
<p><a target="_blank" href="https://godotengine.org/">Godot</a> is a free and open source 2D and 3D game engine that supports GDScript, C#, and even C++ and Python if you're willing to do a lot of the heavy lifting to make them work.  It supports a node-style workflow and is super lightweight.</p>
<p>If you're a) willing to invest in learning GDScript or b) already super good at C#, C++, or Python, you'll probably be fine in Godot, particularly if you like working with open source software.  If not, you may get easily frustrated, as there isn't nearly as much support for C# or other languages as there is for GDScript.  Still, Godot is a pleasant engine with which to work, and although it may not have the same pedigree and community support as something like Unity, if you're a self-starter you might feel well at home.</p>
<h2 id="heading-construct-3">Construct 3</h2>
<p>If you just want to make 2D games and don't care about programming language or subscription fees, you'll find <a target="_blank" href="https://www.construct.net/en">Construct 3</a> to have everything you need to get a demo up and running, and quickly.  All of your work will be done in a browser, using drag-and-drop tools (and custom JavaScript support if you need it).</p>
<p>Don't expect to have a meaningfully productive experience with Construct 3 for free, however.  There's a simple demo that you can try out, but impactful game development with Construct 3 is locked behind a paywall, and a subscription at that.</p>
<h2 id="heading-game-maker-studio-2">Game Maker Studio 2</h2>
<p><a target="_blank" href="https://www.yoyogames.com/gamemaker">Game Maker Studio 2</a> has a user-friendly editor that supports a proprietary language called, appropriately, Game Maker Language (GML), along with visual scripting.  It also has a lot of tutorials, great community support, and an asset store (which comes with the same caveats as Unity's, above).</p>
<p>The general workflow of Game Maker Studio 2 and doing things like animating sprites, setting up your game world, and so on, are straightforward and intuitive. GML might not be your cup of tea if you're coming from another, more widely-used programming language, and I would <em>not</em> recommend it as your first introduction to learning how to code.  It employs some of the basic concepts of programming, but not important details such as coding best practices or how to write clean code.</p>
<p>Additionally, you can try Game Maker Studio 2 with a free 30-day trial, but will need to pay to continue to use it after that time.</p>
<h2 id="heading-phaser-3">Phaser 3</h2>
<p>If you want to code <em>everything</em> and learn a lot about the JavaScript ecosystem while doing it, check out <a target="_blank" href="http://phaser.io/">Phaser 3</a> (or wait for Phaser 4, which is <a target="_blank" href="https://madmimi.com/p/4f5f0f">on the way</a>).</p>
<p>Phaser is a lightweight and powerful JavaScript framework for making 2D games.  Whereas Phaser 2 was extremely well-documented and had excellent community support, Phaser 3 is quite the opposite.  There's good official documentation and a bunch of examples (without much context around them, it must be said), and a dreadfully small amount of tutorials.</p>
<p>Expect to build everything yourself, but if you're looking for ES6 or TypeScript support, or if you <em>really</em> want to polish your skills as a JavaScript developer, you'll be able to go a long way with Phaser 3.</p>
<p>In the interest of fairness, I should mention a two other 2D game engines that have been recommended to me since I started writing on the topic: <a target="_blank" href="https://love2d.org/">LÖVE 2D</a>, which uses Lua, and <a target="_blank" href="http://www.monogame.net/">MonoGame</a>, which supports C#.  I haven't used either of them (or others, such as <a target="_blank" href="https://www.pygame.org/">PyGame</a>), and can't speak to their usefulness, but they may be worth checking out.</p>
<p>Let me know which 2D game engine you wind up using, and why!</p>
<p>If you enjoyed this article, please consider <a target="_blank" href="https://www.nightpathpub.com/">checking out my games and books</a>, <a target="_blank" href="https://www.youtube.com/msfarzan?sub_confirmation=1">subscribing to my YouTube channel</a>, or <a target="_blank" href="https://discord.gg/RF6k3nB">joining the <em>Entromancy</em> Discord</a>.</p>
<p><strong>M. S. Farzan, Ph.D.</strong> has written and worked for high-profile video game companies and editorial websites such as Electronic Arts, Perfect World Entertainment, Modus Games, and MMORPG.com, and has served as the Community Manager for games like <em>Dungeons &amp; Dragons Neverwinter</em> and <em>Mass Effect: Andromeda</em>. He is the Creative Director and Lead Game Designer of <em><a target="_blank" href="https://www.entromancy.com/rpg">Entromancy: A Cyberpunk Fantasy RPG</a></em> and author of <em><a target="_blank" href="http://nightpathpub.com/books">The Nightpath Trilogy</a></em>. Find M. S. Farzan on Twitter <a target="_blank" href="http://www.twitter.com/sominator">@sominator</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
