Skip to content

Latest commit

 

History

History
50 lines (32 loc) · 3.97 KB

README.md

File metadata and controls

50 lines (32 loc) · 3.97 KB

Building-Block (BB) Components for Godot 4

Released under the MIT license.

Godot Engine

A collection of simple building-block components that are designed to be easy to use and be dropped into any Godot 4 project, ready to use with no (or minimal) configuration, and "smart" (or at least sensible) defaults.

These components may be useful for rapid prototyping, quickly testing ideas without requiring major time investment, and for learning (feel free to check out the lovingly-commented source code).

While efforts has been made to make the components robust and performant enough for development use, they are not necessarily optimised for production environments. Caveat consumptor. If in doubt, feel free to disassemble and reassemble the components to your own purposes.

The components

State Management

  • SimpleStateMachineComponent - Manage state with simple named functions.

Stats

  • StatComponent - Keep track of an arbitrary numerical statistic (stat).
    • AutoRecoverComponent - Give a StatComponent the ability to autorecover over time.
  • HealthComponent - Keep track of a health-like numerical statistic (stat).
    • AutoHealComponent - Give a HealthComponent the ability to autoheal over time.

Movement

  • VelocityComponent - Apply acceleration and deceleration to CharacterBody2D.velocity.
  • ControlsLeftRight - Apply left/right movement to a VelocityComponent.
  • MovementControlsUpDown - Apply up/down movement to a VelocityComponent.
  • MovementControlsFourWay - Apply four-way movement to a VelocityComponent.

Visual

  • PlaceholderComponent - A visual placeholder component.
  • LookAtCursorComponent - Rotate a Node2D to "look" at the cursor.
  • LookAtNodeComponent - Rotate a Node2D to "look" at another Node2D.
  • AlignToVelocityComponent - Align a Node2D's rotation to follow a VelocityComponent.
  • RotateComponent - Rotate a Node2D at a constant angular speed.

Effects

  • BounceComponent - Add a simple bouncing effect to a Node2D.
  • FlashComponent - Add a triggerable flash effect to a Node2D.
  • FlashOnHitComponent - Add a FlashComponent effect to a Node2D, triggered by a collision between a HitboxComponent and a HurtboxComponent.

Interactions

  • HitboxComponent - Inflict damage on a HurtboxComponent.
  • HurtboxComponent - Receive damage from a HitboxComponent.