2024Boolean / Game logic

Card-based RPG system

Technologies

Vue.jsPiniaGame logicTurn-based state

Features

Turn-based combat system with centralized state and controlled probability

Overview

Development of a turn-based card-based RPG arena designed to combine ease of use with strategic depth. The player builds a setup by selecting hero, weapon, and powers, then faces a PC-driven turn-based combat system built around resource management, probability, and game state. The goal was to design a coherent and predictable system while introducing variability without compromising balance.

Role

Designed the game mechanics and built the application, focusing on game design and balance, application state management, turn-based combat logic, and probabilistic system implementation.

What I did

Implemented the character build system by combining hero, weapon, and powers, with dynamic calculation of overall stats. Designed and built the combat system with alternating player/CPU turns, cards for attack, defense, and buffs, plus HP and win/lose conditions. Introduced a controlled variability layer with calibrated random events such as critical hits, dodges, and bonuses or penalties. Implemented a basic CPU decision-making logic based on priorities and available actions during each turn. Structured game state as a single source of truth, handling current turn, ability cooldowns, active effects, and event logs.

Problems solved

State management in turn-based systems

Turn-based games are prone to issues like duplicated turns, repeated actions, and inconsistent state. State was centralized and managed through explicit transitions between action selection, resolution, state updates, and turn switching.

Balancing randomness

Too much randomness makes the system unpredictable and less strategic. Probability was introduced in a controlled way to preserve the importance of builds, add variety to matches, and keep the system readable.

Handling combinations and edge cases

Combining hero, weapon, and powers can create inconsistencies, unexpected stacking, or out-of-range values. Limits and validation rules were defined to keep the system stable and predictable.