0.1.1
Performance Improvements
This update includes several changes and optimization for performance.
Component storage has been completely rebuilt.
Lookup and retrieval APIs are now substantially faster.
let myComponent = entity[MyComponent.self]
//
let myComponent = entity.component(ofType: MyComponent.self)
//
let hasMyComponent = entity.hasComponent(ofType: MyComponent.self)
Standardized DeltaTime
deltaTime is now a multiple of 0.004166666667 which will reduce floating point rounding errors.
This change is a step toward making the simulation deterministic.
Because of this change highPrecisionDeltaTime has been removed.
PerformanceRenderingSystem
The PerformanceRenderingSystem
is a RenderingSystem you can add to your game to visualize performance.
The values displayed have been completely overhauled.
- "Frame Time": The duration in milliseconds from simulation start to renderer, but not round trip.
- "Total Systems Time": The total System, PlatformSystem, and RenderingSystem duration in milliseconds.
- "Rendering Systems": The weight in percent of RenderingSystems.
- "Systems": The weight in percent of System and PlatformSystem.
- All systems are now weighted by percent of the "Total Systems Time".
You can use the PerformanceRenderingSystem by simply adding it to your game:
game.insertSystem(PerformanceRenderingSystem.self)
Bug Fixes & Other
- Removed excessive inlining which caused some slowdowns
- Fixed an issue where OpenGL platforms would fail render some geometry.