Repository navigation
Open
Labels
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 Make the Flame Component System core more efficient #3957) - Support a global z-index/priority, via a
RenderLayersystem. (see Add a RenderLayer system for global render ordering #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
ShapeComponentin the collision detection to use pure shapes instead. - Return a list instead of a set from the collision detection methods. #4001
- Completely rewrite
ParallaxComponentto have the layers based onPositionComponentand make it more intuitive to use. - Clean-up the
HasPaintmixin. -
ColorEffectshould not take in anOffset, but separate doubles. - Create a
MarginComponentthat can replaceHudMarginComponentand work when added to the viewport (or any sized parent). - Call
onGameResizeonly when the game actually resizes. -
Component.add()should return void.
Whoever wants to wait for the component to load can wait forcomponent.loaded, and who wants to wait for it to mount can awaitcomponent.mounted. - Figure out what to do with Game's
mount/attachandremove/detach. -
Component.childrenshould return a nullableComponentSet?, 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 fix!: Allow AssetCache to load json files with array at root #2688)
- Rename
GameWidget.controlledtoGameWidget.managed. - Structure caches so that the are consistent and have method names that make sense.
- Maybe rename
onPressedandonReleasedtoonTapDownandonTapUpinAdvancedButtonComponent. - Remove middle intersection point on line for collision detection. #4002
- Add generics for
CameraComponenttype inFlameGame. - Migrate to Float32 vector math.
-
SpawnComponentshould only have one factory that returns a list of components. -
SpriteBatchshould take anAnchorin relation to size instead ofVector2with exact pixels for the anchor. - Caches should maybe not have a default
prefix, so it become more in-line with Flutter (especially for the widgets). (@erickzanardo) - We should support
packagefor the caches and for the widgets'.assetconstructors. (@erickzanardo) - Only expose
Iterable<Component>fromchildrenand have query etc directly on the Component. -
game.paused->game.isPaused#3991 -
onDragCancelshould not delegate toonDragEndby default (see fix: onDragCancel should not delegate to onDragEnd by default #3926). - The whole component tree should be waited for in the initial
onLoadin theFlameGame. #3997
Reacted by Pasha Stetsenko, Jochum van der Ploeg, Guillaume Huard Hughes, Munsterlander, Felix Lee, FluffyBunniesTasteTheBest, Aditya Agarwal, Bulent Baris Kilic, Hwanseok Kang (Barth), William CHAZOT and 19 more
Reacted by Heache Bear, Gnarhard, xuelinger2333, Karunjith M and vladyslav1nikov1activeops
Activity
MuZiLee commentedon Dec 3, 2022
Looking forward to the v2
[-]Flame v2 breaking changes[/-][+]Flame v2 changes[/+]guyluz11 commentedon Aug 22, 2023
What holding us back?, there is only one task that got converted into an issue
spydon commentedon Aug 22, 2023
First we want to stabilize the current version with the new CameraComponent API and there is still some work left to do there.
NashIlli commentedon Apr 1, 2024
Hello, @spydon! Is Version 2 included in the route of the following months? Thaaanks! :)
spydon commentedon Apr 1, 2024
Hi, unfortunately not, we have not even decided on paper how the big architectural changes will look.
marzoukali commentedon Nov 23, 2025
Any updates on when to expect version 2 or do you need any help getting it back on track? We can share with the community the challenges and build separate team dedicated for it. I suggest if this is still in plan, we will need to have it's effort as separate from the current.
ufrshubham commentedon Nov 24, 2025
I am not sure of it will be a good idea to have separate efforts for this. Although v2 will have breaking changes, I'd still want the transition to be as smooth as possible. Maintaining two separate versions might drastically change the APIs causing users to re-write a significant portion of their game.
spydon commentedon Nov 24, 2025
@marzoukali we have some bigger architectural changes that we need to decide and plan internally before we start this project.
NashIlli commentedon Jan 18, 2026
@spydon, regarding the roadmap for Flame v2, are there any plans to implement native integration with the Rive Renderer, or will Flame continue to operate as a layer on top of Flutter's standard graphics pipeline (Skia/Impeller)?
I'm curious if a more direct bridge is being considered to leverage Rive's new hardware-accelerated capabilities directly within the Flame game loop. What are your thoughts on the long-term architectural direction for this?
spydon commentedon Jan 18, 2026
@NashIlli no, we don't plan to use the rive renderer directly in flame. Possibly we'll add support for it in flame_rive though.
NashIlli commentedon Jan 20, 2026
@spydon thanks for the clarification. To confirm, does this mean support will remain limited to Flutter’s renderer, or do you envision flame_rive eventually being able to leverage the full feature set and performance optimizations of the Rive renderer indirectly?
spydon commentedon Jan 21, 2026
@NashIlli we have spoken about making a generic canvas interface so that the user can easily swap out rendering, but it's nothing that is planned for the near future.
naychrist commentedon Aug 17, 2026
+1 for the ability to swap out rendering for rive through a generic canvas interface :)
loving the recent commits I've seen re Box2d v3!
spydon commentedon Aug 17, 2026
@naychrist flame_forge2d 0.20.0 was released yesterday and that uses forge2d 0.15.1 which is using Box2D v3!
It's wild how much more efficient it is.