194
Lectures
30
Hours

Welcome to Mobile RTS Game in Unity 2D - From Scratch to App Store! This comprehensive course guides you through the entire process of creating, testing, and publishing a real-time strategy (RTS) game for mobile using Unity 2D. Starting from scratch, we’ll build a complete game packed with practical features and polish it for release on both iOS and Android platforms.

What You'll Learn:

  • Setting Up Your Game Environment: Start by downloading free assets to create an immersive game world using tilemaps, animated tiles, and custom character designs.

  • Character Creation and Animation: Bring your game to life by animating unique units such as builders and warriors, each with their own actions and abilities.

  • Core Game Management: Build a centralized Game Manager to control essential gameplay functions, including unit selection, movement, and resource management.

  • Interactive Action Bar: Design a dynamic Action Bar UI where units have unique actions like building structures (for builders) or choosing defensive/aggressive stances (for warriors).

  • Building and Placement Mechanics: Develop a placement and building system with visual feedback for available spots. The builder unit will gather resources like wood and gold to construct towers, keeps, and train units.

  • Resource Collection and Economy: Design a resource system where builders can mine gold and chop wood, keeping your economy flowing as you defend against waves of enemies.

  • Pathfinding with A* Algorithm: Implement your own A* pathfinding to enable smooth, obstacle-free navigation across the map.

  • Enemy Waves and Combat System: Develop enemy types like goblins and demolishers, and create a spawn manager for enemy waves, making each battle more challenging.

  • Audio and Visual Effects: Build an Audio Manager to add immersive sound effects, including footsteps, attacks, and resource gathering. Use floating text to display damage, resource gains, and attack announcements.

  • Announcements and Events: Implement custom announcements to alert players to incoming waves or critical events in the game.

  • Victory and Defeat Conditions: Define game-winning and losing scenarios, challenging players to defend their King unit against all enemy waves.

  • Cross-Platform Building and Testing: Learn how to build and test your game on both iOS and Android devices to ensure smooth performance and a great player experience.

  • Publishing on the App Store and Google Play: We’ll cover all the steps needed to publish your game, including filling in required information, setting up a store page, creating preview videos, and adding a terms and policy page.

This course is highly practical and code-focused. Each feature is built from scratch—no third-party libraries—using only free, open-licensed assets. It’s designed for all skill levels, from beginners eager to learn Unity to experienced developers aiming to master mobile RTS game development.

Requirements

  • Unity Fundamentals

