Make a CCG – Intro

The goal of this project series will be to create a foundation from which you could make your own Collectible Card Game (CCG) / Trading Card Game (TCG). I sent out a poll to see what everyone would be most interested in building, but the results were pretty much the same for every entry and included a bunch of games I had never played. So, I decided to base the series primarily on Hearthstone, since it is my personal favorite.

Hearthstone

If you’re not already familiar with Hearthstone, then I would recommend you get a copy – it’s free. Of course you can also check out this wiki – it discusses the game mechanics in detail and helped me have a general idea of how to program similar systems. In particular, the advanced rulebook section has a lot of relevant information I used when designing my own prototype – not that I expect to copy the original exactly, but I want to be close enough that I don’t frustrate any fans.

Hearthstone Battle Screen

Overview

This project is targeted at intermediate to advanced level users. You should expect that I will be skipping a lot of beginner level concepts like how to create a project, script or prefab. It will also focus heavily on C# programming, and will include relatively little on Unity itself. If you aren’t already comfortable with C# and Unity, then I would recommend following along with a few other tutorial projects first.

For those of you who want to follow along, we will be initially covering the creation of a single-player turn based game. Actually, at the moment, my prototype isn’t even single-player. The computer plays against itself so that I can quickly verify that everything is working. In fact, a lot of the “demo” content in our early posts may consist of nothing more than a simple unit test.

My initial prototype, while far from a complete game, shows what I have accomplished so far (and at a minimum what you should hope to build along the way):

All of the code and lesson content will be provided freely, though if you are impatient, you can check out the first prototype version right now on my Patreon page.

The first prototype serves well enough to get a general sense about how I wanted to approach the architecture, but I also didn’t want to go too far, because it’s possible that even steps like refactoring can be a good learning opportunity to write about. Much like with the Tactics RPG project, I have only implemented the battle portion of the engine. However, I plan to go further than just the battle engine because features like deck building play such an important part of a game like this. I don’t know what all we will include in the future. One new feature I definitely want to try out is unit testing. Online multiplayer is certainly possible, but not currently a focus. I may also consider other advanced features like the use of Firebase. If I do add online featues, I would like to look into the ability to actually trade cards with other players.

Getting Started

At the time of this post, I am developing the project using Unity Version 5.6.2, although it is worth pointing out that there are newer versions available (Unity Version 2017.1.0). I’d imagine that everything I do will be forward compatible but some of the features I am using like the Test Runner are relatively new so I would recommend at least using a Version of 5.6.X or above.

After you have installed a compatible version of Unity, download and open this starter project. It includes a bunch of common scripts that I have used throughout many of my projects, as well as a few assets like prefabs and sprites that we can use to speed development along. If you haven’t followed along with any of my previous projects, I would definitely suggest you poke around at what all I have included – I probably wont use all of it, but I think it’s all useful!

Summary

In this post, I introduced my next blog project – to create a CCG. I introduced Hearthstone, which will serve as the inspiration to work towards. Finally I discussed the necessary IDE requirements and provided a starter project.

If you find value in my blog, you can support its continued development by becoming my patron. Visit my Patreon page here. Thanks!

6 thoughts on “Make a CCG – Intro

    1. My goal in all of my tutorials is to help teach you to understand why I create things, not just how to build them. Naturally different games will have different mechanics that are not going to be supported simply by following this tutorial, but if you understand why I set things up, then hopefully you can adapt the code to be whatever you would like it to be. If you get stuck, you can also post in my forums for more in-depth discussion of things that go off topic.

Leave a Reply

Your email address will not be published. Required fields are marked *