Design Doc

Let’s see how closely I can get the final game to look like my initial planned vision that I discuss here.

STATUS:
Please note that this is still a work in progress. Changes to this are pretty much expected right now.  I still need to test the CDL (Card Definition Language) to ensure its clear and complete for my currently designed deck and anticipated future plans.  I also need to lay out the flow of the game from start-up to shut-down. 

Single Sentence Description
A single-deck CCG (Collectible Card Game) playable by 2 or more players on the desktop or Windows Mobile.

Expected Features

  • Card Definition Language (CDL) enabling users to define their own decks using simple XML authoring
  • User modifiable deck and player images
  • Localization support
  • AI allowing a single player to play against one or more computer controlled opponents
  • Networking components allowing users to play a multiplayer game via WiFi, Bluetooth, or device swap
  • Ad-Hoc Game Server design allowing any device to become the game server (removing the need for devices to connect to a central game server)
  • Point system, allowing users to purchase power-ups with their points between games
  • Support up to 4 players (but may be limited by deck size)

Player Definition
A player has modifiable attributes: Health, Shield, Attack, Counter-Attack, and Experience. These attributes are modified during gameplay by the cards that are played.

  • Health – When this value reaches 0, the player has died and is removed from the game.  This attribute starts out at a pre-determined value, and can increase or decrease during gameplay.  A maximum value should be defined in-game, preventing users from exceeding that maximum value.
  • Shield – Defines the amount of attack that will never affect a player’s health.  If an attack comes in with a value of 8 and the defender has a shield of 3, the defender will receive a net hit of 5 points against their health.
  • Attack – This value is added to each attack played by the user.  If the player uses a card with an attack of value 5 and their Attack attribute is at 2, the sum total of their attack will be 7.
  • Counter-Attack – This value is the amount of damage that a user will do to their attacker after they have received damage.  A counter-attack cannot be blocked, and so the value of the Shield does not matter in this instance for the attacker-turned-defender.
  • Experience – During gameplay, a card played may increase the player’s Experience.  When the Experience hits a pre-determined value, their level will increase which result in increasing the base values of their Shield, Attack, and Counter-Attack attributes.  Increasing levels can potentially have other side-effects as well (like automatically curing poisons).

In addition to these card modifiable attributes, each player has a point counter keeping track of their earned points. 

Player Profile
Every player in the game must choose a player profile to represent themselves in-game.  For further end-user customization, users can modify and/or create player profiles via xml authoring.  At its core, this profile defines images that should be displayed when the player reaches specific percentages in their health.  To visualize what this would mean, think of the “head” in Wolfenstein 3D that displayed damage as your character was hurt.

Cards
A game card is a collection of Modifiers and Effects.

  • Modifier – alters the value of a single attribute of one or more players
  • Effect – Impacts the gameplay of one or more players in a way that doesn’t directly impact one of their attributes.

The Modifier and Effect have many similar card attributes:

  • Probability – the likelihood that this change actually happens
  • Value and ValueType – Describes the quantity of the change
  • ValueType – The way that the value should be interpreted
  • Absolute – The attribute should be set to this exact value
  • AtLeast – The attribute should be set to this exact value, unless it’s already at a higher value
  • Relative – The attribute should change by this amount
  • Percentage – This one’s impact is a bit different.  This will multiply the final attribute by this percentage.  So, if it’s a Modifier for Attack, then we compute the Attack value by the value of the card plus the value of the Attack attribute, and that final sum will be multiplied by this percentage.
  • Impact  - ?????
  • Longevity – How long does this change remain
  • LongevityType – How should that Longevity be interpreted
    • Turn – Counts when the player gets to do something.  This would happen every round unless the player’s turn has been skipped
    • Round – Counts when the play has moved completely around the “table” a single time
    • Attack – Counts when a player plays a card that contains an attack
    • Defense – Counts when a player has to defend themself
  • Target – Who the change happens to (Self, one opponent, all opponents, everyone)
  • Reverts – Does the change revert itself when it expires.  In other words, should this +10 to attack only last for 2 turns, or should it remain after the card expires?
  • Modifier
    A modifier must additionally keep track of which Attribute that it is affecting, in addition to the common card attributes.  It must also track that type of modification it is doing:

    • Magic – Signifies something special (like rengerating health)
    • Power-Up – Change caused by a power-up
    • Experience – Change caused by a level change in experience
    • Poison – Health change due to a poison
    • Health – Health pack for additional health
    • Attack – Striking against an opponent
    • Curse – Negatively affect an attribute of a player (like causing the shield to always be 2 points less than it should be).

    Effect
    The idea of the effect is that you get to impact the gameplay in a way that isn’t directly changing an attribute’s value (which is the usual way that the gameplay is affected).  Examples of planned Effects:

    • Skip Turn – User doesn’t have opportunity to do anything
    • Paralyze – User must play a card as normal, but the card is immediately discarded
    • Clear Modifiers – Used to remove modifiers from a player’s attributes.  This would be the generic concept of a poison/curse cure, or a way to remove a player’s regenerating health potion
    • Show Cards – Show’s the target’s cards to a specific set of players
    • Hide Cards – Hide’s the target’s cards from a specific set of players

    Points and Power-Ups
    A single match is a collection of games.  During each game, players will receive points based on the quality of each of their attacks.  A game ends when only one player remains.  After a game is over, if more games remain in the match, players will have the ability to “spend” their points to purchase power-ups that can be used in future games (but only within the same match).  In the first version of CardFu, the types of power-ups will not be player-modifiable (unlike the game deck).  That is beyond the scope of the first version.   It is a feature that will be considered for a future release.
    Examples of power-ups that can be purchased (names subject to change):

    • Attack Power – guaranteed +2 on every attack (cannot be purchased with Counter-Attack Power)
    • Counter-Attack Power – guaranteed +2 on every counter-attack (cannot be purchased with Attack Power)
    • Reincarnation – If you die, this brings you back to life with some predefined health (say 30 hp)
    • Invisiblity – Prevents you from being seen/attacked for two turns, provided you don’t attack (if you attack, you can be hurt from a counter-attack)
    • X-Ray Vision – Allows you to see the current cards of a specific opponent.  Does not impact newly drawn cards.
    • Health Pack – Recovers some predefined amount of health (say 20 hp)
    • Magic Medicine – Makes player immune to poison and curses

    Penalty
    An optional round limit can be set per game (say, 20 rounds of gameplay).  If this limit is reached and the game is not yet over, a penalty can be imposed against the remaining players.  This penalty will essentially be a negative health modifier (meaning, it will reduce the player’s health).  The penalty can increase as each round limit is exceeded (e.g. A 20 round limit might be defined.  If exceeded, begin imposing a -1 hp penalty.  If the game still continues for another 10 rounds, increase the penalty to -2 hp, etc…).  Loss of health via a penalty will never kill a player.  If the penalty exceeds the player’s remaining health, the health will remain at 1hp.

    Gameplay
    Each player must always have 5 cards in their hand.  On each turn, a player must play a card, and only one card.  If the player wants to user a power-up, they can apply one or more power-ups prior to playing their single card.
    Order of changes detected by game:

    1. Experience point balance changes, and the resulting change in the base values of the attributes should the player’s level change as a result
    2. Modifiers to Shield, Attack, and Counter-Attack
    3. Penalty imposed against player
    4. Attack the opponents
    5. Counter-Attacks from the defender
    6. Health increases
    7. Health decreases (via poison, etc…)