Unity - PvE Card Battling Game Prototype


 

This is a card battler game where player plays against computer. Players have to strategize and use their cards to defeat the enemy by reducing the enemy's HP to 0.

    All units attack the opponent on the same row, if the row of the attacking unit is empty, the damage will deal to the opponent's HP, whereas, if the row of the attacking unit have an opponent unit(s), the damage will deal to that opponent unit on the same row. 

    Players start with choosing a faction which each factions have its own deck. When the players cleared a level, players will be granted to pick a new card to be added into their deck.

Cards Variation

There are generally 2 type of cards: Unit and Item card.

Unit cards are placed on the field, whereas the item cards are used on those units on field.

Unit cards placed on the field will have a lifetime countdown. The countdown is count by the turn. if the countdown is over, the card will vanish from the field.

Card Skills

There are various type of skills: Buff/ de-buff, damage, instant elimination, healing, revive and etc.

Skills are also have different activation trigger such as on play, on dead, on afterlife and so on.

Demo Video

Development
In the beginning of the development. I had thought about creating a modular versatile game architecture so that new features can be added into the game faster and safer if the game designer have new ideas to be implemented in the project. 
    I had also tried to create a development environment for both the designer and artist to collaborate in this project. I created custom editors and window in Unity using UI toolkit to simplify the process of changing the game design in Unity, to improve the designer and artist's workflow.

Custom Editor Window for Card List
I created a custom editor window using UI toolkit in Unity. This custom window is made to improve our team's workflow. This window made the card assets highly accessible for designer and artist to make changes or create new card assets. It allows the designer to change the card stats and data, and artist can also change the card artwork easily too.
The window shows the list of cards on the left, and the data of the selected card on the right which also have a preview of the card's sprite image.
Card Editor Custom Window in Unity

Assets Creation
Most Cards assets are created from Scriptable Objects which also included assets such as Attack Behavior, Item Effects, and Skills. By making these card's attribute using Scriptable Objects, we could add new type of attack behavior, effects or skills if we want. Designer can also drag and drop these SO(Scriptable Objects) into the card's properties to add the attribute into the card (example shown in the picture above in custom editor section).
Assets creation from the Assets Menu

Game Phase Manager
Below is a script for managing the game phases. I designed a architecture so that the game phases can be changed anytime, the phases can be reordered, add or remove phases. This allows the designer to reiterate the game design faster and easier by drag and drop Scriptable Objects into the Game Phase list. Moreover, it is useful for debugging or game testing as well.
Game Phase Manager
Game Phase Manager in Inspector

Designing the Game Architecture
I planned the game architecture using Miro to visualize the structures.

Game Phase System

Card SO

Deck SO

Overview of the Game Architecture


Credit:
Chen Fun Sheng - 2D Artist
Teh Kheng Yew - Game Designer

Comments