Battle System and Level Up


This update saw the implementation of a basic battle system with some visual updates to assist with giving details on statistics of both the player and the enemy. It also included a basic level up system. 

The following were required for the implementation:

  • UI components
  • Characters - Player and enemy including Sprites and "Character" component
  • Enemy Selection Randomisation
  • Battle "System"
  • Level Up "System"

The battle system I initially had a few ideas about how a battle system would work but quickly landed on the idea of using the previously created Game Manager to handle the transition to a battle scene. Once the scene has been entered it should be able to randomise the battle dependent on what "floor" of the office the player has progressed to which would also impact on the difficulty of the battle. I wanted to create a system that would be easily adjusted such as the scaling of enemies and amount of experience/stat points received after a battle or levelling up. I am conscious that at some I will need to do some balancing of the game and thought a robust system would allow for this later on. So, my battle system would be based around the player entering the scene, the enemy being randomly generated within the bounds of my choosing, the battle commencing, which would look at the individual characters of how their attacks would take place, then finally, the after battle phase such as gaining experience and levelling up.

UI Components

In a fighting game where the player doesn't take any action during the fight, I thought it would be important to provide as much visual feedback about both the player's and enemy's character. This will be influential in the player's strategic choices throughout the game and seeing the effect of the player's stats in a battle is highly important to making stat upgrade and future item/relic selections. 

Figure 1 - UI Components

At this point in time the UI is displaying all of the variables available to a character. Future editions will only show relevant statistics to the actual gameplay. Feedback received in playtests indicated it would be good to have a better visual representation of each kind of the variables consistent throughout the game with a "hover-over" feature which gives a tool-tip of what the variable actually does which I will be implementing in future builds.

Characters/Enemy Randomisation

Tying into the variables listed above, both the player's character and the enemy's character are both created from the same class called "Character" these classes are the building blocks for the game and will undergo a number of iterations as the development progresses. At this point in time the character has all of the above variables associated to them which impact the way in which that character is able to battle. I was using naming conventions which you might see in a more corporate job key selection criteria, but, I am considering moving to more traditional gaming terms such as "HP" instead of "Determination." For example in a current battle (battle mechanics will be talked about later) a basic attack's speed is dependent on the character's "Efficiency" the higher the value, the quicker an attack will take place. I'll delve more into what each of the variables are as the battle scene develops further. Each character (particularly enemies) will have different types of attacks, these are created using the class as a template different enemy types will be coded to be constructed during gameplay. I had considered using prefabs for different enemies, but found it was quite easy to code this. This approach may change when it comes to animating, however, I'm considering universal animations opposed to animating indivdual characters as I hope to have a large variety.
Below is an example of what this currently looks like in creating the different types of enemies. These are the base figures of enemies which are chosen at random based on a few current factors including the current floor of the world, which decides which enemies can appear as well as changing the base statistics and scaling them based on the floor and whether the event is a regular battle, elite battle or boss battle.

enemyTypes = new List<EnemyType>
{
    new EnemyType
    {
        Name = "Up and Comer",
        BaseMaxDetermination = 35,
        BaseInsight = 10,
        BaseResilience = 10,
        BasePrecision = 10,
        BaseEfficiency = 10,
        BaseInfluence = 10,
        BaseFortune = 10,
        BaseInnovation = 10,
        BaseXpOnDefeat = 16,
        SpriteName = "Up and Comer"
    },
    new EnemyType
    {
        Name = "Receptionist",
        BaseMaxDetermination = 20,
        BaseInsight = 15,
        BaseResilience = 15,
        BasePrecision = 15,
        BaseEfficiency = 15,
        BaseInfluence = 15,
        BaseFortune = 15,
        BaseInnovation = 15,
        BaseXpOnDefeat = 15,
        SpriteName = "Receptionist"
    },
};

Battle System

The battle system is used to initiative a battle between 2 characters. At this point in time, it pits the player's character against a random enemy as outlined above. After it obtains the details of the 2 characters, the battle takes place automatically by checking each update if either of the character's are ready to make an attack. As the characters are intended to be very customisable, the battle system checks each frame if the character is ready to attack, if so, it initiates the attack of that particular character and assigns it the target of the opposing character. It also checks for the state of the battle by determining when either of the characters hp reaches zero, in this case it will end the battle. On completion of the battle, the post-battle instructions are carried out, the winning character is provisioned XP points and will level up if they have reached the required amount and will also transition back to the overworld for the next pathing choices.

Level Up System

The level up system is an extension of the battle system. Once the character receives the required amount of xp, they will level up and be giving stat points to spend on increasing their stats. At the moment, the interface is a temporary version for the purpose of displaying functionality. Making increases in the values on the stats page have a direct effect on the player's character which will transfer through to the next battle. This area will have some tweaks in the future in terms of using points to increase more than the point value. For example, using a point on HP might increase it by 5 instead of the single value.


Get Corporate Domination

Leave a comment

Log in with itch.io to leave a comment.