One sword swing split into the seven things that make a hit land, each on its own switch, so you can turn them on and off in Godot 4 while the game runs.
A hit that lands is not the same as a hit that feels like it landed. Four of these seven layers do nothing to a screenshot, which is why this is a project you run rather than an article you read.
Features
- Seven impact layers, each on a switch: knockback, hitstun, hit-stop, screen shake, sparks, flash and squash, and sound.
- Three live sliders: knockback force, knockback friction and hit-stop length, with the resulting slide time shown as a number.
- Two freeze styles: freeze only the two fighters, or freeze the whole game
with
Engine.time_scale. Switch between them mid-fight. - Hit-stop that cannot lock up your game. Its timer ignores time scale, and a token stops two quick hits from unfreezing each other early.
- Trauma-based screen shake on smooth noise, with a directional kick and a small camera roll.
- Directional sparks that fly along the strike instead of puffing out in a ring.
- A hit sound generated in code, pitch-varied so forty hits in a row never sound like a machine gun.
- No assets and no addons. Every shape is a
Polygon2Dand the sound is synthesised, so the whole project is about 20 KB of text.
Requirements
- Godot 4.7 or later, standard build (GDScript only, no .NET needed).
- Tested on Godot 4.7.2 stable on Windows. Earlier 4.x versions are untested.
- Uses the Compatibility renderer, so it runs on older GPUs too.
Quick Start
- Press F5.
- Move with WASD or the arrow keys. Swing with Space or a left click.
- Press Nothing in the panel and swing at the dummy. The hit lands, but it has no weight.
- Press Everything and swing again.
- Untick one layer at a time to hear what each one was contributing, or drag a slider while you swing.
Known Limitations
- Hits are detected with a distance and angle check, not
Area2Dhitboxes. That keeps the project about how a hit feels rather than how it is detected. - One player and one training dummy. There is no health, death or enemy attack.
- The tunables live in one global autoload, so per-attack tuning (light versus heavy) is up to you. See "Heavier attacks" above.
- The "everything" freeze style sets
Engine.time_scale, which also pauses any other time-scaled system in your game while it runs. - Tested on Godot 4.7.2 on Windows only.
License
MIT. Use it in a commercial game, take the scripts apart, ship whatever you build with them. See LICENSE.
Third-Party Assets
None. Every shape is drawn with Polygon2D and the hit sound is generated in code
at runtime, so there is no art, audio or font to attribute.
Learn How It Works
Want to understand how this works instead of just copying it?
CodingQuests teaches you how to build systems like this step by step in Godot, with interactive lessons and real projects.
- Game Feel: Make Combat Hit builds one reusable juice autoload and ends with a single
Juice.hit(weight)call that scales every effect to the size of the blow. The first 2 lessons are free. - The browser version of this lab runs the same numbers with nothing to install.
- New to Godot? 2D Roguelike: Top-Down Controller is free, 8 lessons, written and graded in the browser.
Source code, integration instructions and issue tracker: https://github.com/CodingQuests/godot-game-feel-lab
Changelog for version 1.0.0
2026-10-17 01:26:04
No changelog provided for this version.