• Tutorials
  • The Combat Series [Tutorial Series on Combat Mechanics and Coding]

Hey guys, I hope all of your games are coming along great! =)

After I finished my inventory series (which you may or may not have noticed), I'm coming to you with a new series! The inventory series was my first tutorial series. I used it to gather a lot of feedback, some (a lot ;) ) of self-reflection, and now that the rather mundane topic of inventory is done. I thought I would start a series on something a little more fun, COMBAT! B) B)

Here is part one, in which we start with the very basics of things: shooting. Enjoy, leave a comment, and let me know what you want to see more! =)

7 days later

Got your bullets and projectiles spawned into your game world? Now it is time to make them recognize enemies, deal damage, and kill George, our crash-dummy-skeleton!

Next week, we take a look at all there is to learn about Health-Bars

Nutrition, working-out, ..... Health is so important these days! George, the crash-dummy-skeleton has been working out too, and he is totally ready for action. Time to give him a health bar to show it off!

4 days later

When your games allows the player to use different skills and/or weapons. You need a way for the user to switch between them. Also, the code must recognize the skill/weapon used and adjust skill/projectile effects accordingly. In this tutorial, we will build a skill bar + code the skill switch to handle a fireball and an ice spear.

This tutorial will form the foundation for future episodes in which we will add Heal/AOE/Stun/Knockback effects.

Got your bullets or projectiles in the game?? Good, now let us add some explosions and AOE stuff to kill more than one enemy at the same time =)

When you add many skills and/or weapons to your game, keeping an overview, and balancing things like damage, range or RoF can be hard. A skill-database could be an optimal solution. Learn how to make one in just a couple of minutes!

Do you want an AOE effect with shockwave characteristics? To achieve all kinds of mechanics related to Shockwaves, Explosions, Spreading Gasclouds or Nova-like skills. NP, I got you covered in this 7th tutorial of the Combat Series :)

After SingleTarget, AOE, and Shockwave attacks, we are turning things around with this tutorial on Healing in Godot. Not only that, we learn George, our trustworthy NPC skeleton, use it :)

The first step to any NPC logic is making sure they have sight, and not just any sight: Direct Line of Sight. Making use of an Area2d the Space-State and Raycasting we program exactly that!

14 days later

After Healing, AoE and Single-Target skills/projectiles we now turn our attention to a melee attack skill. A cone-shaped attack to be precise. Turn in this last episode of this series and get ready for the next two (2!)

a month later

Your a very good teacher! Now, I have a question: I´m making a platformer 2D Castlevania like, and I have watched your first video about throwing proyectiles, but I found a problem, the player only throw knifes to the right even if his orientation it´s to the left. What´s happening? I´m not instancing the knife scene from the main node because in that case the knife appears from the air. But the code it´s basically the same.

a month later

I'm so sorry @Esteban_Megapixel I thought these forums would throw me an e-mail if somebody replied and apparently it doesn't :/

Basically, the code in my tutorial would throw the knife any direction your mouse points at. Have you included some code to see the player orientation to determine direction? If so, can you copy-paste it in here so I can have a look at it and help you out if you still need assistance? :)

@Stefan_GameDev make sure that your email provider isn't defaulting to filtering mail from the forum software as spam. That could be the issue.

6 months later

@Stefan_GameDev I came here looking for coding in knockback, because my current knockback code isn't working, my enemy is programmed to bounce off of walls and to turn around when a collision with the wall occurs, the problem is, the enemy thinks my sword or character is a wall, and I can't find any way to fix it, and making a "body_entered(body)" function doesn't work. so idk what to do, can you help?

5 days later

@Kuramarik you need to post some screenshots of what you got now. Hard to help with the very little info you give

6 days later

I haven't watched the videos, but something about the Thumbnails is Comedy Gold.