
Begin by getting set up in Unity to start building a card combat game with C# and Unity, and refer to the completed project for reference.
Set up a new Unity project using the universal render pipeline (URP) for a 3D card battler, create a battle scene, manage packages, install 2D sprite support, and import assets.
Navigate the Unity editor layout, mastering scene view, hierarchy, inspector, project view, and game view, and learn to manipulate objects, transforms, components, and basic 3D objects like cubes.
Configure a Unity scene layout to two-by-three, set the game view to full hd, create a ground plane, position the main camera, and lay out five card frames under environment.
Create a Unity card by setting up a card model and model holder, applying a holographic shader, and adding text mesh pro UI for attack power, health, and mana cost.
Finish the card layout by adding name, action description, and lower text with color and font sizing; apply a background and character image using a mask for clean edges.
Create a new C# script named Card, attach it to the card object, and ensure the class name matches the file. Start the script: start runs once, update every frame.
Declare public int variables for current health, attack power, and mana cost in Unity, link them to TMP text fields, and convert values to strings for on-card display.
Learn how to use scriptable objects in Unity to store card data, creating unlimited cards with health, attack, mana cost, name, action description, and sprites.
Expose a card scriptable object in Unity and use a setup card function to sync current health, attack power, and mana cost to the card’s UI text and sprites.
Create a hand controller to hold cards in the player's hand above the deck, using an array and min/max positions to space them evenly.
Learn to position cards in a Unity hand by storing a list of Vector3 positions, calculating spacing, and distributing cards with a for loop.
Prevent overlapping cards in your hand by rotating each card slightly based on the minimum position rotation, then gradually move them into place as you draw or play.
Move cards smoothly to their target positions with a private target point and a move to point function updated each frame, using Vector3.Lerp and time.deltaTime, and rotate with quaternions.
Create a hover preview for in-hand cards in a Unity card game by using colliders and OnMouseOver/OnMouseExit to raise cards for reading and then restore their hand positions and rotations.
select cards by clicking to enable movement, then drag them with the mouse using a ground raycast and layer masks to place cards on the board.
Learn to return a selected card to hand in a Unity and C# card combat game, using right-click to snap cards back and reselect others.
Create card placement areas by adding box colliders to card frames and using a placement layer. Implement CardPlacePoint with activeCard and isPlayerPoint, and set up enemy points left to right.
Implement card placement in Unity by raycasting to placement points, assigning cards to valid points, returning invalid placements to hand, and updating the hand layout.
Learn to remove a played card from the hand in Unity and update remaining card positions, with validation checks and debug log errors to ensure a smooth hand layout.
Learn to display and update player mana in Unity, using a UI canvas with text mesh pro and a UI controller to reflect mana changes as cards are played.
Display a prominent low mana warning when players try to place a card without enough mana, using a red on-screen message that lasts two seconds and reinforces card placement feedback.
Create a deck controller to manage a draw deck and an active deck of card scriptable objects, using a singleton, fill and shuffle, draw randomly, and guard against infinite loops.
Learn to create and reuse card prefabs, instantiate copies from the deck, and assign card data to spawned cards. Implement a draw card to hand that spawns on T key.
Implement addCardToHand in the hand controller to move a spawned card into the active hand, update positions, and connect the deck controller via the static hand instance.
Learn to display a physical deck in Unity by moving the deck controller and drawing cards from the top into the hand as cards spawn from the deck with rotation.
Create a draw card button in Unity, style with sprite swap, connect it to a mana draw function on deck and battle controllers, and show warnings when mana is insufficient.
Draw all starting cards from the deck at battle start by adding a draw multiple cards function called by the battle controller, using a coroutine to stagger appearances.
Create a Unity card combat turn system with an enum to cycle player active, player card attacks, enemy active, and enemy card attacks, using a battle controller and switch logic.
Limit card placement to the player active phase by refining the turnover system, battle controller, and mouse interactions, ensuring cards can be selected and played only during the correct phase.
Add an end turn button to the UI and connect it to the battle controller's end player turn function, toggling button visibility to reflect the player's turn.
Add a fill player mana function in the battle controller script to auto-refill mana at the start of each player's turn, ensuring mana resets to four.
Within the battle controller, the current max mana increases at the start of each turn from four to twelve, updating the mana pool before filling to unlock stronger cards.
Draw a configurable number of cards at the start of each turn by calling the deck controller, reusing existing draw logic to grow the mana pool.
Design enemy cards in Unity by duplicating existing cards, flipping and orienting them for enemy use, and creating a prefab variant with an is_player flag to block player interactions.
Create a card attacking system in Unity using C# by managing player and enemy card points and looping attacks with a time-between-attacks coroutine in the battle flow.
Implement damage handling in Unity card game by creating a damage card function that reduces health, destroys the card when health hits zero, clears its slot, and updates card display.
Add a discard point in the battle controller, move defeated cards there, flip them by rotating the discard, and destroy after a delay; verify no assigned cards.
Learn to animate card actions in Unity by creating idle, attack, hurt, and jump animations for a model holder, wiring them through an animator controller with triggers.
Learn to preview and wire up Unity card animations, set triggers in code for attack, damage, and jump, and apply them to prefabs for dynamic, in-world interactions.
Implement enemy attack logic in the card game, using a coroutine to stagger enemy card point attacks, trigger attack animations, and apply damage to the player's health.
Implement a player health system that takes damage from enemies via the battle controller, using a damage amount to reduce health and clamp it at zero to end battles.
Learn to extend the existing health system by adding enemy health and a damageEnemy method in the battle controller, enabling enemy damage based on the player's attack power.
Show health for both players on the UI using top-left and top-right health texts, anchored to screen corners, and update them through the UI controller during combat.
Create a floating damage indicator in unity using a textmeshpro UI element that appears on damage, floats downward, and self-destructs after a set lifetime.
Deliver dynamic damage indicators for player and enemy in a Unity card combat game by cloning UI elements, updating their text with damage amounts, and activating them on hit.
Learn how to create and program your very own card combat game using Unity, an industry-standard game development program used by large gaming studios and indie developers across the world.
In this course you won’t just be learning programming concepts, but tying these concepts to real game development uses. You will have access to a course forum where you can discuss the topics covered in the course as well as the next steps to take once the course is complete.
This course has been designed to be easily understandable to everyone, so whether you’re a complete beginner, an artist looking to expand their game development range or a programmer interested in understanding game design, this course will help you gain a greater understanding of development.
At the end of this course you will have developed the ability to understand such game elements as:
A Turn-Based Card Battling System
Placing Cards on a 3D Board
Holding & Highlighting a hand of Cards
Mana Point System For Cards
Damaging Player & Enemies
Audio systems
Enemy AI with variable playstyles
Battle Select System
and much more...
The course also includes a complete version of the project to use for your own reference to ensure everything in your game works as it should!
Start learning today and let me help you become a game developer!