A modular, composition-based set of reusable Godot modules.
This project follows a composition-over-inheritance approach, leveraging Godotās scene system to build flexible and reusable gameplay behaviors.
-
Velocity: Modifies the velocity of a
CharacterBody2Dnode. Acceleration and acceleration curves are supported. -
Movement: Requires the Velocity module. Reads an input (axis or mouse position) and moves a
CharacterBody2Dusing the linked velocity module.
- Velocity: Modifies the velocity of a
CharacterBody3Dnode. Acceleration and acceleration curves are supported. - Basic first person controller: Requires the Velocity module. A first person controller that implements basic movement and jumping
-
Health: Manages a health value with increment/decrement support. Emits a
deathsignal when health reaches0. -
Damage: Requires the Health module. Supports dealing and receiving damage, damage modifiers, and critical attacks.
2D
- Velocity
- Gravity
- Movement
3D
- Velocity
- Gravity
- Basic first person controller
ATTRIBUTES
- Health
- Damage
Download the repository and unzip it.
-
Copy the corresponding module folder (containing the
.tscnscene and.gdscript) into your project folder. -
Open the moduleās scene (
.tscnfile) to setup / customize the parameters and make sure there are no loading errors.! If dependency errors appear and the script wonāt load
- Open the scene anyway (without loading the script)
- Reassociate the script with the module (drag the
.gdfile onto the moduleās node) - Save the scene
-
Add the moduleās scene to your scene tree
-
Configure the moduleās exported properties from the Inspector tab
Some modules depend on others (e.g. Movement2D requires Velocity2D).
In these cases:
- Import both the module and its dependencies
- Add dependency modules as siblings in the scene tree
- Assign dependencies in the Inspector by linking them to the moduleās exported fields