Two Cat Games

presents

Perang: 3 Card Battle

Blueprints image background

Blueprints

Perang: 3 Card Battle was originally created in Java and was entirely text based. I used the code from the Java project to baseline what I needed for the Unreal Engine edition. I'll be posting the Java code here along with screen shots of the Unreal Engine Blueprints.

Perang: 3 Card Battle was originally created in Java and was entirely text based. I used the code from the Java project to baseline what I needed for the Unreal Engine edition. I'll be posting the Java code here along with screen shots of the Unreal Engine Blueprints.

Choose a class below to learn about

Card Card Slot Deck Board State Machines
Project Outline Button Widgets Level Database

If you are unfamiliar with Java classes, you can think of a class as a real-world object such as a card or ball. They each have a set of attributes that define what they look like and how they interact in the world. A ball can be thrown, bounced, caught, etc. A card can be dealt, flipped, burned, etc. A Java Ball Class would have weight, density, size, texture, etc. When an instance of the Ball Class is made, you set those attributes based on what you want it to do such as be a baseball or be a bouncy ball. Both are balls but have very different attributes.

In Unreal Engine, a Blueprint is similar to a Java class in that it defines an object but is created with a visual interface and is referred to as a Blueprint or a Blueprint Class.

Project Outline

  • Create a card game for two players, one human versus one AI.
  • The Full Deck for the game should have a finite size.
  • The human player's deck should start low, no less than 5 cards and have the ability to dynamicaly grow or shrink.
  • There should be a way to view the player's deck.
  • There should be a way to view portions of the Full Deck.
  • Each card will have six integer values, 3 attack values and 3 defend values, along with a name and type.
  • Each card's attack and defend values are directional: left, center, and right.
  • Attacks use a greatest value wins approach comparing an attack value versus a matching defend value.
    • Center attacks will match to center defend values.
    • Left attacks will match to right defend values.
    • Right attacks will match to left defend values.
    • This is illustrated on the how to play page.
    • How to Play
    • Equal Attack and Defend values will be randomly modified to determine a winner with the defending value having an advantage.
  • The game should have three phases: Pick Cards, Battle, and Excange
  • Pick Cards Phase
    • Five cards are randomly drawn from the Player's Deck.
    • The Player chooses 3 cards to place on their side of the Battle Board.
  • Battle Phase
    • On the Battle Board, each player places 3 cards on their side to fill the left, center, and right card slots.
    • A coin flip will determine order of play.
    • All cards will start face down.
    • Cards are flipped face up as they are used for attack and defense.
    • Play continues until one player's cards are destroyed or both players have a single card with no valid attacks remaining.
  • Exchange Phase
    • The winner is given the chance to take a card from the loser.
    • The player can only have one of each card.
    • If there is a tie, there is no exchange.
    • There should be an option to play again or quit the game.

Choose a class below to learn about

Card Card Slot Deck Board State Machines
Project Outline Button Widgets Level Database