This is a discussion for the evolution of the component's .priority
system.
Every Component
has the int priority
property, which determines that component's sorting order within its parent's children
. This approach works for many games, but for some becomes a hindrance, or even necessitates creation of a parallel "priority-like" system.
The "priority" mechanism of the Component
is replaceable and highly customizable, just like everything else in the Flame engine. Maybe it becomes a mixin, or in some other way.
The following priority systems should be provided:
int priority
-- same as the current system;double priority
-- similar to the current approach, but uses floating-point priorities. This is useful in cases when the "priority" is just the distance to the camera, in which case it makes sense to have this distance to be double
;The specifics of the design of the component priority system need to be discussed. In particular, we would want to minimize the amount of breaking changes for our users (though understandably this will be breaking), and if possible go through the deprecation cycles.
One aspect of the transition, which we can implement right away, is to deprecate the priority
argument in the Component
and derived classes, and instead recommend using the priority
setter, which has been implemented recently. Thus, we would recommend users to replace
MyComponent(priority: 7)
with
MyComponent()..priority = 7;
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too