PowerUps And Hud continuation

In my last blog post i talked about when i worked on the Stressmeter in our game. which i now have succesfully completed. With the help of my fellow programmers we got it to work using

hud->getSprite(0)->setScale(player->getStress() / 2.18, 1.02f);

This code does so that the width of the the red square that i made in paint is changed to be represent the amount of stress you currently have if it is maxed out you lose, and this red sqaure is fitted inside of the sprite that i showed in my last blog post,

As you can see in this Screenshot on the top left you can see the stress meter which you can see has a red surface on it which is the red square that i made which is increasing its width relative to how much stress you have and when it gets full you lose because the owl is too stressed then. The stressbar is affected by you colliding with other birds which makes it go up and you become more stress, but you can counteract that stress by screeching at them which basicly is a normal projectile. or your stress go down when you pick up your owlettes, your baby owls.

 

Slow Motion

So now that i got that working, i started working on implementing a Power-up in the game, more specific i was gonna make a power up about slowing down time. i already have a sprite ready for that which the graphics department fixed up. so we have a sprite which is a clock to represent to the player that something with time will change if you pick this up.

To do that we need to make it so when you pick up the clock the game is slowed down. and the easiest way to do this we thought is to make it so that when you pick up the clock the update is changed to make it so that the update dont happen as much.

or we can put a cap on the framespersecond limit in the game, to something like 15-30 frames per second  to make the game go in slow motion. im a little sceptic of using this method because then it might just seem that the game is laggy and it wont be a power up. But if i dont use this method and for example only want to make the enemies slow motion and not the player then i would have to change the speed on all of the enemies indivdually which would be alot more work to do, but i also feel that the power up should only be about giving you more time to dodge projectiles and enemies,traps and obstacles.

Thanks for reading see you next week and ill talk about how the alpha release went and how i got the power ups working.

 

About Robert Gustavsson

2015 Programming