This is the seventh project in my Godot learning journey. This project pushes the boundaries of "Game Feel" and System Architecture using advanced particle systems, a data-driven Wave Manager, and an optimized Object Factory.
In this project, I focused on high-speed system architecture and visual polish:
- Data-Driven Wave Management: Developed a custom
WaveManagerthat uses structured data to define enemy types, spawn intervals, and formation patterns, allowing for easy difficulty balancing. - Advanced Object Factory: Expanded the
ObjectMakerpattern to handle high-frequency instantiation of projectiles, power-ups, and VFX without performance bottlenecks. - VFX & Juice: Leveraged
CPUParticles2Dfor sophisticated combat feedback (engine trails, multi-stage explosions, and screen shake), focusing on "Game Feel." - Collision Layers & Masking: Mastered Godot's physics layers to manage complex interactions between player bullets, enemy projectiles, and environmental hazards.
- Dynamic Resource Despawning: Implemented efficient memory management using
VisibleOnScreenNotifier2Dand signal-based cleanup to maintain high FPS during intense combat.
- Engine: Godot 4.5
- Visuals:
CPUParticles2D&ParallaxBackground. - Patterns: Factory Pattern, Data-driven Wave Management, Singleton (SignalHub).
The following snippet demonstrates how the WaveManager coordinates with the ObjectMaker to create structured gameplay flow instead of simple random spawning:
# Professional Wave Control and Object Factory Handshake
func spawn_wave(wave_data: Dictionary) -> void:
for i in range(wave_data.enemy_count):
# Using the Factory to instantiate specific enemy types from data
var enemy = ObjectMaker.create_enemy(wave_data.enemy_type)
# Setting up path-following or position based on wave pattern
enemy.global_position = Vector2(SCREEN_WIDTH + 100, randf_range(50, 600))
enemy.set_speed(wave_data.base_speed + (current_wave * 10))
add_child(enemy)
await get_tree().create_timer(wave_data.spawn_delay).timeout
# VFX trigger via ObjectMaker for 'Juice'
func _on_enemy_destroyed(pos: Vector2) -> void:
ObjectMaker.create_visual_effect(ObjectMaker.FX_TYPE.EXPLOSION, pos)
ObjectMaker.create_visual_effect(ObjectMaker.FX_TYPE.SCREEN_SHAKE)- 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.