How to build directional melee combat?

Hi there. I would like to inquire about directional melee combat, similar to both Chivalry 2 and Kingdom Come: Deliverance. I have provided example YouTube Shorts for you to see.

Essentially, it is a first person sword fighting simulator. You control how fast or slow your attacks are with the speed of your mouse drag, which side to attack from, block, feint, parry, counter, etc.

If you could please explain to me which systems I will need to investigate within Godot and how to approach building something like this from a high level perspective, that would be great.

Thank you!

Chivalry 2 Combat

Kingdom Come: Deliverance Combat

Hmm. Well at a high-level, you can probably get within a stone’s throw of that by checking the mouse [position and status] relative to where the click begins and performing some vector wizardry to decide how your objects move in response, then comparing their respective remaining velocities upon collision to determine what happens.

It also shouldn’t be too hard to detect an approximate input vector and compare it to some templates that you define yourself, sort of like an unlocking security pattern on a phone (in a personal project, I made something like this for checking mouse movement velocity). The old Harry Potter games have a similar system for casting many different spells with just the mouse.

You may want to start with something that’s already within one of the courses, simply because having a solid understanding of the basics will already get you pretty far. As you can see, most of what I’ve described here is actually code-based vs. Godot-specific systems. All you really need to test it are MeshInstance3Ds and matching CollisionShapes, and fortunately, that stuff is 3D 101 =)

2 Likes

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms