Threadborne
second semester project at S4G
second semester project at S4G
About the Game
Threadborne is a Deck building roughlike I worked on in 10 Weeks.
The game combines the real time combat of games like vampire suvivors with card game mechanics similar to games like slay the spire.
Everything programming-related
Card game design and creation of the fusion system
Design of the core gameplay loop
Design of the player attacks
Balancing and playtesting
Enemy spawn patterns
Vision keeping
UI animations and general game feel
Features
30 Diffrent cards
The game has 15 unique cards and 15 passive upgrade cards, giving the player a wide variety of options.
Card Fusion
The player is sometimes given the option to stitch two cards into one, which copies all attributes of the original cards, multiplying the number of options available.
Tons of Enemies and Bullets
The game throws hundreds of enemies against you, and you can play powerful cards that can defeat many enemies at once.
History of Threadborne
Threadborne is actually a spiritual sequel to a small prototype game I made around early 2023 called Card Survivors. So when it came to making Threadborne, I was also heavily involved in the game design.
Especially with the strong positive reactions I received when presenting the game at Games Ground 2024, I am very passionate about working on a definitive version of this game sometime in the future.
The prototyp made in 2023
The final game made in 2024
Code and Design Example:
In this section, I will go into detail about how I designed and coded the card editor, effect system, and card fusion system.
It was very important to design an effect system that is versatile and scalable but also easy to use so that we could try out many different combinations of effects to quickly determine which types of effects are the most fun for the player. For this example, I will explain in detail how the effects of the Thunder card work.
Thunder has the extra effect that activates when you play Thunder while you have a healing potion in your hand. It will be played three times, with the downside of discarding the healing potion, essentially trading healing for more attack power.
Thunder played alone
Thunder played with Potion in Hand
Effects are split in 3 parts:
Trigger (When will the effect try to resolve)
Conditions (Can the effect resolve)
Actions (What will happen when is resolves)
Triggers are handled via enums.
Conditions and actions are handled via ScriptableObjects. This setup allowed me to split every part of a card effect into reusable blocks that can be used in other card effects.
This is the full effect of Thunder.
(The part that spawns the thunder in the game world is a separate part, which is not important for this example.)
These are the scriptable objects used for Thunder
Condition to check the number of cards in hand of a specific type
(Used to check if the player has a potion in hand.)
Condition to check the number of cards in hand
(Parent class)
Effect to discard card of a specific type
(used to discard the potion)
It was important to me that words in functions have defined meanings that are consistent throughout the entire project.
Try (Returns true if succeeded, false if not.)
Take (Returns and removes an object from a list.)
Discard (Sends a card to the top of the discard pile while also triggering its on-discard effects, if it has any.)
Ideally, every function should only do what its name implies. With these rules, I could rely on the usability of functions without needing to understand their inner workings.
The Process of discarding a card
Implementation of the Fusion System
Fairly early on, we had the idea of a card fusion system in which you can combine two cards. We had a lot of gameplay reasons for wanting to add this mechanic, but the biggest reason to add the fusion system wasn’t because of gameplay, it was because of limitations on how many cards we could implement into the game. Unlike other card games, many cards here need animations, unique VFX, sprites, AI, and hit detection so we could only create a limited amount of cards. With the fusion system (and passive card system), we were able to stretch the 15-card limited pool into a fairly complex and deep system where many cards have different use cases depending on what you fuse them with.
One unique use case, as an example, is fusing the Cats card with the Potion card. The Cats card has the extra effect of being played twice when discarded.
Now, when you play the Thunder card (which discards a potion when played), you would discard the "Cats + Potion" card, activating the effect of Cats playing themselves twice, but also healing you twice because the potion’s healing is now a part of the Cats card. This way, you turned the previous downside of Thunder (discarding potion effect) into an upside.
And of course, you could also fuse Thunder with another card to play that card three times as well.
Thunde with "cats + potion" in hand
"Thunder + cats" with "potion + cats" in hand
The actual implementation of the fusion system was fairly straight forward because, in most cases, the effects can just be stacked on top of each other. The design of the cards was the more challenging part since every card effect had to be designed to work with every other card effect, which led to a lot of limitations in what cards can do.