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

Efficiency

Simple iOS Weather App Using OpenWeatherMap’s API and Codable

Creating a Successful Mobile Application

3 ways to run a better side project when everyone is working from home

Pasting an Image of Desired Size Over Another Image Using OpenCV Python

Scraping Website Data in 5 minutes with Python

Orbital Communications—April Community Update

AWS Design Pattern: Floating IP

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

Dizzy Asteroid

Most Common Problem Faced by New Game Developers

A Day of Maintenance: Lessons learned about making an open-world driving game’s world scenes

Welcome to the Development of Glitch Worm.