It’s Time to Game Over- Game Dev Series 21

Objective: Make a retro game over sprite.

Previous: Ease of Building UI Elements in Unity

Now we got lives count sprite and player destroy-function, it is time to make a game over sprite.

Same as score text, create another text game object of game over. In the text component, change the Horizontal Overflow and Vertical Overflow to Overflow.

Then add a variable of game over text and some lines in the method that dealing the lives sprite.

We can hide the game over text at void Start() when game start. And set it active in the method.

Press Play and the game over sprite will appear when the lives is 0.

We can make this game over sprite present as retro style with flicker effect.
This effect would easily present by using coroutine.

Create a IEnumerator to repeat this effect.

In this coroutine, we will get the text component and turn it on & off every 0.5 second. Then we need to call it in under the game over sprite appear.

The you should get the flicker effect.




A passionate gamer whose goal is to work in video game development.

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

Recommended from Medium

Saving result into Dynamo-db from Lambda

newwwwwwwwwww game playyyy

IDamageable Interface in Unity- Game Dev Series 106

Boss Arriving Part-3: Health & Final Wave- Game Dev Series 54

Similar but Not the Same: You Still Need Developers, but Do You Need Coders?

Using AudioManager to Manage the Audio Effect- Game Dev Series 118

Paralympian @madison.____

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
S.J. Jason Liu

S.J. Jason Liu

A passionate gamer whose goal is to work in video game development.

More from Medium

What is a Control Track in Timeline

Adding a thruster speed boost on keypress

Camera plugin for Unity

Upgrading A Unity Project To The Universal Render Pipeline (URP)