Day14, Better days

The Implementation of Balanced Powerups

After days of struggling, I’ve finally come to senses and started pouring out additional features into the game. The first was putting in the balance work of the Pickups. In the probability of 100 (range 0–101[last number is exclusive]), first 50% spawns value of 0 and 1. which is extra enemy spawn and speed boost. the next 30% designated to 2, and 3 being laser refills, triple shot, and extra shields. The last 20% was designated to 4 and 5 with extra shielding and life.

After the script has been changed, I had to go ahead and change in the inspector and rearrange the powerups to its array. and also gave a change to the powerup script that defined the numbers. But for some reason, the prefab absorbed and the actual features weren’t matching. This gave me quite a headache until…

I realized I didn’t change the PowerupID of the powerup prefabs. Then it worked like a charm.

Aggressive Enemy and Enemy dealing with pickups were the other 2 implementation that was done today while enemy pickup is still in its way of modification. With the script similar to Enemy Evade from yesterday, the enemy script measured the distance between the player and and its own gameobject. And while player is not null, within the set distance, the enemy slams towards the player using movetowards function within the vector3. At first play of the game, I was surprised at how fast the enemy charged towards the player. I just had to reduce the speed a bit. What a pleasant surprise that was.

The Next was the Enemy attacking towards the pick ups. As enemy and pick ups are both randomized in its spawn, it’s rather rare that the pick up falls in front of the enemy. However, when the enemy is shooting the laser and the pick up happens to be in the front, tagged enemy laser, do destroy the gameobject of the pickup. However, I wanted the enemy to actually detect* the pickups and then shoot with a mind to destroy the gameobject. So that is still under its way with Raycast. I did have a use with the raycast with my 3d personal project when I wanted the object to know when it’s touching the terrain so that it doesn’t double jump in the air. So I thought this would be a good implementation in measuring to know if the gameobject is in front of the enemy.

--

--

--

Software Developer @ GameDevHQ

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

Recommended from Medium

This blog runs through several casual games every week, surveying one female and one male on a…

Why the Wii is a modern classic

XR Design Analysis: Pistol Whip’s Aggressive and Chaotic Gunplay

The chaotic gunplay of Pistol Whip

You Just Levelled Up: Breaking the Unwritten Rules of the Games Industry

What Are The Differences Between Traditional and Online Casinos?

Day 2 Debug.LogError(“Just redo it”)

Streaming on Twitch: 10 Tips For Beginners

Life Lessons from [Rogue-lite Games]

Screenshot from Hades having me dash around to prevent getting hit

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
Ji Soo Ahn

Ji Soo Ahn

Software Developer @ GameDevHQ

More from Medium

I quit my Job after 10 Years !!

3 Signs You Are Hindering Your Own Growth

Today, we’re deep-diving into goal-setting — how to prepare to set your goals, breaking down those…

The start of building confidence