flame-engine / flame-engine/flame
Flame v2 changes
- Dominant language
- Dart
- Stars
- 10.8k
- Forks
- 1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 21
Description
# Flame v2 changes
This issue doesn't mean that we are soon to release v2, it's not even on the horizon yet.
In here we'll track breaking changes that we would want to do for Flame v2 so that they are not forgotten.
- [ ] Create a new tree structure, instead of using nested `OrderedSet`, possibly one tree for updating and one for rendering. (see #3957)
- [ ] Support a global z-index/priority, via a `RenderLayer` system. (see #3967)
- [ ] More efficient event system (currently the events go through the whole component tree).
- [ ] Discuss changing anchor system so that children's 0,0 is at parents anchor.
- [ ] Convert the use of `ShapeComponent` in the collision detection to use pure shapes instead.
- [x] #4001
- [ ] Completely rewrite `ParallaxComponent` to have the layers based on `PositionComponent` and make it more intuitive to use.
- [ ] Clean-up the `HasPaint` mixin.
- [x] `ColorEffect` should not take in an `Offset`, but separate doubles.
- [ ] Create a `MarginComponent` that can replace `HudMarginComponent` and work when added to the viewport (or any sized parent).
- [ ] Call `onGameResize` only when the game actually resizes.
- [x] `Component.add()` should return void.
Whoever wants to wait for the component to load can wait for `component.loaded`, and who wants to wait for it to mount can await `component.mounted`.
- [ ] Figure out what to do with Game's `mount/attach` and `remove/detach`.
- [ ] `Component.children` should return a nullable `ComponentSet?`, so that it won't be instantiated when there are no children.
- [ ] Report normal of collision for collision events.
- [ ] Allow decoding json arrays in the root from the cache. (see #2688)
- [x] Rename `GameWidget.controlled` to `GameWidget.managed`.
- [ ] Structure caches so that the are consistent and have method names that make sense.
- [ ] Maybe rename `onPressed` and `onReleased` to `onTapDown` and `onTapUp` in `AdvancedButtonComponent`.
- [x] #4002
- [ ] Add generics for `CameraComponent` type in `FlameGame`.
- [x] Migrate to Float32 vector math.
- [ ] `SpawnComponent` should only have one factory that returns a list of components.
- [ ] `SpriteBatch` should take an `Anchor` in relation to size instead of `Vector2` with exact pixels for the anchor.
- [x] Caches should maybe not have a default `prefix`, so it become more in-line with Flutter (especially for the widgets). (@erickzanardo)
- [x] We should support `package` for the caches and for the widgets' `.asset` constructors. (@erickzanardo)
- [ ] Only expose `Iterable` from `children` and have query etc directly on the Component.
- [x] #3991
- [ ] `onDragCancel` should not delegate to `onDragEnd` by default (see #3926).
- [x] #3997
Contributor guide
Assessment
This issue has not been assessed yet.