Game Progress Update #13

Update #13

Hello world! Welcome to the thirteenth Dev with Dave Game Progress Update. Since the last update I have managed to get three more of the powerups working, those being the magnet, smart bombs and the score multiplier.

Score Multiplier

Implementing the score multiplier was fairly straight forward.

When the player collects the Score Multiplier power up, a flag is set which indicates that the powerup is active.

When the game gets to the “increase score” part, it simply checks this flag and if it’s active then the score is multiplied by the multiplier level x 2. This gives the player the following multiplier options, x2, x4, x6, x8 and x10.

Smart Bombs

The next powerup is the Smart bombs, collecting one of these will destroy any enemy object on screen. It is intended to not work against structures, so it will leave the pipes intact.

When the player collects the smart bomb powerup, the game calls the SmartBomb() function.

This checks through all the sprites being used to display the current zone, and if they are in range and of the correct type then the sprites are disabled and moved off screen.

Because simply making the meteors disappear looked a little boring, I added a blinding white flash of light effect.

This was achieved by positioning a screen sized white sprite over the game sprites but beneath the CRT overlay effect sprites, and then decreasing the alpha value of it.

Simple but effective 🙂

Magnet

The last powerup I’ve done is the Magnet. Once collected this powerup makes coins within range fly towards the players ship.

In a similar way to the smart bomb, to create this powerup the game checks through all the current zone sprites to see if any of them are coins. Although it does it every update until the duration has expired.

If a coin is found in range, then the game calculates the angle the coin needs to move in, which is a simple bit of trigonometry. It then moves the coin towards the player.

I say a “simple bit of trigonometry”, but this is what happened the first time I ran the game after coding the magnet systems.

I’m pretty sure that’s not how physics is supposed to work! 😂😂😂

I would like to add a visual effect to this as well, to give the player more indication that this powerup is active. It will probably have an active sound effect as well.

Next time

And that’s all I’ve had chance to do this time round. I’ll try and get the Trello updated this evening to reflect the changes made. In the next update, I’ll endeavour to get the boosts working.

As always, don’t forget to like, follow and subscribe to @devwithdave on social media to keep up to date with the project.

And if you have any questions, feel free to ask them on the >forum<.

See you in another two weeks.