This is the second project in my Godot learning journey. Inspired by classic arcade flyers and Flappy Bird, this project focuses on implementing global game states, decoupled communication patterns, and persistent data management in Godot 4.
Through this project, I mastered several intermediate Godot concepts:
- Autoloads (Singletons): Managed global game states, scene transitions, and scoring systems across multiple scenes.
- Signal Hub Pattern: Implemented a centralized event bus for decoupled communication, such as broadcasting the player's death to multiple systems.
- Environment Design: Created a seamless infinite-scrolling world using
ParallaxBackgroundandParallaxLayer. - Data Persistence: Utilized
@exportvariables and resource management to store and load high scores locally. - Physics & Animation: Combined
CharacterBody2Dphysics withAnimationPlayerfor smooth, responsive flight mechanics. - Dynamic Difficulty: Developed a system to increase game difficulty based on real-time score milestones.
- Engine: Godot 4.5
- Language: GDScript
- Patterns: Singleton (Autoload), Observer (Signal Hub), and State Management.
# Handles the jump impulse and gravity
func fly(delta: float) -> void:
velocity.y += _gravity * delta
if Input.is_action_just_pressed("jump"):
velocity.y = JUMP_POWER
animation_player.play("jump")
# Handles global death signal and cleanup
func die() -> void:
engine_sound.stop()
set_physics_process(false)
SignalHub.plane_died.emit()- Course: Developed as part of the "Jumpstart to 2D Game Development" course by Richard Allbert and Martyna Olivares.
- Assets: Game assets provided by the course instructor.