GECS v5.0.0 Release Notes #64
csprance
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
[5.0.0] - 2025-10-15 - Major ECS Overhaul & Performance Awesomeness (Some Small Breaking Changes)
GECS v5.0.0 is a major release with massive performance improvements, API simplification, and relationship system overhaul.
This release combines all improvements from v5.0.0-rc1 through v5.0.0-rc4, delivering the most performant and cleanest GECS API to date.
📦 What's in This Release
3 Breaking Changes:
Major Performance Improvements:
New Features:
Entity.on_update() Lifecycle Method Removed
The
on_update(delta)lifecycle method has been removed from the Entity class:on_update(delta)method removed - This lifecycle hook is no longer calledMigration:
on_update(delta)in Entity classentity.on_update(delta)called every frameExample Migration:
Why this change?
This enforces proper ECS architecture where Entities are pure data containers and all logic lives in Systems. This makes code more modular, testable, and performant.
System.process_all() and System._process_parallel() No Longer Return Booleans
The
process_all()and_process_parallel()methods now returnvoidinstead ofbool:did_runvariable removed - Internal tracking variable was never usedbooltovoid- Return values were never checked or usedMigration:
var result = system.process_all(entities, delta)system.process_all(entities, delta)process_all()returningboolprocess_all()returningvoidWhy this change?
The boolean return values were historical artifacts that were never actually used anywhere in the codebase. Removing them simplifies the API and makes the code cleaner.
Removed Weak/Strong Matching System
The weak/strong matching system has been completely replaced with a simpler, more intuitive approach:
weakparameter removed from all relationship methodsComponent.equals()method removed - use component queries insteadMigration:
entity.has_relationship(Relationship.new(C_Eats.new(5), target), false)entity.has_relationship(Relationship.new({C_Eats: {'value': {"_eq": 5}}}, target))entity.has_relationship(Relationship.new(C_Eats.new(), target), true)entity.has_relationship(Relationship.new(C_Eats.new(), target))entity.get_relationship(rel, true, true)entity.get_relationship(rel)entity.get_relationships(rel, true)entity.get_relationships(rel)equals()in component{C_Type: {'prop': {"_eq": value}}}Component Query Improvements
0,false, etc.✨ New Features
Simplified Relationship Matching
Target Component Queries (NEW!)
Limited Relationship Removal
🚨 Migration Guide
1. Remove
weakParameters2. Replace Strong Matching with Component Queries
3. Remove
equals()Overrides4. Check any deps function and sorting order
Topological sort was broken in previous versions. It is now fixed and as a result some systems may now be running in the correct order defined in the deps
but it may end up to be the wrong order for your game code. Check these depenencies by doing:
print(ECS.world.systems_by_group)this will show you the sortedsystems and how they are running. Do a comparison between this version and the previous versions of GECS.
🧪 Test Suite Improvements
Performance Test Cleanup
scene_runnerpatternauto_free()andworld.purge()for cleanupFiles Updated:
addons/gecs/tests/performance/performance_test_base.gd- Uses scene_runner for proper test setupaddons/gecs/tests/performance/performance_test_entities.gd- Refactored to use auto_free patternaddons/gecs/tests/performance/performance_test_components.gd- Simplified cleanup using world.purgeaddons/gecs/tests/performance/performance_test_queries.gd- Removed manual cleanup codeaddons/gecs/tests/performance/performance_test_systems.gd- Uses scene_runner for world managementaddons/gecs/tests/performance/performance_test_integration.gd- Consistent with core test patternsaddons/gecs/tests/performance/performance_test_system_process.gd- Proper node lifecycle management🚀 Performance Improvements
Massive Query Cache Key Optimization (from v5.0.0-rc4)
85% faster cache key generation leading to dramatic query performance improvements:
Technical Details:
str(comp)fallbacks with directget_instance_id()callsImpact:
System Processing Improvements (from v5.0.0 final)
Removing unused internal tracking improved system performance:
Removing unused boolean returns and
did_runtracking reduced conditional logic and CPU overhead.📦 Files Changed in This Release
Core Framework Changes:
addons/gecs/ecs/entity.gd- BREAKING: Removedon_update()lifecycle method and weak parameters from relationship methodsaddons/gecs/ecs/system.gd- BREAKING:process_all()and_process_parallel()now returnvoidinstead ofbooladdons/gecs/ecs/relationship.gd- BREAKING: Removed weak parameter, added target_query supportaddons/gecs/ecs/component.gd- BREAKING: Removedequals()methodaddons/gecs/ecs/world.gd- System dependency topological sort fixesaddons/gecs/ecs/ecs.gd- Updated for new system processingLibrary Updates:
addons/gecs/lib/component_query_matcher.gd- FIXED: Properly handle falsy values (0, false, etc.)Documentation Updates:
addons/gecs/docs/CORE_CONCEPTS.md- Updated entity lifecycle and system examplesaddons/gecs/docs/RELATIONSHIPS.md- Complete rewrite for new relationship systemaddons/gecs/docs/CLAUDE.md- Updated with new relationship patternsCHANGELOG.md- Comprehensive v5.0.0 documentationREADME.md- Updated for v5.0.0 releaseTest Updates:
addons/gecs/tests/core/test_relationships.gd- Updated all tests to new APIaddons/gecs/tests/systems/s_performance_test.gd- Updated for new system signaturesaddons/gecs/tests/systems/s_noop.gd- New test helper systemaddons/gecs/tests/performance/test_hotpath_breakdown.gd- New performance testExample Updates:
example/main.gd- Updated to use v5.0.0 APIexample/systems/s_velocity.gd- Updated system implementationexample/systems/s_random_velocity.gd- Updated system implementation📜 Release Candidate History
This v5.0.0 release consolidates all improvements from the RC phase:
v5.0.0-rc1 (Relationship System Overhaul):
v5.0.0-rc2 & rc3 (Test Suite Improvements):
auto_free()andworld.purge()v5.0.0-rc4 (Query Performance Revolution):
v5.0.0-final (API Cleanup):
Entity.on_update()lifecycle methodSystem.process_all()to returnvoid🌟 Community & Support
Full Changelog: v4.x...v5.0.0
This discussion was created from the release GECS v5.0.0 Release Notes.
Beta Was this translation helpful? Give feedback.
All reactions