Boy-Man: Descent into the Pit of Sorrows Project Page
Project Brief provided by Client Lucid Games.
Core Goals
• Design and Implement Systems for the following Mechanics:
• Card System.
• Enemy Spawn System.
• Enemy AI.
• Enemy Intention System.
• Turn Based System.
• Flee System.
• Rewards System.
Gameplay Video
Focus:
Create a game following Lucid Games client brief.
Date:
2022 - 2023.
Engine:
Unity.
Language:
C#.
My Contributions
Role: Lead Programmer
During this Team Project I was happy to be apart of, we were given a brief by Lucid Games and I was Honored to be given the role of Lead Programmer, this led me to Research into similar game to Implement the following Mechanics for Boy-Man: Descent into the Pit of Sorrows.
Card System
Research
My first task as Lead Programmer was to create a card system which would give each character in the players party their own Deck of Cards each with their own type of abilities whether that's Damage, Heal etc.
I first started by Playing a Favorite of mine which was Slay the Spire, a great Card Game with a similar Card System I wanted to recreate.
After hours of constantly playing the game to get a feel and to try determine how certain features where implemented, I started Prototyping a Quick Card System of my own.
Prototyping
I first started by adding a set of 5 cards using the Template Sprites the Artists Provided to work on giving the cards their own abilities.
To implement these in a Modular Way I decided to use Scriptable Objects which would hold all the information needed to make a workable card.
After testing each card to make sure they worked with their abilities, the Artists had finish most of the art for each card so I implemented them in and Started working on giving the character a Deck.
Development
Quick Diagram
Before starting the Script for the Player Deck I started writing out everything it needs to work from how many cards are in their deck to how many cards will be in their hand during battle to what happens once all cards are discarded etc.
Declaring Variables
After this stage I went into the development of the deck which I started by using several Arrays, 1 for the players deck, 1 for the players hand, 1 for the players discard pile and another for the spawn position for each card when they are drawn out.
Draw Cards Method
I then created a method which allowed for an integer input to determine how many cards could be drawn, it then used an IF Condition to check if the player Deck size was greater than the amount inputted which if true drew the cards.
If this came back as not true which means there wasn't enough cards in the deck to be drawn out then it would reshuffle the discard pile back into the player deck and draw out the new cards.
Discard Pile Method
I then created a Method to handle putting the cards into the players discard pile when necessary by passing in the card when calling the Method.
Testing
After implementing the Deck and Cards I spent an Hour just testing to make sure everything worked before moving onto my next task which was to program an Enemy AI to attack the player.
Enemy AI
Research
When we were given the brief by Lucid Games, We noticed that they wanted the game to have Turn Based Strategy, so before starting any programming I started looking into games which implemented Turn Based Strategy.
Both Slay the Spire and For the King implemented Turn Based Strategy into their Combat System Which already seemed to be the direction we were heading in term with our Combat System.
At first I was wondering how I was going to Implement my Deck/Card system into the enemies when I realized both games have something in common apart from an intent system in Slay the Spire the player doing know what cards/abilities the enemies have got which means I could just create an Attack Pattern in the background for the enemies to use on the players.
Development
Attack Pattern
I started by Creating a Scriptable Object to handle the Enemies Attack Patterns.
it uses 3 Variables to work, an integer variable to make the enemies Attack feel more real by Simulating that the enemy is thinking of what ability to use, an Enum variable to determine the target of their ability whether its the Player, Enemy or their Party, and an Array to hold each ability the enemy is going to use on each of its turn.
By implementing the enemies Attack Pattern this way made it Modular which proved Helpful for giving each enemy type their own unique Attack Pattern.
Flee System
Research
one if the Achievables in the Lucid Games Brief was that when it came to Combat one if the options given to the player should be to Run/Flee from the battle which reminded me of the pokemon games which also allowed for the player to run.
Also during the development of Boy-Man, my roommates and I we playing Dungeons and Dragons once a week which was good as it gave the idea rather than allowing the player to flee whenever they wanted, there had to be a chance that they failed to flee so the team decided to implement a virtual D20 dice and the player would need to roll a 15 or higher to succeed.
Rather than the player failing to flee and then being able to take their turn I felt there had to be some sort of punishment, so after some thinking the best idea I could come up with would be to make the player lose their turn.
Again as a way to help me visualize it better I created a quick diagram of how the flee system should work.
Development
Variables
As always I started by declaring the variables need to make the system work which included a variable for the Dice Sprite which would be displayed on the screen, an Integer which would allow me to quickly change the pass roll if needed, a Sprite Renderer for the Dice and an Array of sprites for each face on the D20 Dice.
Flee
I then created a method which would manage the Flee which works by deactivating the cards in the current players hand, it then uses a Fixed Loop to change the Dice Face randomly, then it randomly choose a number between 1 and 20 and then checks if the number is greater or less than the pass roll.
If it succeeds then the players team can flee but if it fails then the players teams stays in the battle and the current characters loses its turn.
Rewards System
Research
One of the requirements if time permits was to add an NPC to allow the player to buy weapons and or potions but due to time restrains there wasn't enough time to implement a new NPC so I done some research and remembered Slay the Spire had a rewards system for when you win a battle so I knew I could quickly Implement a quick system to work with giving the player rewards.
Development
The way the rewards system works is each character in the party has their own button which can be used to claim a new card as a rewards, After clicking on their button multiple cards will appear allowing the player to select a new card to add to their deck or skip and continue without upgrading their deck.
but why Skip? well this was a design choice which would be inevitable as the more cards added to your deck the lower chance of a card you really want appearing, so it gives the player a choice on whether they will risk it or just continue with their original cards.
Enemy Spawn System
Development
Battle Starter
The Enemy Spawn System works by using 2 methods, 1 called BattleStarter which is used for playing battle music, calling the Spawn Enemy Method, and activating the Turn Based System.
Spawn Enemies
The second method used is called Spawn Enemies which like the name states is in charge of spawning the enemies in the battle.
It works by getting the players spawn position and using a spawn distance variable to set how far the enemies will spawn from the player, it also uses an Array to know what enemies will spawn, the more added the more it will spawn.