Develop Trading Card Game Battle System With Unity 3D: Part XVIII (Command System, Decision Making)

Vladimir Limarchenko, Game Developer, Unity3d and C#

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
3 Lessons (45m)
    • 1. Command System – Scripts of Individual Commands

    • 2. Decision Making in Dragging Scripts

    • 3. Testing Card Draw


About This Class

In this class/series we set an ambitious goal of developing our own trading card game with Unity3d and C#, mostly focusing on card game battle mechanics.

In this class you'll find a more detailed overview of the “Command system” that we use to transmit info about the events that happen in the logical part of our game to the visual part of the game. After we have the list of commands, we can re-produce them in certain order and show all the outcomes of our players' actions to them visually. We'll take a closer look at individual commands for:

  • Drawing a card
  • Starting a new turn
  • Updating the amount of mana crystals in the mana pool
  • Attacking with creatures
  • Showing an end turn message.

As a rule of thumb – we should use the system of commands and write a special dedicated command for every single event in logic that might have visual consequences in the game that:

  1. last for a certain amount of time (not instant)
  2. or happen instantly, but should happen in a certain order relative to other events

This class also contains a ton of useful information on decision making when we drag our cards or creatures. And we'll finally get to test the results of our work – after some minor adjustments we'll get to test card draw and control the way the cards travel from the deck into our player's hand.

With this class you will gain access to a compete, fully functional Unity project that is an example of a card game battle. The game mechanics are somewhat similar to Hearthstone: custom spells, hero powers, creature effects and so on.

Additional information:

  • The files showed in the course are downloadable from the link that you can find in the "Class Project".
  • The next class of this series will be published on 2017.01.13.