Determining the duration of powerup effects on Player

Any game is incomplete without additional power that gets bestowed upon a gamer by collecting abstract artifacts.

They can be symbolic game objects that push extra strength for a certain amount of time while one plays against enemies.

It is worth noting that their interaction solely happens with the player.

In the scenario of giving a life limit to such a booster, a developer must adhere to the gamers’ tendencies toward excitement and timing. The boost shall sustain for a very limited window so that the gamer gets on tows for optimum use and at the same time, it must arrive at a juncture when the gamer is about to see a defeat.

In the case of the game below, there are three distinct powers to be collected. A triple bullet shot, a speed multiplier, and a shield that saves a life.

Based on my understanding so far, a duration for all of them turned out to be oscillating roughly in between 3 to 7 seconds considering that the enemy spawning is occurring at 5-second intervals.

A simple implementation using a coroutine is as followed.

C#

Thank you very much

--

--

--

Work in Progress.

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

Recommended from Medium

Demo projects with animated GIFs?

ARTH Task 7.2

Best solutions for Microsoft interview tasks. Unique Integers That Sum Up To 0

How to Connect Printer in Windows 10

Migrating our Scala codebase to Spark 2

How you can increase your typing speed from 30 to 90WPM for free?️

https://www.typingclub.com/sportal/catalog.html

How to Configure and Use SQS Message Dispatcher

The Mind Is A Terrible Thing

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
Samarth Dhroov

Samarth Dhroov

Work in Progress.

More from Medium

Changing Skies in Unity: Unique Skyboxes (Game Dev Day 71)

Player Health And Damage

From Prototype to Work of Art

Adding a homing missile powerup