Component-based framework and project template for Godot
The goal is to be an all-in-one toolkit for 2D games (platformers, shoot-em-ups, RPGs, turn-based strategy or puzzle) where you build scenes by adding components to entities and tweaking their parameters in the UI. "Entities" and "Components" are like regular Godot Nodes but for gameplay, so you can mix this framework with any other architecture or system, even for 2D scenes in a 3D game!
- Includes components for different types of player movement, combat, collectibles, interactions, upgrades etc.
- UI controls like a stats HUD, buttons & lists for special skills etc.
- Template scenes for Logo → Main Menu → Options, Input Remapping, Pause Overlay
- Save/Load player preferences via a config file with just
Settings.any_name = 69
- Tons of helper functions & debugging tools.
- Commented & documented code.
- Free-to-use 3rd-party assets for quick prototyping.
Warning
This is still mostly a private personal project; it's what I'm using to make my own epic games while learning Godot and GDScript as I go. The opinionated style eschews GDScript conventions like ugly underscores, and the API may change frequently and no backwards compatibility is guaranteed!
🌳 An example of a player entity:
⭐️ The composition architecture lets you do cool shit like putting a GunComponent
and MouseRotationComponent
on any object and It Just Works:
RocksWithGuns.mp4
⭐️ Easily implement dynamic gameplay and change abilities/buffs/debuffs at runtime; just add/remove components in simple event handlers, like this example of swapping between platformer physics and flying/"overhead" movement:
Platformer+Overheader.mp4
📈 There's even kawaii charts for debugging variables in real-time!
(if the videos don't display, view on imgur): 1, 2
Important
Requires Godot 4.4 ~Embrace the Future ✨
The first time you load this project, there may be errors because Godot will re-import the asset files and set the internal IDs for textures etc. To fix: Close and reopen the project.
🚀 For a quick glance: See the /Templates/Scenes/
folder.
⚙️ To use this framework for your own games:
- Clone this repository; make a local copy of this entire Godot project.
- Drag-&-drop nodes from the
/Entities/
and/Components/
folders into your scene tree.- The
/Templates/
folder contains example scenes and Entities with preset Components as a quick starting point for various gameplay. - The
/Scripts/
folder contains code for simple non-Entity nodes. - The
/UI/
folder contains common UI elements such as a stats HUD, special action buttons, lists for choosing upgrades etc.
- The
Note
🧩 A "component" is any Godot node that:
- Reacts to events (like player input or collisions).
- Moves or modifies its parent node or other components.
- Contains data for other components to use (like character health and other stats).
🪆 An "entity" is a node whose children are components (it may also have non-component children).
🎳 Whenever your game needs an "actor" like the player character or a monster, or an object with "behaviors" that could be reused for other objects, like interactive items or collectible powerups:
Use the included custom dock plugin (the Comedock :) or perform these steps manually:
- Create a new Entity node: a
Node2D/Sprite2D/CharacterBody2D
etc. with theEntity.gd
script attached. - Add Component child nodes to the entity. A component is also a
Node/Area2D
etc. with a script thatextends
theComponent.gd
class. - Modify component parameters in the Godot Editor's Inspector.
- Save the entity + components tree as a standalone scene file to organize it separately from the main "world" scene and quickly create copies of it anywhere.
Tip
📜 Read HowTo.md to see how to do common tasks like player movement and combat or adding entirely new functionality.
💬 For more deets, ping Syntaks.io on Discord.
Comedot ©? MMXXV ShinryakuTako@GitHub • Syntaks.io@Discord
🤍 THANKS:
- Tilesets: https://kenney.nl/assets/1-bit-pack
- Font: Jayvee Enaguas (HarvettFox96) https://www.dafont.com/pixel-operator.font