Game Development


Learn To Code Trading Card Game Battle System With Unity 3D

A comprehensive and easy to learn guide to crate a trading card game battle system with Unity 3D.

4.49 (1033 reviews)



15.5 hours


Oct 2019

Last Update
Regular Price

What you will learn

Create beautiful custom cards and creatures for your game

Show enlarged previews when you are hovering over a card or a creature

Enable card rotation and design a custom card back

Highlight cards that your players can play and creatures that can attack this turn with glows around their border

2 different ways to drag cards in trading card games: just dragging cards onto the battlefield area to play them, or dragging onto a specific target to cast spell or attack with creatures

Show targeting gizmo with an arrow and a target icon when attacking with creatures or casting spells

Create adaptive layouts for your player’s hand and table areas. We are not using pre-determined places for cards. All the creatures and cards will always remain centered

Make a Hearthsone-styled mana pool with 10 mana crystals. Players start the game with 0 mana and in the start of each turn they will receive 1 mana crystal

Create framed Hero portraits and round Hero Power buttons

Create a burning rope that will measure time left until the end of the turn

Create decks with variable thickness. The more cards your deck contains – the thicker it looks

Separate Visual and Logical part of your game (aka server – game client)

Create a simple system to manage, edit and create new cards, creatures or Hero classes

Manage turns in trading card games

Establish the most basic game mechanics of playing creatures and attacking opponent’s creatures or opponent’s Hero

Create custom effects for your spells and Hero Powers

Create diverse creature effects that might be triggered: when the creature enters the battlefield, when the creature dies, when the turn starts or ends or even when certain events occur in the game (like: when your Hero takes damage, draws a card, etc…)

Determine “game over” conditions and show some end game animations or events

Create a simple computer AI that will control opponent’s Hero


This course provides a full guide on trading card game battle mechanics.

The material in this course is divided into 6 Sections. Section 1 features a short introduction to the course. 

In Section 2 we will focus on making cards. We will use Unity UI features to create both faces and card backs of our cards. Spell cards and creature cards will be designed a bit differently. Creature cards will have distinctive oval frames around creature images. You will learn how to rotate cards that are made with Unity UI properly. We will do some scripting to make a simple system that will allow us to create and edit our cards as assets in Unity.

In Section 3 we will continue working on different visual elements: mana pools, rope timer, hero portraits, end turn button and so on. By the end of this Section we will assemble a visual layout of our Battle Scene that our players will see in the final version of the game. We will also explore several scripts that will help us drag cards in the game, organize and display enlarged previews of cards and creatures.

In Section 4 we will prepare our project for bringing in all the scripts that will handle Logic in our game. We`ll start by taking a look at a small slideshow that will explain the relationship between Visual and Logical parts of our game. We`ll add several new Visual features – Damage Effects that will display amounts of damage taken by creatures or heroes in the game, a simple system that will show messages in the start of each turn and targeted dragging for spell cards and creature attacks.

Section 5 is the most complicated Section of this course in terms of scripting. We`ll bring all the remaining scripts, including all the Logic scripts into our project. Our goal for this Section is to establish the most basic game mechanics of drawing cards from deck, playing creatures onto the battlefield and attacking either our opponent`s hero or his creatures. We will also discuss turn management and test our burning rope timer.

