Power Up Bullet
|
During this week I have not really worked on a single large ”artifact” that provides a good topic for a blog post. Unfortunately I also became sick yesterday so I apologize if the quality of this blog post is somewhat lacking. This week have mainly been about tuning already existing parts of the game, like adding animations. For example the new lane animations we have to provide the player with a visual separation of the three different lanes and also show the player the beat of the song with the lines twinkle in the same rhythm as the music. We have also have some problem with a minor delay in the audio of when the player shoots the projectile and when the sound plays. I personally find it hard to hear this delay, but other people hear it more clearly. We have tried with trying this out in a clean new project with only the necessary parts to try it out, and also using the Windows API with help from our scrum master and finally trying this out in a SDL project. The delay remains. One artifact I have created from scratch during this week Is the power up projectile. The power up is meant to be a huge sound wave spawned from the left of the screen moving to the right, clearing all enemies in it’s path. We have not created a sprite for this part of the game yet so I created a programmer art projectile in Photoshop to have something to draw on the screen and create collision with the enemies. The code for this power up is simple, but not yet finished. The power up class is almost identical to the bullet class. I did this because the power up is in reality just a bigger projectile, the only difference is that this projectile can only be used when the player as picked up the power up. I created a new else if under the GameState::OnAction using the action “AltFire”. At this moment a new PowerUpBullet is created here, but later we might move this to the PowerUpBullet so the GameState doesn’t get to large. I had some linker error with the use of the math.hpp created earlier during this project to normalize a vector2f when shooting a projectile. I had used We have not yet decieded how the player will receive this power up, but one way to do it would be to create an int that is added with one when the player kills a certain enemy. And while this integer is more than zero the player can activate the power up with the press of a button.
A screenshot from the game when the power up is activated. With my programmer art. |
