Releases: flame-engine/flame
v1.9.1
v1.9.0
1.9.0
- REFACTOR: Enable DCM linting (#2667). (27a8fd61)
- REFACTOR: Fix lint issues across the codebase - Part 2 (#2677). (10e4109c)
- FIX: Prevent
onRemove
/onDetach
being called for initial Gesture Detector addition (#2653). (d1721464) - FIX: Use root game for gestures (#2756). (f5d0cb38)
- FIX: Add possibility to remove a child and add it to the same parent (#2755). (285d31ab)
- FIX: Adding scale parameter to RectangleComponent constructors (#2730). (173908d9)
- FIX: Set
CameraComponent.priority
to max (#2732). (820ece1c) - FIX: Change to
FilterQuality.medium
instead ofhigh
(#2733). (fc19890c) - FIX: Avoid creating new
Vector2
inglobalToLocal
andlocalToGlobal
(#2727). (9fb3bf8d) - FIX: Ambiguation is not needed in render box anymore (#2711). (b3d78f58)
- FIX: HasGameReference should default to FlameGame (#2710). (93dcb3a1)
- FIX: Make
debugCoordinatesPrecision
into a variable instead of a getter (#2713). (9918c051) - FIX: Absolute angle takes into account BodyComponent ancestors too (#2678). (75aee767)
- FEAT: SpawnComponent (#2709). (83f5ea45)
- FEAT: Add globalToLocal and localToGlobal methods to viewport, viewfinder and camera (#2720). (00185a3b)
- FEAT: Add HoverCallbacks (#2706). (d460b846)
- FEAT: Add
onDispose
togame.dart
called fromgame_widget.dart
(#2659). (2f44e483) - FEAT(flame): Add helper methods to create frame data on
SpriteSheet
(#2754). (47722199) - FEAT: Implement Snapshot mixin on PositionComponent (#2695). (c1ee24a2)
- FEAT: Add TextElementComponent (#2694). (10fb65f6)
- FEAT: Component visibility (HasVisibility mixin) (#2681). (76405daf)
- FEAT: Add
HasWorldReference
mixin (#2746). (9105411d) - FEAT: Add
pause
andisPaused
to SpriteAnimationTicker (#2660). (37271f5c) - DOCS: Improve documentation around SpriteFontTextFormatter (#2661). (8401c569)
- DOCS: Improved spellchecking (#2722). (2f973abe)
- DOCS: Enable CSpell on tests (#2723). (e051298c)
- DOCS: Improve comments and documentation for text-rendering Nodes (#2662). (96978e24)
- DOCS: Fix examples for v1.9.0 (#2757). (152fbb61)
- BREAKING REFACTOR: Rename (Text) Elements, Nodes and Styles for clarity, add docs (#2700). (4b420b79)
- BREAKING REFACTOR: Extract TextRendererFactory (#2680). (eeb6749f)
- BREAKING REFACTOR: Make TextElement more usable on its own (#2679). (1a64443c)
- BREAKING REFACTOR: Simplify text rendering pipeline (#2663). (34f69b95)
- BREAKING REFACTOR: Kill TextRenderer, Long Live TextRenderer (#2683). (a1cb9a06)
- BREAKING FIX: Update should be called before render in first tick (#2714). (51932c09)
- BREAKING FEAT: Move
Forge2DGame
to useCameraComponent
(#2728). (7a3d5126) - BREAKING FEAT: Pause game when backgrounded (#2642). (521e56b6)
- BREAKING FEAT: Add CameraComponent to FlameGame (#2740). (7c2f4000)
v1.8.2
1.8.2
- PERF: Improve performance of raycasts (#2617). (8e0a7879)
- FIX: Reset _completeCompleter in ticker (#2636). (a35d3a10)
- FIX: Viewport should recieve events before the world (#2630). (e852064e)
- FIX: Use
ComponentKey
s to keep track of dispatchers (#2629). (ff59aa15) - FIX: FlameGame onRemove fix to prevent memory leak (#2602). (dac2ebbf)
- FIX: Only use pre-set ReadonlySizeProvider for sizing in HudMarginComponent (#2611). (832c0510)
- FIX: TextBoxConfig dismissDelay to not be ignored (#2607). (1567b389)
- FEAT: Adding key argument to shape components (#2632). (c542d3c3)
- FEAT: Add optional world input to
CameraComponent.canSee
(#2616). (1cad0b23) - FEAT: Add a Circle.fromPoints utility method (#2603). (a83f2815)
- FEAT: Add a midpoint getter to LineSegment (#2605). (1f9f3509)
- FEAT: Add Rectangle.fromLTWH and Rect.toFlameRectangle utility methods (#2604). (76271cee)
- DOCS: Add more guidance to collision detection algorithm choices (#2624). (781e8983)
- BREAKING PERF: Pool
CollisionProspect
s and remove some list creations from the collision detection (#2625). (e430b6cd) - BREAKING FEAT: Make world nullable in
CameraComponent
(#2615). (14f51635)
v1.8.1
1.8.1
- FIX: Adds a check to confirm the component is not loaded (#2579). (985400f2)
- FIX: Animation ticker readability improvements (#2578). (667a1698)
- FIX: Remove
mustCallSuper
fromonComponentTypeCheck
(#2561). (bcae760c) - FIX: Update sdk constraints to >=3.0.0 (#2554). (2f71e06e)
- FIX: Reduce the Vector2 creations in Anchor (#2550). (5a9434b0)
- FIX: Fix disappearing text on TextBoxComponent for larger pixelRatios (#2540). (6e1d5466)
- FEAT: Option to prevent propagating collision events from ShapeHitbox to _hitboxParent (#2594). (a58d7436)
- FEAT: Adding filterQuality arguments to Parallax load methods (#2596). (ff3d9107)
- FEAT: Option to use toImageSync in ImageComposition class (#2593). (66d5f97d)
- FEAT: ComponentKey API (#2566). (b3efb612)
- FEAT(flame): Set a default negative priority on the world for general use (#2572). (390e9700)
- FEAT: Add useful methods to Rectangle class (#2562). (4710530b)
- FIX: Convert PositionEvent.canvasPosition to local coordinates (#2598). (87139c85)
v1.8.0
1.8.0
Note: This release has breaking changes.
- FIX: Update sdk constraints to >=3.0.0 (#2554). (2f71e06e)
- FIX: Reduce the Vector2 creations in Anchor (#2550). (5a9434b0)
- FIX: Fix disappearing text on TextBoxComponent for larger pixelRatios (#2540). (6e1d5466)
- FIX: Avoid the creation of Vector2 objects in Parallax update (#2536). (3849f07d)
- FIX: Solve warnings from 3.10.0 analyzer (#2532). (b41622db)
- FIX: Move
errorBuilder
andloadingBuilder
to constructors (#2526). (55ec0bc3) - FEAT: Add onComplete callback to
AnimationWidget
(#2515). (0b68be8a) - FEAT: Add
stepEngine
toGame
(#2516). (1ed2c5a2) - FEAT: Customise grid of NineTileBox (#2495). (a25b0a03)
- FEAT: Accept
CollisionType
in hitbox constructor (#2509). (89926227) - DOCS: Update content types of sphinx code snippets (#2519). (306ad320)
- BREAKING REFACTOR: Move
CameraComponent
and events out of experimental (#2505). (87b8a067) - BREAKING FEAT: Add
SpriteAnimationTicker
(#2457). (a50c80cf)
Migration instructions
In the future (maybe as early as v1.9.0) this camera will be removed,
please use the CameraComponent instead.
This is the simplest way of using the CameraComponent:
-
Add variables for a CameraComponent and a World to your game class
final world = World(); late final CameraComponent cameraComponent;
-
In your
onLoad
method, initialize the cameraComponent and add the world
to it.@override void onLoad() { cameraComponent = CameraComponent(world: world); addAll([cameraComponent, world]); }
-
Instead of adding the root components directly to your game with
add
,
add them to the world.world.add(yourComponent);
-
(Optional) If you want to add a HUD component, instead of using
PositionType, add the component as a child of the viewport.cameraComponent.viewport.add(yourHudComponent);
v1.7.0
1.7.0
Note: This release has breaking changes.
- REFACTOR: Remove "items" variable from core Broadphase class. (#2284). (1819c575)
- REFACTOR: Added ComponentTreeRoot (#2300). (619b9b15)
- REFACTOR: Simplify how images.dart decodes images (#2293). (b4925423)
- REFACTOR: Use variable name on toString in component_test.dart (#2377). (f5c0e5e9)
- REFACTOR: Remove unused variable "tapTimes" from multi_touch_tap_detector_test.dart (#2379). (cd2b2a10)
- REFACTOR: Component rebalancing is now performed via a global queue (#2352). (1ef51879)
- REFACTOR: Component adoption now handled via ComponentTreeRoot (#2332). (5ceb5dda)
- FIX: Auto-resize
SpriteComponent
on sprite change (#2430). (158460d7) - FIX: Update MoveAlongPathEffect (#2422). (295cd724)
- FIX: Removed component to be deleted from _broadphaseCheckCache (#2282). (236a74ce)
- FIX: TextBoxComponent rendering for new line (#2413). (9008998e)
- FIX: Buttons in ButtonComponents should not be final (#2410). (55f66add)
- FIX: Set size of viewports in
onLoad
(#2452). (d1ac01f5) - FIX: Incorrect JoystickComponent position in landscape mode #2387 (#2389). (f125593a)
- FIX: RouterComponent replace methods to correctly handle previous/nextRoute (#2296). (2b1f2266)
- FIX: Use the hitboxParent instead of the parent in the componentTypeCheck (#2335). (7920e2ba)
- FIX: Materialize list in
Component.removeWhere
(#2458). (13cce4ae) - FIX: TextBoxComponent's boxConfig timePerChar generates "Optimized Out" error #2143 (#2328). (5874f600)
- FIX: Camera no longer "sticks" to boundary with BoundedPositionBehavior (#2307). (914dc6a7)
- FEAT: Add reusable vector to the Vector2 extension (#2429). (03d45df5)
- FEAT: Change
HasCollisionDetection
to be onComponent
(#2404). (637c258b) - FEAT: Added AlignComponent layout component (#2350). (4f5e56f0)
- FEAT: Add
autoResize
forSpriteAnimationComponent
andSpriteAnimationGroupComponent
(#2453). (dbeba238) - FEAT: Adding ImageExtension.resize (#2418). (a3f1601d)
- FEAT: Add position and anchor params for Sprite and SpriteAnimation Particles (#2370). (181e0b59)
- FEAT: Add
autoResize
forSpriteGroupComponent
(#2442). (1576bd83) - FEAT: Introduce flame_noise, deprecate NoiseEffectController (#2393). (b2fdf06a)
- FEAT: Added HardwareKeyboardDetector (#2257). (95b1fc0f)
- FEAT: Allow people to opt-out on repaint boundary (#2341). (b6aeec24)
- FEAT: Add
HasTimeScale
mixin (#2431). (d2a8fe01) - FEAT: Add DoubleTapCallbacks that receives double-tap events. (#2327). (b5f79d1c)
- FEAT: Add ability to opt-out flip (#2316). (34c3b6bd)
- FEAT: Make
limit
field mutable in theTimer
class (#2358). (4e0a8c46) - DOCS: Rename caveace asset to cave_ace in our examples (#2304). (e2399f91)
- DOCS: Update cspell github action and configuration (#2325). (e0a4c07f)
- DOCS: Fix actual typos that made into our dictionary (#2305). (343b8452)
- DOCS: Add Flame logo for pub.dev (#2338). (65091f34)
- DOCS: Refactor documentation for GameWidget (#2344). (655824fc)
- DOCS: Update funding links (#2420). (8294a2a1)
- DOCS: Fix old doc code (#2322). (90321658)
- BREAKING REFACTOR: Use ComponentTreeRoot for component removal (#2317). (75446185)
- BREAKING FEAT: HasDraggableComponents mixin is no longer needed (#2312). (3faf1149)
- BREAKING FEAT: The
HasTappableComponents
mixin is no longer needed (#2450). (b5bdf4ec)
Migration instructions
If you have components that rely on receiving onGameResize calls before they load, then
you can retrieve the game's size in onLo...
v1.6.0
flame
- v1.6.0
- PERF: Avoid Vector2 creation in
Sprite.render
(#2261). (736733d9) - FIX: Only use initialized game for tests and remove setMount from onGameResize (#2246). (2a0f1d4b)
- FIX: Re-use paint object in ImageParticle (#2210). (7a945d96)
- FIX: Depend on test: any for flame_test (#2207). (acfd418d)
- FEAT: Add a
canSee
method to theCameraComponent
(#2270). (2347c8f5) - FEAT: Add
moveBy
toCameraComponent
(#2269). (51e54ebe) - FEAT: Added computed property CameraComponent.visibleWorldRect (#2267). (f4b0e73f)
- DOCS: Update example to not create Rect objects (#2254). (a306338b)
- DOCS: Teh -> the (#2225). (ff7f36d0)
- BREAKING REFACTOR: The method
onLoad()
now returnsFutureOr<void>
(#2228). (d898b539) - BREAKING FEAT: Adds new route methods
pushReplacement
,pushReplacementNamed
, andpushReplacementOverlay
(#2249). (a2772b4e)
v1.5.0
v1.5.0
- REFACTOR: OpacityEffect now uses opacity instead of alpha internally (#2064). (b3b67301)
- REFACTOR: Game render box cleanup (#1691). (60a5830d)
- FIX: Event mixins missing
@mustCallSuper
(#2036). (c26d5da3) - FIX: SpeedController advance() should execute after its effect's onStart() (#2173). (7a1e2e8b)
- FIX: Refresh vertices on size change of
RectangleComponent
(#2167). (4020d68b) - FIX: Fix coordinate system calculation in FixedAspectRationViewport (#2175). (c9c9881c)
- FIX: SpriteButtonComponent missing
@mustCallSuper
added (#2001). (45a9d79b) - FIX: Focus handling with a scope on the
GameWidget
(#1725). (d1cd8517) - FIX: RemoveEffect should work within SequenceEffect (#2110). (03e1f33d)
- FIX: #1966 unit test for
Particles
(#2097). (59bd7ebb) - FIX: OpacityEffect custom paint override (#2056). (fe9d4d9b)
- FIX: #1998 (#2013). (f63711dc)
- FIX: solid circles and polygons intersection (#2067). (62c5c2e1)
- FIX: #2017 (#2039). (7f546b0f)
- FIX: Exception when having multiple calls to dispose() function of a Svg instance (#2085). (a287904e)
- FIX: Add missing hitbox parameters (#2070). (8aacb555)
- FIX: Change
Vector2.zero()
toVector2(0, -1)
inVector2Extensions.fromRadians()
(#2016). (801c683c) - FEAT: Add children to
World
constructor (#2093). (3af416dc) - FEAT: Add paint layers to HasPaint and associated component renders (#2073). (9e6bf4fb)
- FEAT: Add SizeProvider to clip_component and custom_paint_component. (#2100). (bb710646)
- FEAT: Added HasGameReference mixin (#1828). (12ce270b)
- FEAT: Added toString method to all the drags events message handlers (#2014). (a34f1df7)
- FEAT: Add
maintainState
property to Route (#2161). (576ceaac) - FEAT: add onCancelled to ButtonComponent and HudButtonComponent (#2193). (e7f08906)
- FEAT: onComponentTypeCheck support for ShapeHitbox (#1981). (f840210b)
- FEAT: Added glow effect using maskFilter (#2129). (bcecd3c1)
- FEAT: Add support for styles propagating through the text node tree (#1915). (b5780d42)
- FEAT: Added SpriteFont class (#1992). (a0d7eada)
- FEAT: Added CameraComponent.withFixedResolution() constructor (#2176). (e289f118)
- FEAT: Add optional maxDistance to raycast (#2012). (6b78b10f)
- FEAT:
clampLength
forVector2
extension (#2190). (51a896b2) - FEAT: Adding onChildrenChanged (#1976). (3d043b86)
- FEAT: Adding ComponentNotifier API (#1889). (bd7f51f5)
- FEAT:
removed
future +isRemoved
field forComponent
(#2080). (9f322785) - BREAKING FIX: Correct coordinate system for a circular viewport (#2174). (93dc4325)
- BREAKING FIX: PolygonComponent no longer modifies _vertices (#2061). (8cd4793a)
- BREAKING FEAT: Add OpacityProvider (#2062). (0255cc32)
v1.4.0
1.4.0
Note: This release has breaking changes.
-
REFACTOR: move broadphase-related functionality into separate subdir (#1943). (f23acd41)
-
REFACTOR: used simpler and more implicit widgets in GameWidget (#1862). (44d17c64)
-
PERF: SpriteAnimationWidget will re-render only when needed (#1876). (bb678301)
-
FIX: Hitbox children of a CompositeHitbox to return correct parent (#1922). (d518705e)
-
FIX: OpacityEffect rounding error calculation (#1933). (4cfcfa64)
-
FEAT: Make
_ButtonState
public for SpriteButtonComponent (#1941). (e80412c5) -
FEAT: Add possibility for solid hitboxes (#1919). (205ac561)
-
FEAT: Adding callbacks for EffectController (#1926) (#1931). (8dcdf155)
-
FEAT: Add lookAt method for PositionComponent (#1891). (720c3566)
-
FEAT: add applyLifespanToChildren to Particle generate (#1911). (884d5190)
-
FEAT: Add broadphase generics to CollisionDetection (#1908). (f7714122)
-
FEAT: Add support for isometric staggered maps (#1895). (96be8408)
-
FEAT: RecycledQueue now supports modification during iteration (#1884). (01b59493)
-
FEAT: Allow children of
ComposedParticle
to have varied lifespan (#1879). (6db519ec) -
FEAT: Possibility to ignore hitboxes for ray casting (#1863). (b22bc643)
-
DOCS: Added Style Guide and Test Writing Guide (#1897). (999caca1)
-
BREAKING FIX: Make all
ComponentSet
modifications internal (#1877). (f26a066d)
Migration instructions:
For most methods Component has the corresponding methods directly on it already.
For example, instead of using component.children.addAll you should do component.addAll. -
BREAKING CHORE: Remove functions/classes that were scheduled for removal in v1.3.0 (#1867). (00ab347c)
For each deleted function/method/class, the deprecation comment already specifies what functionality should be used instead.
v1.3.0
flame
- v1.3.0
- REFACTOR: Use new "super"-constructors in ShapeComponents (#1752). (b69e8d85)
- REFACTOR: Game is now a class, not a mixin (#1751). (5225a4eb)
- PERF: Use TextElements within the TextComponent (#1802). (7b044430)
- PERF: Avoid unnecessary copy in AssetsCache.readBinaryFile (#1749). (7e79638d)
- FIX: ButtonComponent behavior when the engine is paused (#1726). (197e63d6)
- FIX: Correct flutter constraint (#1731). (c7383843)
- FIX: World component can now be queried with
componentsAtPoint
(#1739). (f750d705) - FIX: Merge basic and advanced gesture detectors (#1718). (f08f8e12)
- FIX: Correct key events in GameWidget.controller (#1745). (01ed2ec9)
- FIX: Camera incorrect follow with zoom and world boundaries. (c1756177)
- FIX: Add missing paint arguments on shapes (#1727). (e59f3428)
- FIX: Delay camera update (#1811). (a5598a8f)
- FIX: Overlays can now be properly added during onLoad (#1759). (9f35b154)
- FIX: SpriteAnimationWidget can now be update animation safely (#1738). (eb070195)
- FIX: JoystickComponent drags using the delta Viewport (#1831). (54e40de6)
- FIX: Specify size for the SpriteWidget (#1760). (82f75fcb)
- FEAT: New colours to pallete.dart (#1783). (85cd60e1)
- FEAT: add
children
argument toSpriteComponent.fromImage
(#1793). (80a63362) - FEAT: Added Decorator class and HasDecorator mixin (#1781). (8d00847c)
- FEAT: Added TextFormatter classes (#1720). (c44272be)
- FEAT: Move to Flutter 3.0.0 and Dart 2.17.0 (#1713). (2a41d0d6)
- FEAT: Added Rotate3DDecorator (#1805). (f05194c8)
- FEAT: Added Shadow3DDecorator (#1812). (0a41b2da)
- FEAT: Add tertiary tap detector mixin (#1815). (e9e7b0d5)
- FEAT: Add
Ray2
class to be used in raytracing/casting (#1788). (26196c01) - FEAT: Added RouterComponent (#1755). (24092bd7)
- FEAT: Structured text and text styles (#1830). (bfdc3a29)
- FEAT: Drag events that dispatch using componentsAtPoint (#1715). (10669c12)
- FEAT: Added routes that can return a value (#1848). (f1b276e0)
- FEAT: PositionComponent now has a built-in Decorator (#1846). (8dd52c33)
- FEAT: add
HasAncestor
mixin (#1711). (987a44f4) - FEAT: Added ability to control overlays via the RouterComponent (#1840). (e2de70c9)
- FEAT: Add vector projection and inversion (#1787). (d197870f)
- DOCS: Klondike tutorial, part 4 (#1740). (02d0b71b)
- BREAKING REFACTOR: Matcher closeToVector() now accepts Vector2 as an argument (#1761). (c5083501)
- BREAKING PERF: Game.images/assets are now same as Flame.images/assets by default (#1775). (0ccb0e2e)
- BREAKING FEAT: Raycasting and raytracing (#1785). (ed452dd1)