In the final section of this course you will learn to create spell and creature effects for your game. Creature effects might be caused when the creature enters the battlefield, when the creature dies, when the turn starts or ends or even when certain events occur in the game (like: when your Hero takes damage, draws a card, etc…). We will also take a look at a simple AI script that will control our opponent`s behavior and let us play this game against the computer.

I have tried to save the project that I was working in as often as I can so that you can easily pick up the material from any point in this course. All these assets that are used to create cards, creatures, hero powers and other game elements are free for commercial use and available for download with this course. You can find detailed info on art and scripting assets and links to some other useful resources in the Credits file that you can download with this course.


Learn To Code Trading Card Game Battle System With Unity 3D
Learn To Code Trading Card Game Battle System With Unity 3D
Learn To Code Trading Card Game Battle System With Unity 3D
Learn To Code Trading Card Game Battle System With Unity 3D



Introduction to This Course

How to Watch This Course


Introduction to Section 2


Creating a Card Template with Unity UI

Simple Decorations

Creating a Face Side for a Spell Card

Creating a Card Back and Adding Beautiful Text Outlines

Card Rotation

Editing Cards with Scriptable Object Assets

Applying the Visual Appearance from a Card Asset onto a Single Card

Card Glow and Creature Cards – Part 1

Card Glow and Creature Cards – Part 2

Battle Scene Visual Layout

Introduction to Section 3

Simple Dragging Script

Advanced Dragging Script

Creating Card Previews – Part 1

Creating Card Previews – Part 2

Making a Creature Game Object

Making a Mana Pool – Part 1

Making a Mana Pool – Part 2

Making Player Portraits – Part 1

Making Player Portraits – Part 2

Creating a Burning Rope Timer

Creating a 3D Deck with Variable Thickness

Assembling the Battle Scene Layout

Organizing Cards and Creatures

Preparing To Introduce Logic Scripts To Our Game

Introduction to Section 4

Separating Visual Presentation from Logic

Introduction to Command System

Command System – A Use Case Scenario

Applying Visual Looks from a Card Asset onto a Creature

Using Character Assets to Create Class Cards

Applying the Info Stored in Character Asset to Player's Portrait

Damage Effects – Part 1

Damage Effects – Part 2

Targeting System – Introduction

Targeting System – Troubleshooting and Testing

Message Manager

Basic Game Mechanics

Introduction to Section 5

Adding All the Remaining Scripts

Assembling Game Logic and Deck Shuffling

Dragging Scripts and GlobalSettings.cs

Turn Manager Script

Rope Testing and Unity Events

Card Scripts and ID System

Creature Script

Configuring Player Areas

Table Script

Hand Script

Command System – Scripts of Individual Commands

Decision Making in Dragging Scripts

Testing Card Draw

Testing Playing Creatures and Dragging Attack Target

Testing Start Game Sequence

Testing All the Basic Game Mechanics

Advanced Game Mechanics

Introduction to Section 6

Spell Effects and Hero Power Effects

Creature Effects – Part 1

Creature Effects – Part 2

Game Over Condition and Restarting the Game

Computer AI

Player Class: Detailed Overview – Part 1

Player Class: Detailed Overview – Part 2


Bonus Section / Downloads Section


Saved Projects

All Scripts


Additional Materials


Renaud26 September 2020

Could benefit of more preparation upfront but it covers interesting aspects (especially Card Asset and Commands)

Fu23 September 2020

Great course. Word of warning: if you are an absolute beginner, I would recommend taking a basic Unity/C# course prior to this. Because it isn't a code-along, you need to be able to read and parse pre-made code. Even though the code was provided and not written during the course, I learned A LOT of intermediate/ advanced C# implementations. If you have any sort of inkling for creating a card-based game, this is an excellent course to grab inspiration and general code architecture.

B12 September 2020

Almost everything is well explained, good for c# and unity beginners like me. You come across several ways to use c# that are interesting. The final 'product' does a lot of things well and you do gain enough understanding to then work on it and make it a bit different and into something you were looking for. Overall I've learned a lot from it so I would recommend it, for beginners especially.

Luis10 September 2020

A very well explained course, with scheduled examples and easy to follow (you must know Unity). It is very recommendable for programming card game and every mechanics of it. Many thanks.

Alex22 August 2020

He does things that later he does not explain how he did them. It shows many things that are already done and does not explain how it got there.

Luke30 January 2020

Well, I imported everything correctly but nothing worked properly, and not only that, but just explaining your old code instead of doing it alongside you is quite bad, :/

Timothy23 January 2020

Doesn't really teach you since like 90% of the scripts are pre-written. The best courses are the ones that explain the logic then usher you to attempt it. This is mostly spoon fed material just demonstrating how its done rather than teaching.

SHAman2562 January 2020

I am really enjoying this course. I have immediately applied all of the techniques to my own game. Also, it covers a type of game design that is very different from other basic tutorials. I recommend for the beginning Unity student who is moving into a bit more "intermediate" design ideas.

Dominic3 November 2019

I rly love this course. It helps me a lot with my own cardgame project and the author answers every question very fast and detailed.

Mark28 October 2019

This is a useful reference course. Originally I planned to use this course as something I would build and then modify to develop my own product, however I now plan to build my game using other material and use this course to pick and choose material to fill knowledge/functionality gaps. I would strongly advise anyone else using this course to be running a word document while doing the course and pause often to write down notes of anything they are unsure about. I have a full list of things to research further. I appreciate the effort made to develop this course, thank you.

Sindhu21 July 2019

It is hard to follow the scripts and understand the flow of the game till now. But the tips about making good cards is good.

Canberk13 July 2019

This course is truly more than what I expected. I took a half star off only because there are gaps throughout the course that will take you to dive deep inside and search the internet massively. Which makes it not a complete beginner friendly. However, I must highlight that this is what programming is all about it pushes you to troubleshoot which we have to do a lot if we are planning to take these projects into a reality. Thus, this helped me develop skills such as googling effectively and learning C# even more. I would like to thank the lecturer for his efforts and time and making such a feasible course and explaining as much as he can throughout each and every courses. Besides, he fast forward stuff like copying multiple things which have been done before and quickly reviewing them so that you can do it on your own as well and buying us all some time.

Jason26 April 2019

Little tougher to follow when the scripts are pre-created and then added/explained when they're needed. Would have been easier to digest for me if the format discussed the functionality needed and then implementing solutions.

Joon9 April 2019

https://www.udemy.com/learn-to-code-trading-card-game-battle-system-with-unity-3d/learn/lecture/5755808?start=165 https://www.udemy.com/learn-how-to-make-trading-card-game-menus-with-unity-3d/learn/lecture/8261924?start=15#overview In all honesty; I don't know how any of these courses could fit anyone's needs. The title is learn to code trading card game battle systems with unity 3d. He has you start by creating a 2D template. (First issue on why I do not believe this teacher is a little confused) Secondly, you're not learning to code by grabbing scripts from something. I saw a response where he said it would take 70+ hours to teach someone how to code. WELL, guess what? You're trying to charge $300 for a course. Whether it's a severely discounted price or not, you're not producing the cost value. Additionally, the title is LEARN TO CODE. If you can't teach me how to code then it's a waste. My third point issue, a tie in with the second. When you copy and paste portions of line; you can remember why you're doing it. After you type out the line once, it becomes "saved" somewhere in your brain. When you copy and paste that line, you know why you're doing it. If you copy and paste a script, you've never typed ANY of it, none the less you don't know why you're doing it. There's NO LEARNING involved with copy and pasting a full script like this. To help you better market without getting requests for refunds your titles should be. learn how to copy and paste scripts for MY SPECIFIC trading card game battle system with no full understanding of how it functions in Unity 2d learn how to copy and paste scripts for trading card menus for MY SPECIFIC Trading Card Game with no full understanding of how it functions in Unity 2d There are far more issues than these three; but I have NEVER seen anything quite like this. It almost feels like he had someone else make this "game" picked a few pieces here and there, made a teaching curriculum out of it and is teaching HIMSELF how it works. Also, the "finalized" product at the end of the game menu one, doesn't even work. Also, I'm posting this on the reviews, hopefully others read this before they get there. Just a heads up, when you're teaching someone how to code or really anything for that matter. Your goal is to give them tools to work with later. You're giving them cookies and asking them to make some on their own. You've provided no ingredients or measurements to this recipe; you just gave an over all product. If I wanted something like this, I would've outsourced my code for $40 USD to get fixed in another country.

Hussein14 February 2019

I like the detailed explanation from A to Z of the card game. I would prefer if you could code along with the course instead of just reading the code. I feel lazy when the code is written, hence I just watch instead of coding.


Expired6/30/2019100% OFF
Expired9/22/2019100% OFF
Expired12/21/2019100% OFF
Expired1/28/2020100% OFF
Expired2/10/2020100% OFF
Expired1/13/2021100% OFF
Valid1/20/2021100% OFF


Udemy ID


Course created date


Course Indexed date
Course Submitted by

Android PlayStore
Apple Appstore