My Laser Defender

Here she is! I made it using Bolt instead of C# scripts.

Let me know what you think!


Great Job. I like how you implemented the power ups and the bar for the power up time period decreasing. How did you get the bar to go down at a constant speed?

Hey thanks! I did enjoy making it.

So to make the bar drain at a constant speed I did this:

float time = 15f;
time = time - Time.DeltaTime;

This subtracts the time it took to render the last frame from the time float variable. So it will take 15 secs (ish) to drain the bar.

The slider (yellow bar) get’s updated with the time float every frame.

Could be a better way to do it, but this worked well for me! Thanks for asking.

Oh yeah, that makes total sense. Thanks! I’m finishing up my laser defender game. I was thinking of adding in some laser power ups like you did…but I got too lazy to spend the time figuring it out. I’ll send you a link to the game when I’m done with it. I’m curious what your thoughts are on what I could improve.

Your welcome! Let me know when you’re done. I would love to see it!

I just posted it here on the gamedev site. Here is the link to the page:

Privacy & Terms