Course curriculum

  • 2

    Setup the Map

  • 3

    Characters & Animations

  • 4

    Game Manager & Inputs

  • 5

    Unit Selection & Movement

  • 6

    Clicking Effect

  • 7

    Action Bar UI

  • 8

    Actions

    • Build Tower Action

    • Register actions

    • Pass image to button

    • Hook function to button

  • 9

    Placement Process

  • 10

    Highlight Build Area

    • Store highlight tiles

    • Set tile color

    • Offset the position

    • Overlay tilemap

    • Clear Highlights

    • Display blocked tiles

    • Unreachable tilemaps

    • Check for blocked gameobjects

  • 11

    Confirmation Flow

    • Confirmation Bar

    • Import new font

    • Resource requirements display

    • Show confirmation bar

    • Setup Hooks

    • Cancel build placement

    • Try finalize placement

    • Finalize placement process

    • Try deduct resources

    • Display required resources

  • 12

    Building Process

    • Start building process

    • Move to structure

    • Structure unit prefab

    • Building process update

    • Proximity Detection

    • Task and State

    • Set unit target

    • Reset worker state

    • Add and remove worker from building process

    • Reassign worker to building

    • Check for construction

    • Building animation

    • Finish Construction

    • Construction Effect

    • Display click build effect

  • 13

    Pathfinding

    • Pathfiding start

    • Tilemap Manager

    • Initialize Node Grid

    • Check if tile is walkable

    • Keep center position separate

    • Find Node

  • 14

    Pathfinding - A* Algorithm

    • Manhattan Distance

    • A* Theory

    • Open and Close List

    • Get all neighbors

    • Complete Closed List

    • Retrace path

    • Get path with click

    • Follow the path

  • 15

    Pathfinding - Improvements

    • Check for the same end node

    • Fix abrupt movement

    • Reset Nodes

    • Smoothing Speed

    • Can walk at building tile

    • Update Node Walkability

    • Move to closest node

    • Turn to new position

  • 16

    Camera Setup

    • Camera Controller

    • Lock Camera

  • 17

    Enemies

    • Enemy Unit

    • Change Layers

    • Keep units in lists

    • Detect Foe

    • Detection check rate

  • 18

    Enemy Statemachine

    • Enemy state machine

    • Try attack target

    • Stop movement

    • Attack Triggers

    • Attack commitment time

    • Delay damage

  • 19

    Damage Text Popups

    • Textpopup prefab

    • Spawn text popup

    • Floating text curves

    • Playing with anim curves

    • Randomize X Direction

    • Floating text size update

  • 20

    Dead Scenario

    • Handle dead scenario

    • Destroy unit and cleanup

    • Dead Animation

    • Unregister unit correctly

    • Stop attacking when unit is dead

    • Damage flash effect

    • Multiple damage flash effect

  • 21

    Player Soldier AI

    • Handle click on enemy, and soldier

    • React to attack task

    • Simple soldier AI

    • Auto Engage in fight

    • Retreat from battle

  • 22

    Attack Stances

    • Unit stances

    • Expose stance to unit

    • Apply stances to soldier

    • Destination source

    • Fix issue with none task

    • Stop moving in defensive stance

    • Fix Ai Pawn and Attack Range

  • 23

    Focus Stance in UI

    • Focus action

    • Focus action on click

    • Focus action initialy

    • Fix flash coroutine

    • Fix player attack time

  • 24

    Separation Algorithm

    • Apply separation start

    • Separation Vector

    • Fix turn to target and action bar

    • Fix attack ranges

  • 25

    Tower & Projectiles

    • Spawn Projectile

    • Tower detects enemy

    • Move and rotate projectile

    • Deal damage with Projectile

    • Apply cooldowns to tower attack

    • Handle tower dead

    • Tower attack optimization

  • 26

    Ranged Units

    • Ranger Unit

    • Shoot arrows

    • Enemy ranger unit

    • Throw dynamites

    • Dynamite rotation and unit prefabs

  • 27

    Wood Collection - Part 1

    • Trees and Wood Storage

    • Detect click on tree

    • Display chop icon

    • Set task to chop tree

    • Unoccupy tree

    • Release tree after dead

    • Detect assigned tree

    • Chopping animation

    • Collect Wood

  • 28

    Wood Return - Part 2

    • Tree Hit Animation

    • Display Wood Resource

    • Holding Resource Animation

    • Find closest wood storage

    • Return lumber

    • Go back to chopping

    • Handle click on wood storage

    • Increase wood globaly

    • Add Resource Display UI

    • Update Resources in UI

  • 29

    Gold Minning

    • Keep and Gold Mine

    • Handle Clicks on Gold Mine

    • Refactor try get resource

    • Handle minning task

    • Try to enter mine

    • Release the worker

    • Store gold

    • Refactor return resources

    • Return gold when clicking on gold storage

    • Refactor build click checks

    • Display gold mine as active

  • 30

    Map Design

    • Work on new map

    • Map Decoration

    • Unbuildable tilemap

  • 31

    Train New Units

    • Train Unit Actions

    • Setup training hooks

    • Train Unit

    • Train units improvements

Instructor(s)

Software Engineer

Filip Jerga

My name is Filip Jerga and I am an experienced software engineer and freelance developer. I have a Master's degree in Artificial Intelligence and several years of experience working on a wide range of technologies and projects from C++ development for ultrasound devices to modern mobile and web applications in React and Angular. Throughout my career, I have acquired advanced technical knowledge and the ability to explain programming topics clearly and in detail to a broad audience. I invite you to take my course, where I have put a lot of effort to explain web and software engineering concepts in a detailed, hands-on and understandable way.

FAQ

  • How to get help when I am stuck with the course?

    Every video contains a discussion where you can create a post describing an issue. The instructor usually responds within 1 business day.

  • What to do when I am unhappy with the course ?

    Within 30 days of the purchase, you can ask for a full refund. No questions asked. Your happiness is our priority.

  • Do I need to watch every lecture of really extensive course?

    Of course not! Every lecture is committed (explained in the introduction section). You can start watching at any lecture. Just download the correct version of the project attached to lecture resources.

Eincode Access Options

  • Single Course Access

    • Lifetime and unlimited Access to "Mobile RTS Game in Unity 2D - From Scratch to App Store"

    $29.00

    Access to this course only.

    Get started now
  • Monthly Membership

    • Unlimited Access!
    • Access to any current course!
    • Access to future courses!

    $19.00 / month

    Cancel Anytime!

    Get started now
  • Annual Membership

    • Unlimited Access!
    • Access to any current course!
    • Access to future courses!

    $190.00 / year

    Cancel Anytime!

    Get started now