The Path of the Game Dev — Day 9

Saving progress…

— —

As mentioned in my previous post I was deliberating what to do for an alternate projectile. My first idea was a giant laser beam but I was unsure if it qualified as “projectile”, so I also created a freezing shot! This one, instead of destroying the enemy, would slow down its movement and prevent it from shooting lasers at the player. This would buy the player some time to move around the field to grab an extra power up. Quite useful in situations where the player has low health and ammo and no damage shield.

Weirdly enough, the thruster charge bar I worked on yesterday had an issue where it was not depleting when I held down Left Shift. I investigated further…

And found it was actually because the slider value was constantly increasing per second! Not what I wanted!

I had to go in and fix the method so it would only call RestoreCharge when the Left Shift was not being held down AND that restore could not increase the current value past a maximum of 100. Here’s what it looks like now:

void Update()
{
if (curCharge >= maxCharge)
{
curCharge = maxCharge;
}


if (Input.GetKey(KeyCode.LeftShift))
{
DepleteCharge(0.6f);
}

else
{
RestoreCharge(0.2f);
}

}

(Max charge is 100.) And with that, let’s see where we are with Phase 1.

Thrusters when Left Shift is down? Check.

Shield Strength with 3 hits before disappearing? Check.

Ammo Count to update with each shot, with a max of 15? Check.

Ammo Collectible to restore ammo to full? Check.

Health Collectible to restore 1 health? Check.

Secondary Fire? (oops I did two of them) Check.

Thruster Charge represented in UI and has a cool down? Check.

Camera Shake on damage to player? Check.

A spaceship sits in front of an asteroid on a space background. UI elements for Score, Current/Max Ammo, and Thruster charge.
A scene from the start of the game!

Well then, it looks like Phase 1 is now complete!

But a new challenger awaits.

— —

Progress saved!

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Fortnite Is Taking Over Pop-Culture

Froyo Games partners with WeMade and iCandy for blockchain-gaming development

UnusuAll Raises $3.6 Million Led By Garena

Best Online Poker Tips

Best

Activity Report Vol. 97: Support Message Poster Delivered to 3DCG Studio Polygon Pictures

Welcome to Bloody Revenge

The difficulty of difficulty levels

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Gabrielle Igarta

Gabrielle Igarta

More from Medium

Should Video Game Remakes Adhere to its Source Material?

Screenshot of Resident Evil 4 Remake, the main character is looking out of a car window.

My first level design experience — few tips and tricks to build nice levels.

Atlas Terrain Editor for Unity 3D

Procedural Content Generation through a Data-Driven Approach