And no, I'm not talking about actual art. What I'm talking about is the process, or mentality behind creating a boss character that seamlessly integrates into your game. Although I do have actual art too, but I'll save that for later.
So boss characters, a popular feature to add into all types of games as an ending point to a story arc, at an important plot point, or any other reason you can think off. Bosses come with many predefined conceptions about how they should act or be presented to the player, and that's definitely not a bad thing. In fact, it makes it easier for me to work out how to approach making one such character. At this vital stage of development for my game, Strain, I have the task of creating our game's 'Boss', or 'Bosses' to be more precise. A type of enemy that will appear at the end of each level to serve as the final obstacle the player must face in order to win. Based on the preconceptions about bosses that I mentioned earlier, I know that when I make bosses for my game there are several areas that I should focus on and that I will address in the following post/s: uniqueness, power, fun.
One of the great things about bosses are that they, for the most part, differ from your average enemy. Take 'World of Warcraft' for example: the boss characters all have unique looks and attack styles. From a programming perspective there is not much that I can do about the looks department, however the attack style is something that should be considered. So I took to researching games similar in genre to my current project, namely 'Android Assault Cactus' and several bullet hell type games I found in my steam library. From these games I found that most boss characters have several attack styles that they switch between at certain intervals. It is the task of the player to learn these attack styles and react accordingly when they activate in order to win. I feel that this approach is something I know how to achieve through code, however ultimately out of scope if I need to create several unique attack styles for each boss in a game where there are endless levels and therefore endless bosses. Of course I could have a set amount of bosses and cycle between them or choose from them randomly at the end of a level, however I feel that approach strays away from the core mechanics of our game that uses genetic algorithms to create unique enemies on the fly.
Therefore my solution was thus: when the boss enemy spawns, it will absorb all other remaining enemies on the stage and gain more power based on their individual stats and then choose a few unique attack styles out of a larger pool that complement it's newly gained stats. For example, if after absorbing all the other enemies the boss has a higher speed stat then it's other stats, it may choose a charge attack style or choose to strafe around the level while firing at the player making it harder to hit.
I took to code to think of the best way to recreate this behaviour in game and my solution was as follows:
So boss characters, a popular feature to add into all types of games as an ending point to a story arc, at an important plot point, or any other reason you can think off. Bosses come with many predefined conceptions about how they should act or be presented to the player, and that's definitely not a bad thing. In fact, it makes it easier for me to work out how to approach making one such character. At this vital stage of development for my game, Strain, I have the task of creating our game's 'Boss', or 'Bosses' to be more precise. A type of enemy that will appear at the end of each level to serve as the final obstacle the player must face in order to win. Based on the preconceptions about bosses that I mentioned earlier, I know that when I make bosses for my game there are several areas that I should focus on and that I will address in the following post/s: uniqueness, power, fun.
One of the great things about bosses are that they, for the most part, differ from your average enemy. Take 'World of Warcraft' for example: the boss characters all have unique looks and attack styles. From a programming perspective there is not much that I can do about the looks department, however the attack style is something that should be considered. So I took to researching games similar in genre to my current project, namely 'Android Assault Cactus' and several bullet hell type games I found in my steam library. From these games I found that most boss characters have several attack styles that they switch between at certain intervals. It is the task of the player to learn these attack styles and react accordingly when they activate in order to win. I feel that this approach is something I know how to achieve through code, however ultimately out of scope if I need to create several unique attack styles for each boss in a game where there are endless levels and therefore endless bosses. Of course I could have a set amount of bosses and cycle between them or choose from them randomly at the end of a level, however I feel that approach strays away from the core mechanics of our game that uses genetic algorithms to create unique enemies on the fly.
Therefore my solution was thus: when the boss enemy spawns, it will absorb all other remaining enemies on the stage and gain more power based on their individual stats and then choose a few unique attack styles out of a larger pool that complement it's newly gained stats. For example, if after absorbing all the other enemies the boss has a higher speed stat then it's other stats, it may choose a charge attack style or choose to strafe around the level while firing at the player making it harder to hit.
I took to code to think of the best way to recreate this behaviour in game and my solution was as follows:
I created a enum type that would define the different attack types or states that bosses could go through. Above is just an example of several different attack styles a boss could exhibit. The dormant attack style is a brief state of nothingness that allows the player a very small respite before the boss starts attacking again. It is also that state when the boss choses which attack type to use next.
Next I created a simple switch case that would run the proper attack code based on which state the boss was currently in:
Next I created a simple switch case that would run the proper attack code based on which state the boss was currently in:
And then created those attack functions. This AttackRadial function rotates the boss slightly then releases a bullet in the direction the boss is facing:
And as I mentioned earlier, the dormant function that has no attack, but also chooses which attack to use next, currently decided by a random number:
With that implemented, I believe I have made the bosses adequately unique.
In order to prevent this post from becoming a short novel I will cut it off here. In my next post I will look at how I made, or rather plan to make my game's bosses both powerful, without being too over-powered, and fun.
In order to prevent this post from becoming a short novel I will cut it off here. In my next post I will look at how I made, or rather plan to make my game's bosses both powerful, without being too over-powered, and fun.