Learn How to Make Trading Card Game Menus With Unity 3D
A full guide on menus and collection management in trading card games with Unity 3D.
Note: 4.2/5 (140 notes) 32,219 students
Instructor(s): Sandor Kiss
Last update: 2019-12-01
What you’ll 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.
- First couple of Sections in this course are very beginner friendly. In these Sections we spend most of the time working in Unity Editor. So anyone can learn how to make and rotate cards, create other visual elements that are used in this game.
- In Sections 4-6 we use some advanced scripting techniques to establish all the processes that happen in our game Logic, write AI scripts and so on. So for the final lectures of this course it is best if you have some previous experience with C#. I try to explain everything that I am doing as much as I can.
- You should install the latest version of Unity3D to work on this course and open example projects that are provided with this course (to develop this game I used Unity 5.4 beta, so any version of Unity after 5.4 will do).
This course provides a full guide on trading card game menus. In the video Lectures we cover only the process of making menus, collection browsing, deck building, pack opening, etc… But the battle mechanics part is also included into the Unity project that is provided with the course. So, you`ll have an opportunity to play the game with the cards that you create yourself or even use this application as a foundation for your own trading card game.
The material in this course is divided into 5 Sections. Section 1 features a short introduction to the course.
Since the Unity project that we are developing in this course can be treated as an extension of the course that we have made earlier about card game battle mechanics, in Section 2 we will make a recap of the techniques that we use in both courses to store cards in the project. You will learn about ScriptableObjects and ScriptableObject assets and how you can use them to store cards in your project. We`ll take a look at a very useful script CardCollection.cs that will be used in the project to filter the cards in our collection and get certain sub-sets of cards that satisfy certain criteria. In the last Lecture of Section 2 we`ll do some UI work in Unity and assemble the general layout of our menu scene.
Section 3 will be entirely dedicated to buying and opening booster packs with cards. It makes sense to make the card pack opening part early in the course because it`s both the most exciting part of the project and at the same time the most isolated from other code. We`ll create a separate screen for the shop / pack opening area and explore all the scripts that make it possible to buy and open card packs. We`ll cover advanced topics like: drag and drop code for the unopened packs, using DOTween to automate movement of unopened packs and cards that we get from packs, displaying hover over effects, generating cards of certain rarity based on customizable probability coefficients. By the end of this Section we`ll have a fully functioning pack opening screen for this project.
In Section 4 we will start making the collection screen – the most complicated screen in the menus for any trading card game. Our goal for this Section is to be able to launch the game and see the cards laid out in a grid on the collection screen, be able to use pagination buttons and switch pages in the collection, be able to use all the custom filters (mana, keyword, belonging to one of the character classes) to filter the card collection and display certain sub-sets of our collection.
In the final section of this course we will continue exploring our collection screen and cover more advanced objects that are featured on the screen: crafting screen that allows us to craft new cards for one of the in-game currencies, scrollable lists with deck icons and card icons that will be displayed on the side of our deck building screen. We will discuss the topic of transferring data between the scenes and being able to use the deck that your players have pre-configured in the battle scene. In the final lecture of the course I`ll demonstrate how you can set up a game against a simple AI opponent. We saved the project a couple of times while we were making the course and you`ll have these saved projects available for download. I would recommend to download the final project first, check out how it works and start your exploration of this app from the final version. All the art assets that are used to create cards, creatures, hero powers and other game elements are free for commercial use. 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 (included in the root of the Assets folder in any of the saved projects).
Who this course is for
- This course is for trading card game enthusiasts and for people who are interested in making card games like Hearthstone and Magic the Gathering. It will help you both build your own trading card game and explore what happens behind the scenes in your favorite trading card games.
- Introduction to the Course
- Saved Projects
- Card Collection and Main Menu Layout
- Introduction to Section 2
- Storing Cards as ScriptableObject Assets: Part 1
- Storing Cards as ScriptableObject Assets: Part 2
- The CardCollection class: Part 1
- The CardCollection class: Part 2
- Making a Menu and Establishing the Scene Layout
- Pack Opening
- Introduction to Section 3
- Making the Money and Dust or Spare Parts HUD
- The ShopManager Script
- Making a Layout of the Pack Opening Screen
- Pack Opening Screen Adjustments and Overview of Dragging
- Custom Scripts for Pack Dragging and Pack Opening
- Prefabs of Creature and Spell Cards from Packs
- Connecting Everything in Unity and Testing Pack Opening
- Inspecting the PackOpeningArea Script
- Browsing the Card Collection
- Introduction to Section 4
- Collection Window Layout
- Mana Filter
- Crafting Toggle and Keyword Filter
- Character Tabs for Collection Filtering
- Character Tabs Scripts
- CollectionBrowser Script: Part 1
- CollectionBrowser Script: Part 2
- Pagination Buttons and Collection Card Prefabs
- Deck Building Screen
- Fixes for Deck Building Screen
- DecksStorage Script
- Browsing the Card Collection
- Introduction to Section 5
- Crafting Screen
- Character Selection Screen
- HeroInfoPanel and Transmitting Data to the Next Scene
- Deck Selection Screen
- Scrollable Lists of Decks and Cards in Collection
- Scripts that Control the List of Pre-Made Decks
- Scripts that Control the List of Cards in Deck
Excel Skills for Business [Coursera]
Time remaining or 880 enrolls left
|Don’t miss any coupons by joining our Telegram group|