Dev Log #6 (The Tower)

Hey everyone! Welcome back to another Dev Log. I wanted to do something with this blog post, and write about something a little different. In all honesty, I didn’t add too much to the game since the last blog post. However, I did add in a new mechanic to the game, it is a healing mechanic that allows the player to heal up to 30 HP five times. We’re not going to focus on the mechanic so much in a game sense, but more so the code and what this little mechanic means to me.

So let’s take a look at the code snippet:

void HealPlayer()
 bool canHeal;

 if (PotionCount <= 0)
 PotionCount = 0;
 canHeal = false;
 if (PlayerHitPoints < 100)
 canHeal = true;
 if (canHeal)
 PotionCount -= 1;
 PlayerHitPoints += PotionHealAmount;
 PlayerHealthBar.value += PotionHealAmount;

 if (PlayerHitPoints > 100)
 PlayerHitPoints = 100;

 canHeal = false;


Now, this isn’t a really complex or complicated function right? It’s just, if these different flags are true or false, then do this thing. And I’m sure there is plenty of better ways and, maybe more efficient ways to write this healing function. However, this is the first piece of code that I can remember in recent memory, that just works. I feel that’s really important to be aware of and deserve a little pat on the back, maybe a little horn toot.

Why this bit of code is so important to me, is because this is the first I’ve noticed my growth as a programmer. I had an idea of how I want to this function to work, had an outline for it, wrote it, and it just worked! That was such a refreshing and morale boosting feeling since (and excuse my language), this shit ain’t easy. That’s what I feel like more young and budding programmers or, even game developers have to be more conscious of when starting out.

Since, I don’t think it’s any secret to anyone, making video games is hard. I’ve read so many times that it’s a miracle that any video game, at all, gets made. And I’m no video game master creator extraordinaire, I mean I only started making games two years ago (and to be honest, don’t think I ever will). The thing is, the only way to get better as a developer and an artist, is to do and make things. That’s why I feel it’s so important to notice these victories and celebrate them, no matter how big or how small, those are the things that are going to keep the wind under your wings and push you to keep making cool shit! So keep making video games!!!

So in conclusion, making games or any piece of art is hard. The only way to become better at anything really, it to just practice and make stuff. It can be really hard though if we don’t notice in ourselves, our own progression and growth. We are our own toughest critic, and sometimes that voice won’t shut the hell up. It’s important however, to remember with ever piece you create, you’ve created something with your own two hands! And that’s always something to be proud of.

Thanks for reading, I’ll see you next time!




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s