Trowl – Rage (Power-Up)

This week I have been working on one of the power-ups in our game, Rage. This power-up allows the player to move around a lot faster, the player does not take damage, all enemies that comes in contact with the player while in this state are eliminated and in addition to this the player yeild twice as much points from killing enemies with this power-up. The Rage power-up has a duration of 10 seconds and after that the player goes back to its normal state.

To visualize that the player has picked up the Rage power-up, the player is surrounded by flames. Here is a picture of how it looks like:

Rageblogg

While the power-up is active the player is invulnerable like I mentioned before. However, the owlets which follows the player is still vulnerable to enemy attacks.Owlets that are hit by enemies increase stress by twice as much as when the player is hit, stress represents the players health. Therefore the player still needs to be cautious while in this state.

I implemented this power-up into the game by creating a new class which I called Rage. This class stored the sprite, the texture of the power-up and the collision box for the sprite. Here is the sprite and the icon that represents the Rage power-up:

rage

When the player collides with this sprite the power-up is activated instantly.

After the power-up icon was implemented all I had to do was increase the players speed and make the player immune to damage after colliding with this sprite. I increased the players speed by increasing a friction value to 1,5 which normally is set to 1. The friction value is a float variable that is used in a function that regulates the players mobility. This function takes speed * friction * delta, (delta is a float variable of frames/second). So by increasing the friction value the speed and mobility gets higher.

The next step was to change a bit in our programs collision code, where the player collides with enemies and takes damage. Here I declared s function for each enemy type that when the player has a active rage power-up,the collision between the player and the enemy no longer increases stress, but instead all enemies that are hit will instantaneously perish.

I thought this task would be a hard one since I have never done something like this before, but it was actually much easier then thought. I am quite satisfied with how it turned out in the game and it works like we imagined it to.

Trowl – Owlets

Owlets are one of the core elements in the game we are creating called Trowl where the protagonist is an owl mother. As the game starts the player’s goal is to pick up and lead these owlets to the end of each level. The players primary concern when having picked up the owlets is to keep them safe and out of reach from enemy attacks. Each owlet that the player successfully protects through the level will give a slight bonus to the final score. The owlets also have a impact on the players “health” or in this case the amount of stress the owl mother is afflicted by. When picked up the owlets reduce the amount of stress by 20%, but they also increase the amount of stress with 20% if hit by enemies. The player therefore benefit from picking up the owlets and keeping them out of harm.

But the true challenge is to protect the owlets as they player pick up more of them since they pile up behind the player in a snake like form. The formation could look like this.Owlet, Blogg.png

It becomes very apparent that the game play difficulty increases when owlets are being picked up since the player grows longer and more vulnerable to enemy attacks. This creates a more interesting and challenging game play.

To program this kind of snake-like movement was quite hard since I recently started programming and lack some experience. The easy part was to create the event were the owl mother collides with the owlet and to change their new position behind the owl mother. But at this point they were only following the owl mother in a straight and very stale line, which obviously was not what we were after. The difficult part was to create the snake-like movement pattern for the owlets. To be honest I have yet to figure out how to solve this problem, but I think I have a clue of how to do it.

Each owlet need their own position behind the owl mother and each owlet have to adapt their speed and position depending on the speed and position of the object in front. I will also need to create some sort of speed delay for the owlet’s when moving behind each other to simulate this snake-like movement pattern. Otherwise if all objects were traveling at the same speed it would cause the same stale straight line, which we do not want.

At least I have an idea of how to solve this issue, and I am most certain that I will finish this movement pattern in no time!