Making a Hack’n’slash #10: Showing damage popups 1/2

Let’s create some small damage popups whenever we hit an enemy!

Mina Pêcheux
CodeX
Published in
13 min readJun 2, 2022

--

⬅️ Tutorial #9: Implementing a basic AI using a Finite State Machine 2/2 | TOC | Tutorial #11: Showing damage popups 2/2 ➡️

In the last episodes, we focused mainly on our enemy and we made sure it has a basic form of intelligence thanks to a simple AI algorithm based on finite state machines. It was nice but somewhat harder than the previous tutorials… so in this new couple of tutorials, let’s take a break and work on a more visual feature: we’re going to show some damage popups whenever we hit the enemy!

Note: by the way, I’ve also taken this opportunity to boost the scene a bit — the assets and textures are all available in the Github repo 🚀

In this first part, we’re going to discuss various Unity packages and extra utilities like the TextMeshPro lib and the Addressables Assets. Then, next time, we’ll see how to improve the damage popups’ style and even do a bit of tweening… ;)

Preparing our popup text prefab

--

--

Mina Pêcheux
CodeX
Writer for

I’m a freelance full-stack web & game developer. I’m passionate about topics like CGI, music, data science and more! Find me at: https://minapecheux.com :)