top of page
  • itchio-textless-white
  • Youtube
  • White LinkedIn Icon
  • GitHub-Mark-Light-120px-plus
stsc_background_5_edited.jpg
Retro-engineering of Slay The Spire in Unity
Card Configuration

As a design & development challenge, I reproduced the core gameplay and game feel of the roguelike deck-building RPG Slay The Spire, with customizable and designer-friendly game systems (cards, items, enemies & levels), state machine-based turn logic for enemies, and a procedurally generated map.

While I did all of the development myself, most of the game assets come from the Unity Asset Store; they were carefully selected to form a coherent whole and enhance the user experience, while respecting the intentions of the original game.

Featuring:

  • 32 cards, 25 items, 9 enemies (4 normal, 4 elites, 1 boss)

  • 7 dungeon room types: Enemy, Elite, Boss, Treasure, Merchant, Campfire (shrine), Event (ritual fire)

  • Card actions: grab, release, focus with tooltips, target (curvy arrow), draw, discard, create, destroy, upgrade

  • Combat actions: attack, block, heal, apply generic buffs & debuffs (triggered or passive effects)

  • Sounds: ambience & combat music, card actions, combat actions

stsc_cards_edited.jpg
Card Configuration

The current 32 cards are defined using ScriptableObjects, enabling easy customization of parameters in the inspector.
 

The card configuration system allows designers to:

  • combine different effects (ex: deal damage, gain block, heal, draw, discard...)

  • define conditions for effects to occur (ex: last card played was a "skill" card, current health is above 50%)

  • define complex repetition rules (ex: repeat effect for each card discarded this turn)

 

Card text and tooltips are automatically generated based on the card's effects.

stsc_background.png
Enemy State Machine

Enemies have an internal state machine to handle their turn logic. Each state of the state machine defines a combination of attack, block, buff and debuff that the enemy will use on its turn. States can transition to other states randomly or based on specific conditions.

In this example, the enemy cycles through the states on the left until its health drops below 50%, making it transition to the states on the right.

stsc_background_2.png
Procedurally Generated Dungeon Map

The dungeon map is based on a jittered grid, on which are placed rooms of different types linked by paths (dotted lines). The player starts in a room in the bottom row, and moves up until they reach the final boss in the top row.

The map generator allows designers to define the global room distribution, as well as specific room types for each floor. This allows for example to have only "Enemy" rooms in floor 1, and only "Campfire" rooms before the boss, while maintaining specific proportions for each room type (ex: 40% of rooms are "Enemy" room).

The generator can also control room repetition (prevent specific room types from occuring in successive rooms), and tries to offer different room types at every crossroad.

Card Configuration

The current 32 cards are defined using ScriptableObjects, enabling easy customization of parameters in the inspector.
 

The card configuration system allows designers to:

  • combine different effects (ex: damage, block, heal)

  • define conditions for effects to occur (ex: last card played was a "skill" card)

  • define complex repetition rules (ex: repeat effect for each card discard this turn)

 

Card text and tooltips are automatically generated based on the card's effects.

bottom of page