Pass lag time to system update. Time scale factor to apply on times passed down, engine should still track real time. May be nice to pass the real time down to systems as well.
Also implement velocity components and systems to interpolate positions before rendering.
Velocities and positions should be parent-able. It may make sense to use a centralized system to manage parenting as it is starting to apply in many places (renderer overlays, transforms, velocities, etc). Dirty state should be an integer revision id to allow arbitrary refresh order of child/parent while ensuring all get properly updated in a single pass. Probably would be helpful to split local/global transform and velocity as each would be required depending on the use.
May also be nice to introduce a new RenderTransform component to enable interpolation for rendering.
[x] Add time scale factor engine and update State and System update methods
[x] Implement Versioned component trait
[x] Update interface of Transform2D to be parent aware and versioned
[x] Test and fix overlay refactor
[x] Implement Velocity2D component and system. Update render interpolator system
Pass lag time to system update. Time scale factor to apply on times passed down, engine should still track real time. May be nice to pass the real time down to systems as well.
Also implement velocity components and systems to interpolate positions before rendering.
Velocities and positions should be parent-able. It may make sense to use a centralized system to manage parenting as it is starting to apply in many places (renderer overlays, transforms, velocities, etc). Dirty state should be an integer revision id to allow arbitrary refresh order of child/parent while ensuring all get properly updated in a single pass. Probably would be helpful to split local/global transform and velocity as each would be required depending on the use.
May also be nice to introduce a new RenderTransform component to enable interpolation for rendering.