Making an RTS game #9: Implementing character units and skills (Unity/C#)

On with our RTS project! Today, we’ll add the character and skill systems…

Mina Pêcheux
CodeX
Published in
9 min readMay 6, 2021

--

⬅️ Tutorial #8: Boosting our selection feature | TOC | Tutorial #10: Moving the camera ➡️

📕 Get the ebook and bonus material on Gumroad!
🚀 Find the code of this tutorial series on my Github!

Last week, we improved our selection feature and, in particular, we added an info panel for the currently selected unit. Now, it’s time to populate this panel with skills and use it to create even more units!

For now, we only have building units — but remember that we prepared our class hierarchy in previous tutorials so it is easy to add character units. Today, we’ll add these character units, plus we’ll start a basic skills system that allows us to produce one of those character units in our House building.

Implementing character units

General info about character units

As we discussed a few weeks ago, characters are one of the possible unit subtypes. So just like we used inheritance and polymorphism for buildings, we’re going to do the same for characters.

--

--

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 :)