Skip to content

Cantox/GodotModules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Ā 

History

23 Commits
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 

Repository files navigation

Godot Modules

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.


⭐ Main Features

2D Modules

  • Velocity: Modifies the velocity of a CharacterBody2D node. Acceleration and acceleration curves are supported.

  • Movement: Requires the Velocity module. Reads an input (axis or mouse position) and moves a CharacterBody2D using the linked velocity module.

3D Modules

  • Velocity: Modifies the velocity of a CharacterBody3D node. Acceleration and acceleration curves are supported.
  • Basic first person controller: Requires the Velocity module. A first person controller that implements basic movement and jumping

Attribute Modules

  • Health: Manages a health value with increment/decrement support. Emits a death signal when health reaches 0.

  • Damage: Requires the Health module. Supports dealing and receiving damage, damage modifiers, and critical attacks.


šŸ“Œ Complete List

2D
  • Velocity
  • Gravity
  • Movement
3D
  • Velocity
  • Gravity
  • Basic first person controller
ATTRIBUTES
  • Health
  • Damage

🧩 Installation

Download the repository and unzip it.

For each module you want to use:

  • Copy the corresponding module folder (containing the .tscn scene and .gd script) into your project folder.

  • Open the module’s scene (.tscn file) 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 .gd file 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


Modules with dependencies

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

About

Various modules that can be used in a composed structure fo any godot project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published