A minimalist Flutter game engine

Overview

flame

A minimalistic Flutter game engine.

Test


English | 简体中文 | Polski | Русский | Español


About 1.0.0

Our goal is to release v1 soon. We are periodically launching RCs (release candidates) as we evolve the code, and we are already quite happy with where we are (but there might still be further changes).

Please use this version to get a preview of the new Flame version and also to give the team feedback about the new structure and/or features.

The main branch is the bleeding edge of the v1 migration. The master-v0.x branch is the latest v0 release (where we are still merging some patches and crucial fixes).

The current v1 release is on pub. The latest stable version so far is . Feel free to choose the one that better suits your needs.


Documentation

Note that the documentation in the main branch of this repo is newer than the latest released version.

Here you can find the documentation for different versions:

The complete documentation can be found here.

We provide many examples of different features which can be tried out from your browser here. You can also check the examples source code here.

The official site for Flame, which also contains the documentation can be found here.

Help

We have a Flame help channel on Blue Fire's Discord, join it here.

We also have a FAQ, so please search for your question there first.

Goals

The goal of this project is to provide a complete set of out-of-the-way solutions for the common problems every game developed in Flutter will share.

Currently it provides you with:

  • a game loop
  • a component/object system
  • a physics engine (Forge2D, available through flame_forge2d)
  • audio support
  • effects and particles
  • gesture and input support
  • images, sprites and sprite sheets
  • basic Rive support
  • and a few other utilities to make development easier

You can use whichever ones you want, as they are all somewhat independent.

Sponsors

The Flame Engine's top sponsors:

Cypher Stack

Want to sponsor Flame? Check our Patreon on the section below or contact us on Discord.

Support

The simplest way to show us your support is by giving the project a star.

You can also support us by becoming a patron on Patreon:

Patreon

Or by making a single donation by buying us a coffee:

Buy Me A Coffee

You can also show on your repository that your game is made with Flame by using one of the following badges:

Powered by Flame Powered by Flame Powered by Flame

[![Powered by Flame](https://img.shields.io/badge/Powered%20by-%F0%9F%94%A5-orange.svg)](https://flame-engine.org)
[![Powered by Flame](https://img.shields.io/badge/Powered%20by-%F0%9F%94%A5-orange.svg?style=flat-square)](https://flame-engine.org)
[![Powered by Flame](https://img.shields.io/badge/Powered%20by-%F0%9F%94%A5-orange.svg?style=for-the-badge)](https://flame-engine.org)

Contributing

Warning: We are working on bringing Flame to its first stable version, updates on 0.x versions are frozen, except for crucial bug fixes. If you want to contribute to that version, please be mindful of that, and use the master-v0.x branch. For contributions for v1, your PR must point to the main branch. If in doubt, make sure to talk about your contribution to the team, either via an issue or Discord.

Any help is appreciated! Comments, suggestions, issues, PRs.

Have you found a bug or have a suggestion of how to enhance Flame? Open an issue and we will take a look at it as soon as possible.

Do you want to contribute with a PR? PRs are always welcome, just be sure to create it from the orrect branch (see above) and follow the checklist which will appear when you open the PR.

Getting started

A collection of guides can be found here. Note that these tutorials are based on the main branch. To make sure you are looking at the tutorials that work with your current version, select the correct version tag.

This collection of guides is a work in progress, more guides and tutorials will be added soon.

We also offer a curated list of Games, Libraries and Articles over at awesome-flame.

Note that some of the articles might be slightly outdated, but they are still useful.

Credits

  • The Flame Engine team, who are continuously working on maintaining and improving Flame.
  • All the friendly contributors and people who are helping in the community.
Comments
  • feat: Add `isFirstFrame` and `onStart` event to `SpriteAnimation`

    feat: Add `isFirstFrame` and `onStart` event to `SpriteAnimation`

    Description

    This adds isFirstFrame and onStart event callback to sprite_animation.dart. May not be useful for everyone but I needed to trigger another event whenever an animation was called as multiple factors could trigger that animation.

    Checklist

    • [x] The title of my PR starts with a [Conventional Commit] prefix (fix:, feat:, docs: etc).
    • [x] I have read the [Contributor Guide] and followed the process outlined for submitting PRs.
    • [x] I have updated/added tests for ALL new/updated/fixed functionality.
    • [x] I have updated/added relevant documentation in docs and added dartdoc comments with ///.
    • [ ] I have updated/added relevant examples in examples.

    Breaking Change

    • [ ] Yes, this is a breaking change.
    • [x] No, this is not a breaking change.
    opened by munsterlander 40
  • null safety

    null safety

    This is a work in progress.

    ordered_set uses override to a branch in my fork until this is merged https://github.com/luanpotter/ordered_set/pull/5.

    As for now, nothing is done in the flame code itself.

    Todo:

    • [x] prepare main pubspec.yaml file
    • [x] migrate main dependencies
    • [x] migrate main code
    • [x] prepare examples pubspec.yaml files
    • [x] migrate examples dependencies
    • [x] migrate examples code
    • [x] ensure CI passes
    • [x] changelog entry
    • [x] rebase on master with null safety backports merged in
    • [x] Dashbook null safety release
    opened by lig 28
  • feat: Added RouterComponent

    feat: Added RouterComponent

    Description

    This PR adds the RouterComponent (see the docs for the description of its functionality).

    https://user-images.githubusercontent.com/4231472/175832885-bcd1b821-c263-4d83-a4a6-daedf8e5f79f.mov

    Checklist

    • [x] The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
    • [x] I have read the Contributor Guide and followed the process outlined for submitting PRs.
    • [x] I have updated/added tests for ALL new/updated/fixed functionality.
    • [x] I have updated/added relevant documentation in docs and added dartdoc comments with ///.
    • [x] I have updated/added relevant examples in examples.

    Breaking Change

    • [-] Yes, this is a breaking change.
    • [x] No, this is not a breaking change.

    Related Issues

    ~~Prerequisite: #1781~~ Closes #1375

    opened by st-pasha 27
  • `flipHorizontallyAroundCenter` changes component position during position change

    `flipHorizontallyAroundCenter` changes component position during position change

    Current bug behaviour

    Components center is to the left by components size.

    Expected behaviour

    Component center remains the same as before applying flips.

    Steps to reproduce

    1. Have component face right direction
    2. Start moving component to left direction applying flipHorizontallyAroundCenter before that.
    3. While component is moving apply flipHorizontallyAroundCenter again. (aka change facing direction back to right)

    Please see video attached

    Flame reference: main branch.

    Flutter doctor output

    Output of: flutter doctor -v

    [✓] Flutter (Channel stable, 2.5.3, on macOS 11.6 20G165 darwin-x64, locale en-UA)
        • Flutter version 2.5.3 at /Users/onov/IdeaProjects/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 18116933e7 (6 weeks ago), 2021-10-15 10:46:35 -0700
        • Engine revision d3ea636dc5
        • Dart version 2.14.4
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc4)
        • Android SDK at /Users/onov/Library/Android/sdk
        • Platform android-31, build-tools 31.0.0-rc4
        • ANDROID_HOME = /Users/onov/Library/Android/sdk
        • Java binary at: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_232-b09)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 13.1, Build version 13A1030d
        • CocoaPods version 1.11.2
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [!] Android Studio
        • Android Studio at /Applications/Android Studio Preview.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        ✗ Unable to find bundled Java version.
        • Try updating or re-installing Android Studio.
    
    [✓] IntelliJ IDEA Community Edition (version 2021.2.3)
        • IntelliJ at /Applications/IntelliJ IDEA CE.app
        • Flutter plugin version 62.0.3
        • Dart plugin version 212.5632
    
    [✓] VS Code (version 1.62.3)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.28.0
    
    [✓] Connected device (3 available)
        • SM A505FN (mobile) • R58M96Y8GWP • android-arm64  • Android 10 (API 29)
        • macOS (desktop)    • macos       • darwin-x64     • macOS 11.6 20G165 darwin-x64
        • Chrome (web)       • chrome      • web-javascript • Google Chrome 96.0.4664.55
    

    More environment information

    • Flame version: main branch
    • Platform affected: Android
    • Platform version affected: Android 10

    Log information

    N/A

    More information

    Worth noticing that I am changing component size dynamically

    https://user-images.githubusercontent.com/6299150/143201803-8e0e91c0-39b1-48ec-8b78-bdef8fc86b0f.mov

    bug 
    opened by OlegNovosad 24
  • Memory leak problem

    Memory leak problem

    Hello!

    Using Flame for online window builder

    Current bug behaviour

    For some reason, when removing components from the game field - they remain in memory As a result, a memory leak occurs and the application crashes (when reaching 2gb)

    Steps to reproduce

    image image

    Each step, the components are removed from the game field and the modified ones are added again

    Tried to remove components with Component.shouldRemove flag, Component.remove and Component.removeFromParent methods

    Components removing from game field, but still in memory

    Flutter doctor output

    [✓] Flutter (Channel stable, 2.10.1, on macOS 12.1 21C52 darwin-x64, locale ru-RU)
        • Flutter version 2.10.1 at /Users/username/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision db747aa133 (5 недель назад), 2022-02-09 13:57:35 -0600
        • Engine revision ab46186b24
        • Dart version 2.16.1
        • DevTools version 2.9.2
    
    [!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
        • Android SDK at /Users/username/Library/Android/sdk
        ✗ cmdline-tools component is missing
          Run `path/to/sdkmanager --install "cmdline-tools;latest"`
          See https://developer.android.com/studio/command-line for more details.
        ✗ Android license status unknown.
          Run `flutter doctor --android-licenses` to accept the SDK licenses.
          See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • CocoaPods version 1.11.2
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 4.1)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    
    [✓] VS Code (version 1.65.2)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.29.0
    
    [✓] Connected device (3 available)
        • iPhone (Иван) (mobile)              • 00008101-000E211E3E92001E            • ios            • iOS 15.1.1 19B81
        • iPhone SE (2nd generation) (mobile) • E7F342C4-8A95-4C1E-AF73-F65E40314490 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-2 (simulator)
        • Chrome (web)                        • chrome                               • web-javascript • Google Chrome 99.0.4844.51
    
    [✓] HTTP Host Availability
        • All required HTTP hosts are available
    

    More environment information

    • Flame version: 1.0.0
    • Platform affected: android, ios

    Thanks!

    bug 
    opened by perfperm 22
  • Flame tiled web rendering vertical lines issue while camera movement

    Flame tiled web rendering vertical lines issue while camera movement

    Current bug behaviour

    Expected behaviour

    Vertical lines issue in web whenever camera moves, in android as APK there is no issue. Those vertical lines exist only for the web.

    https://user-images.githubusercontent.com/52130837/143884831-18c50e76-03c2-4afe-8829-4437223b542d.mp4

    Steps to reproduce

    https://beach-website.web.app/#/ use arrow keys to move the player

    repo: https://github.com/Jcupzz/beach_hack_website_2022

    Flutter doctor output

    Output of: flutter doctor -v
    

    More environment information

    flame: ^1.0.0-releasecandidate.16 flame_tiled: ^1.0.0-releasecandidate.15

    Log information

    Enter log information in this code block
    

    More information

    https://github.com/flutter/flutter/issues/14288

    bug 
    opened by Jcupzz 21
  • [Box2D] Random deletion of body components in release mode

    [Box2D] Random deletion of body components in release mode

    Hello there 🙂 ,

    Each time I test my game in release mode, I have weird random behaviours, and those bugs never happen in debug mode.

    The most annoying bug is the one that delete randomly some body component of the world. In this video, you can see that the circle component at the half of the worm is destroyed just after launching it.

    ezgif com-video-to-gif (2)

    Here is the slow motion of the moment where the body component is deleted: ezgif com-video-to-gif (3)

    There is another bug I encountered only in release mode (I can't explain this one, but it seems there is an position issue with a body) : ezgif com-video-to-gif (4)

    Thanks 🙏

    opened by tommybuonomo 21
  • Game not running on web

    Game not running on web

    Everytime I try to run my game on web it gives me the error below, the game works fine on phone.

    image

    image

    Could not load content for http://localhost:52472/C:/src/flutter/bin/cache/flutter_web_sdk/lib/_engine/engine/dom_renderer.dart (HTTP error: status code 400, net::ERR_HTTP_RESPONSE_CODE_FAILURE)

    Pubspec.yaml

    image

    Error in the terminal:

    Error parsing request.
    Invalid argument (requestedUri): handlerPath "null" and url "null" must combine to equal requestedUri path "/C:/src/flutter/bin/cache/flutter_we
    b_sdk/lib/_engine/engine/dom_renderer.dart".: Instance of '_Uri'
    dart:isolate  _RawReceivePortImpl._handleMessage
    

    I aleady did flutter clean, I tried flutter run with --release and debug, same error. even if I don't render anything (empty constructor) on the screen it gives me the error.

    MyGame(){

    // Empty here

    }

    main.dart

    void main() async{
    
      WidgetsFlutterBinding.ensureInitialized();
    
      if(!kIsWeb){
        await Flame.util.fullScreen();
        await Flame.util.setOrientation(DeviceOrientation.landscapeLeft);
      }
    
      await Flame.images.loadAll([
    
          ...
    
      ]);
      await Flame.audio.loadAll(
        [
    
         ...
    
        ]
      );
    
      // Disable audio logs since it can confuse the log
      Flame.audio.disableLog();
    
      // Get the screen size
      Size size = await Flame.util.initialDimensions();
    
      // Create a singleton to retrieve the screen size in all app
      Config config = Config(screenSize: size);
    
      // Register singletons to retrieve it later
      Get.put(config);
      Get.put(AudioController());
      Get.put(MyGame());
    
      runApp(Get.find<MyGame>().widget);
      //runApp(MyGame().widget); //Also tried without retrieving the game class from the singleton
    
    
    }
    

    flutter doctor -v

    [√] Flutter (Channel beta, 1.19.0-4.3.pre, on Microsoft Windows [versão 10.0.18363.900], locale pt-BR)
        • Flutter version 1.19.0-4.3.pre at C:\src\flutter
        • Framework revision 8fe7655ed2 (8 days ago), 2020-07-01 14:31:18 -0700
        • Engine revision 9a28c3bcf4
        • Dart version 2.9.0 (build 2.9.0-14.1.beta)
    
    
    [√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
        • Android SDK at C:\Users\Dih\AppData\Local\Android\sdk
        • Platform android-29, build-tools 29.0.3
        • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
        • All Android licenses accepted.
    
    [√] Chrome - develop for the web
        • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
    
    [√] Android Studio (version 4.0)
        • Android Studio at C:\Program Files\Android\Android Studio
        • Flutter plugin version 47.1.2
        • Dart plugin version 193.7361
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    
    [√] VS Code (version 1.46.0)
        • VS Code at C:\Users\Dih\AppData\Local\Programs\Microsoft VS Code
        • Flutter extension version 3.11.0
    
    [√] Connected device (2 available)
        • Web Server • web-server • web-javascript • Flutter Tools
        • Chrome     • chrome     • web-javascript • Google Chrome 83.0.4103.116
    
    • No issues found!
    
    question 
    opened by d-apps 21
  • feat: Aligned text in the TextBoxComponent

    feat: Aligned text in the TextBoxComponent

    Description

    • Added option align in the TextBoxComponent which controls the alignment of text.
    • Added option for the TextBoxComponent to have a fixed size (before the only mode was for the textbox to automatically expand/shrink to fit the text).

    Checklist

    • [x] The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
    • [x] I have read the Contributor Guide and followed the process outlined for submitting PRs.
    • [x] I have updated/added tests for ALL new/updated/fixed functionality.
    • [x] I have updated/added relevant documentation in docs and added dartdoc comments with ///.
    • [x] I have updated/added relevant examples in examples.

    Breaking Change

    • [-] Yes, this is a breaking change.
    • [x] No, this is not a breaking change.

    Related Issues

    Closes #1088

    opened by st-pasha 20
  • feat(ai): Add Pursue behavior from gdx-ai

    feat(ai): Add Pursue behavior from gdx-ai

    Description

    This is the beginning of the work on porting the gdxAI library into dart and integrating it into the Flame engine.

    This PR adds the Pursue behavior, and implements some of the basic interface classes such as Steerable, Limiter, Location, SteeringBehavior, and SteeringAcceleration.

    I have also made some modifications to the original Pursue algorithm, for comparison the timings of the old and the new algorithm are as follows: | test name | original time | current time | |---------------|---------------|--------------| | pursuit exact | 7.0 | 7.0 | | pursuit 1 | 4.34 | 4.28 | | pursuit 2 | 1000 | 14.34 | | pursuit 3 | 1000 | 2.6 | | pursuit 4 | 12.90 | 4.8 | | pursuit 5 | 20.26 | 10.84 | | pursuit 6 | 1.18 | 1.18 | | chase 1 | 305.6 | 302.8 | | chase 2 | 252.6 | 250.4 | | chase 3 | 17.3 | 16.2 |

    https://user-images.githubusercontent.com/4231472/147298375-8a5de9b3-7a18-41e9-bf1d-9707963347fd.mov

    Checklist

    • [x] The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
    • [x] I have read the Contributor Guide and followed the process outlined for submitting PRs.
    • [x] I have updated/added tests for ALL new/updated/fixed functionality.
    • [x] I have updated/added relevant documentation in docs and added dartdoc comments with ///.
    • [x] I have updated/added relevant examples in examples.

    Breaking Change

    • [x] No, this is not a breaking change.

    Related Issues

    WIP for #1164

    opened by st-pasha 20
  • feat: Added 1d+2d Perlin and Simplex noise functions

    feat: Added 1d+2d Perlin and Simplex noise functions

    Description

    These functions are used in games for a variety of purposes: terrain generation, visual effects, randomized motion, textures, enemy spawns, etc, etc.

    This implementation is ported from the original code by Stefan Gustavson, and manually verified that it produces the same values as his C code. The original library had more varieties of noise functions, including 3D- and 4D- noise, as well as noise with gradients and periodic noise. If needed, those other functions can be ported as well.

    Checklist

    • [x] The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
    • [x] I have read the Contributor Guide and followed the process outlined for submitting PRs.
    • [x] I have updated/added tests for ALL new/updated/fixed functionality.
    • [x] I have updated/added relevant documentation in docs and added dartdoc comments with ///.
    • (NA) I have updated/added relevant examples in examples.

    Breaking Change

    • [x] No, this is not a breaking change.

    Related Issues

    WIP for #396

    opened by st-pasha 20
  • [core] Create a new BareFlameGame class

    [core] Create a new BareFlameGame class

    The BareFlameGame class would be like the FlameGame (i.e. based on a component tree), but without the built-in camera (hence, "bare"). Thus, its structure would be something like this:

    class BareFlameGame extends Game {
      final Component root;
    
      void update(dt) => root.updateTree(dt);
      void render(canvas) => root.renderTree(canvas);
      Future<void> add(child) => root.add(child);
      Future<void> addAll(children) => root.addAll(children);
      void remove(child) => root.remove(child);
      void removeAll(children) => root.removeAll(children);
    
      // + more pass-through methods like that.
    }
    

    This would essentially be a bare-bones FCS game, without any additional features.

    This class would make it easier to use the new CameraComponent without having to carry around the old camera too.

    enhancement 
    opened by st-pasha 3
  • Create SpriteFont class

    Create SpriteFont class

    Currently we have SpriteFontTextFormatter, but not the SpriteFont class. Encapsulating the font information into a dedicated class would make it easier to create multiple formatters from the same font definition (i.e. for different font sizes, colors, etc); and also to support sprite-fonts from the TextStyle class.

    The change would affect the construction of the SpriteFontTextFormatter. We could make it slow via the regular deprecation cycle, or fast by making a breaking change.

    enhancement 
    opened by st-pasha 2
  • Allow the new TapCallbacks API to recognize secondary mouse button clicks

    Allow the new TapCallbacks API to recognize secondary mouse button clicks

    Problem to solve

    Allow desktop and web games to use the second mouse button. The right-click is a common input method for some games. Think deselecting in a city builder, issuing commands in an RTS, or secondary weapon fire in a top-down shooter.

    Background

    Flame is currently in transition from the TapDetector-Tappable API to the newer HasTappableComponents-TapCallbacks API. The old TapDetector API doesn't seem to work with the new CameraComponent API (at least I can't make it work - I always get screen coords, never game coords). The new API is better in every way, except that its callbacks don't give info about the button (primary / secondary / tertiary).

    The new API's main workhorse class is HasTappableComponents (a mixin on Game). This class implements MultiTapListener, and that class is a facade to Flutter framework's MultiTapGestureRecognizer (code here).

    The problem: Flutter's MultiTapGestureRecognizer doesn't have a concept of the right click. If Flame uses MultiTapGestureRecognizer as the underlying API, it cannot support secondary mouse button action.

    Proposal

    I'm not sure where the new API is heading, so I can only offer a newcomer's view. I'm guessing I would add a new class, SingleTapListener, that closely follows MultiTapListener in functionality. This class would be "the new TapDetector" — it would forward events from Flutter's TapGestureRecognizer, but in the new way that respects the CameraComponent.

    The old TapDetector and the new SingleTapListener would likely have to be exclusive (you either implement from one or the other).

    HasTappableComponents would then implement the new SingleTapListener alongside the MultiTapListener, and would send the event down (like so).

    The TapDownEvent class would gain a new member, pointerEvent, which would just copy Flutter's PointerEvent. This const class has everything anyone could need, including pressure, tilt, kind, buttons, etc. The primary / secondary / tertiary button is easily extracted from PointerEvent.buttons.

    More information

    • This has been discussed on Discord here and here
    • I'm very new to the codebase but I'm willing to have a stab at it. I do need someone to give me the blessing. As I mentioned, I have no idea where the new API is heading. I might be misreading the direction.
    enhancement 
    opened by filiph 1
  • fix: OpacityEffect rounding error calculation

    fix: OpacityEffect rounding error calculation

    Description

    When using OpacityEffect.fadeOut, the value of opacity at the end of the effect was non zero. I suspect that the rounding error calculation is wrong and this PR tried to simplify that logic.

    Proof that this PR actually fixes the problem can be seen at the test results of 793415f and 5f3c591. First one just added a test for OpacityEffect.fadeOut and second added the actual fix.

    Disclaimer: I don't fully understand this part of the code, so be extra vigilant while reviewing this PR.

    Checklist

    • [x] The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
    • [x] I have followed the Contributor Guide when preparing my PR.
    • [x] I have updated/added tests for ALL new/updated/fixed functionality.
    • [-] I have updated/added relevant documentation in docs and added dartdoc comments with ///.
    • [-] I have updated/added relevant examples in examples or docs.

    Breaking Change?

    • [ ] Yes, this PR is a breaking change.
    • [x] No, this PR is not a breaking change.

    Related Issues

    Closes #1574

    opened by ufrshubham 6
  • How to simulate the software effect? Like a rope.

    How to simulate the software effect? Like a rope.

    Problem to solve

    flame is a very good game engine, thank you very much for your contributions. Now I have a problem in using it, how to simulate the software effect? Like a rope.

    More information

    rope

    question 
    opened by iBinbro 4
  • Gesture: System gesture gate timed out.

    Gesture: System gesture gate timed out.

    [SystemGestureGate] <0x101c8d590> Gesture: System gesture gate timed out.

    1.i use flame in my project. 2.i add 'HasTappableComponents','HasDraggableComponents' these two mixin about Gesture into Class FlameGame. 3.it worked normally on ios 15.4,it makes error when i update on ios 16.0. 4.but it works normally on android.

    flutter doctor: [✓] Flutter (Channel stable, 3.0.1, on macOS 12.6 21G115 darwin-x64, locale zh-Hans-CN) [✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) [✓] Xcode - develop for iOS and macOS (Xcode 14.0)

    device information: • android-arm64 • Android 12(API 31) • ios • iOS 16.0 20A362

    Actual results:

    Code sample
    class MyFlameGame extends FlameGame
        with
            //碰撞检测
            HasCollisionDetection,
            //点击事件和拖动事件不互斥,不影响操作机制
            //点击事件
            HasTappableComponents,
            //拖动事件
            HasDraggableComponents {
    
      ///按压事件
      @override
      void onTapDown(TapDownEvent event) {
        super.onTapDown(event);
        //游戏界面右上角两个按钮响应区域
        if (event.canvasPosition.x >= width - 75.0 &&
            event.canvasPosition.y <= safeTop + 80.0) {
          gameExit.call();
        } else if (event.canvasPosition.x >= width - 145.0 &&
            event.canvasPosition.y <= safeTop + 80.0) {
          gameStop.call();
        } else {
          //人物控制
          if (event.canvasPosition.x >= (playerLayer.x + playerLayer.size.x / 2)) {
            playerLayer.moveToRight();
          } else {
            playerLayer.moveToLeft();
          }
        }
      }
    
      ///停止按压事件
      @override
      void onTapUp(TapUpEvent event) {
        super.onTapUp(event);
        //player停止移动
        playerLayer.movePause();
      }
    
      ///取消按压事件
      @override
      void onTapCancel(TapCancelEvent event) {
        super.onTapCancel(event);
        //player停止移动
        playerLayer.movePause();
      }
    
      ///记录上一次拖动的位置
      double lastX = 0.0;
      DIRECTION direction = DIRECTION.none;
    
      ///开始拖动
      @override
      void onDragStart(DragStartEvent event) {
        super.onDragStart(event);
        lastX = event.canvasPosition.x;
        if (lastX > playerLayer.x) {
          direction = DIRECTION.right;
        } else if (lastX < playerLayer.x) {
          direction = DIRECTION.left;
        } else {
          direction = DIRECTION.none;
        }
      }
    
      ///拖动中
      @override
      void onDragUpdate(DragUpdateEvent event) {
        super.onDragUpdate(event);
        if (event.canvasPosition.x > lastX) {
          playerLayer.moveToRight();
        } else if (event.canvasPosition.x < lastX) {
          playerLayer.moveToLeft();
        } else {
          switch (direction) {
            case DIRECTION.left:
              playerLayer.moveToLeft();
              break;
            case DIRECTION.right:
              playerLayer.moveToRight();
              break;
            case DIRECTION.none:
            default:
              playerLayer.movePause();
          }
        }
        lastX = event.canvasPosition.x;
      }
    
      ///拖动结束
      @override
      void onDragEnd(DragEndEvent event) {
        super.onDragEnd(event);
        playerLayer.movePause();
      }
    
      ///拖动取消
      @override
      void onDragCancel(DragCancelEvent event) {
        super.onDragCancel(event);
        playerLayer.movePause();
      }
    }
    
    Flutter issue 
    opened by wl1395182472 4
Releases(1.3.0)
  • 1.3.0(Aug 28, 2022)

    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 to SpriteComponent.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)
    Source code(tar.gz)
    Source code(zip)
  • v1.2.1(Jul 9, 2022)

    • REFACTOR: Organize Component class (#1608). (069294f4)
    • REFACTOR: Remove unecessary copy operation on Camera (#1708). (94cc115a)
    • REFACTOR: Update and guarantee consistency on mocktail dev dependency version across repo (#1701). (f4a98878)
    • REFACTOR: Add onComplete as optional parameter (#1686). (4ca65f8a)
    • REFACTOR: Added MultiDragListener - common API between HasDraggables and MultiTouchDragDetector (#1668). (801dbba1)
    • REFACTOR: Simplify Component.firstChild, .lastChild, and .findParent (#1673). (84f2f57e)
    • REFACTOR: Replace some usages of fold<> with .sum (#1670). (dd05ecb6)
    • REFACTOR: Deprecate ComponentSet.createDefault() (#1676). (f37e3a20)
    • REFACTOR: Simplify HudButtonComponent (#1647). (30d84b7c)
    • REFACTOR: Component's lifecycle futures moved into LifecycleManager (#1613). (39201c40)
    • REFACTOR: TextRenderer and TextPaint moved to separate files (#1628). (5e1f5966)
    • REFACTOR: Move to package imports (#1625). (843ddc36)
    • REFACTOR: Improve tests (#1609). (f33b3986)
    • FIX: Fix tile flips when using canvas.drawAtlas (#1610). (b4ad498f)
    • FIX: Expose CompositeHitbox (#1589). (78775798)
    • FIX: Anchor equality operator is now more reliable (#1560). (0d6581ef)
    • FIX: Deprecate Anchor.translate() (#1672). (80c648fc)
    • FIX: Avoid leaks when using PictureRecorders (#1643). (d67065e5)
    • FIX: Remove nonVirtual method shouldRemove (#1707). (1efd067e)
    • FIX: Fix flame package example app (#1709). (bd2ef967)
    • FIX: Subscription for events when game changes in GameWidget (#1659). (04f0d5d1)
    • FIX: performance improvements on SpriteBatch APIs (#1637). (4b19a1b2)
    • FIX: Removed warnings using flutter v3 (#1640). (69214827)
    • FIX: ParallaxComponent.update mustCallSuper (#1635). (9474ce74)
    • FIX: Isometric tile map component uses scale when getting block from position (#1569). (0c430786)
    • FIX: Dispose TextBoxComponent image cache properly (#1579). (c0e3257a)
    • FIX: ParentIsA missing mustCallSuper (#1604). (72129019)
    • FIX: Component can now be removed in any lifecycle stage (#1601). (c0a14156)
    • FIX: Export NotifyingVector2 (#1633). (aeaf9999)
    • FIX: RectangleHitbox should shrink to bounds (#1596). (60df3b9f)
    • FIX: Components in uninitialized state can now be safely removed (#1551). (ba617790)
    • FIX: Bug in "tty" TextBoxComponent (#1619). (6cc3e827)
    • FIX: Component.loaded future sometimes failed to complete (#1593). (89ee9b98)
    • FIX: correctly calculating frame length (#1578). (efda45e7)
    • FIX: Optimize AcceleratedParticle and MovingParticle (#1568). (5591c109)
    • FEAT: Method componentsAtPoint now reports the "stacktrace" of points (#1615). (e2398966)
    • FEAT: Allow changing parent from null parent (#1662). (53268b5f)
    • FEAT: Callbacks in HudButtonComponent constructor and ViewportMargin mixin to avoid code duplication (#1685). (f55b2e0d)
    • FEAT: Add more lint rules (#1703). (49252f8e)
    • FEAT: Keep stacktrace when rethrowing an error from GameWidget (#1675). (dd28183b)
    • FEAT: Aligned text in the TextBoxComponent (#1620). (c64aedae)
    • FEAT: Included completed completer in SpriteAnimation (#1564). (71999b19)
    • FEAT: Optional key for Images.load (#1624). (067c34b5)
    • FEAT: Bump to Flutter 2.10.0 (#1617). (beac9013)
    • FEAT: Add isFirstFrame and onStart event to SpriteAnimation (#1492). (701d0706)
    • FEAT: Add FpsComponent and FpsTextComponent (#1595). (4c68c2b0)
    • FEAT: Added FollowBehavior and ability for the new Camera to follow a component (#1561). (b583388c)
    • FEAT: Added componentsAtPoint() iterable (#1518). (b99e3512)
    • FEAT: Added AnchorToEffect and AnchorByEffect (#1556). (eff72794)
    • FEAT: Added utility function solveCubic() (#1696). (31784ca0)
    • FEAT: add FutureOr support on SpriteButton (#1645). (2e82dc95)
    • FEAT: MoveAlongPathEffect can now be applied to any PositionProvider (#1555). (a0ff2d18)
    • FEAT: adding KeyboardListenerComponent (#1594). (c887c361)
    • FEAT: new flame bloc API (#1538). (f98970a9)
    • FEAT: Added the onLongTapDown event (#1587). (ed302d89)
    • FEAT: Add ability to add/remove multiple overlays at once (#1657). (0ac84c00)
    • FEAT: Helpers for whether a PositionComponent is flipped. (#1700). (cf67147e)
    • FEAT: World bounds for a CameraComponent (#1605). (abb497ab)
    • FEAT: Implement tap events based on componentsAtPoint (#1661). (2711ba60)
    • FEAT: add ParentIsA to force parent child relations (#1566). (2cdf3868)
    • FEAT: Adding classes for raw geometric shapes (#1528). (666a2b19)
    • FEAT: Add solveQuadratic() utility function (#1665). (d8bbfc06)
    • FEAT: allow external packages to await for game to be loaded (#1699). (a15eda0b)
    • FEAT: Children as argument to FlameGame (#1680). (db336c03)
    • FEAT: Add range constructor on SpriteAnimationData (#1572). (e42b4958)
    • FEAT: Add helper function for creating golden tests (#1623). (d0faaada)
    • FEAT: Added ability to render spritesheet-based fonts (#1634). (3f287898)
    • BREAKING FIX: FixedResolutionViewport noClip -> clip (#1612). (02be4acd)
    • BREAKING FIX: Game.mouseCursor and Game.overlays can now be safely set during onLoad (#1498). (821d01c3)
    • BREAKING FEAT: Added anchor for the Viewport (#1611). (c3bb14b7)
    • BREAKING FEAT: remove onTimingsCallback for Flutter 3.0 (#1626). (0761a79d)
    • BREAKING FEAT: Add ability to render without loading on image related widgets (#1674). (40a061bc)
    • BREAKING FEAT: Adding GameWidget.controlled (#1650). (7ef6a51e)
    • BREAKING FEAT: Size effects will now work only on components implementing SizeProvider (#1571). (1bfed571)
    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Jun 7, 2022)

    v1.2.0

    Note: This release has breaking changes.
    
    REFACTOR: Organize Component class (https://github.com/flame-engine/flame/issues/1608). ([069294f4](https://github.com/flame-engine/flame/commit/069294f44082a5d4ae6e9eff1d29be9cb06ee4a7))
    
    REFACTOR: Remove unecessary copy operation on Camera (https://github.com/flame-engine/flame/issues/1708). ([94cc115a](https://github.com/flame-engine/flame/commit/94cc115a9ee6660d1f3a72378e8b35523b83bfad))
    
    REFACTOR: Update and guarantee consistency on mocktail dev dependency version across repo (https://github.com/flame-engine/flame/issues/1701). ([f4a98878](https://github.com/flame-engine/flame/commit/f4a98878062dbd4fe8238a8b014e6be3e528c5d8))
    
    REFACTOR: Add onComplete as optional parameter (https://github.com/flame-engine/flame/issues/1686). ([4ca65f8a](https://github.com/flame-engine/flame/commit/4ca65f8a2c330d61527e071434441f2df9deefb4))
    
    REFACTOR: Added MultiDragListener - common API between HasDraggables and MultiTouchDragDetector (https://github.com/flame-engine/flame/issues/1668). ([801dbba1](https://github.com/flame-engine/flame/commit/801dbba1d8b6fd721d4e2fc752c70f97d4771198))
    
    REFACTOR: Simplify Component.firstChild, .lastChild, and .findParent (https://github.com/flame-engine/flame/issues/1673). ([84f2f57e](https://github.com/flame-engine/flame/commit/84f2f57e5fddb82572177b2bcd0f8309a891ea4e))
    
    REFACTOR: Replace some usages of fold<> with .sum (https://github.com/flame-engine/flame/issues/1670). ([dd05ecb6](https://github.com/flame-engine/flame/commit/dd05ecb6b8b105b4d1fc894dc6ce7ca3f8cf793e))
    
    REFACTOR: Deprecate ComponentSet.createDefault() (https://github.com/flame-engine/flame/issues/1676). ([f37e3a20](https://github.com/flame-engine/flame/commit/f37e3a2028e16143d8bb3218691904c38fb848a4))
    
    REFACTOR: Simplify HudButtonComponent (https://github.com/flame-engine/flame/issues/1647). ([30d84b7c](https://github.com/flame-engine/flame/commit/30d84b7caea128c7dc579dce170129e462bc03bf))
    
    REFACTOR: Component's lifecycle futures moved into LifecycleManager (https://github.com/flame-engine/flame/issues/1613). ([39201c40](https://github.com/flame-engine/flame/commit/39201c40fa3eea5dbdbaa823309cdf8856f912a6))
    
    REFACTOR: TextRenderer and TextPaint moved to separate files (https://github.com/flame-engine/flame/issues/1628). ([5e1f5966](https://github.com/flame-engine/flame/commit/5e1f59663bf7e09a02475979d1eded54dbaaefd7))
    
    REFACTOR: Move to package imports (https://github.com/flame-engine/flame/issues/1625). ([843ddc36](https://github.com/flame-engine/flame/commit/843ddc36249272fcb518b44672e1012307dfa1b5))
    
    REFACTOR: Improve tests (https://github.com/flame-engine/flame/issues/1609). ([f33b3986](https://github.com/flame-engine/flame/commit/f33b3986cd913416ae3955c922d6cc8b0db872e3))
    
    FIX: Fix tile flips when using canvas.drawAtlas (https://github.com/flame-engine/flame/issues/1610). ([b4ad498f](https://github.com/flame-engine/flame/commit/b4ad498fe5488795deb2c2e098fcde357b448bf0))
    
    FIX: Expose CompositeHitbox (https://github.com/flame-engine/flame/issues/1589). ([78775798](https://github.com/flame-engine/flame/commit/7877579868041f4844ebae885da559097b7aa8a5))
    
    FIX: Anchor equality operator is now more reliable (https://github.com/flame-engine/flame/issues/1560). ([0d6581ef](https://github.com/flame-engine/flame/commit/0d6581ef1aaff4437b2a84f9e57d7d0e1d093d1f))
    
    FIX: Deprecate Anchor.translate() (https://github.com/flame-engine/flame/issues/1672). ([80c648fc](https://github.com/flame-engine/flame/commit/80c648fc94dc00e37f2c0876fec39b2628b3128a))
    
    FIX: Avoid leaks when using PictureRecorders (https://github.com/flame-engine/flame/issues/1643). ([d67065e5](https://github.com/flame-engine/flame/commit/d67065e52db453b0f4f190a7aec1bec6bc389e45))
    
    FIX: Remove nonVirtual method shouldRemove (https://github.com/flame-engine/flame/issues/1707). ([1efd067e](https://github.com/flame-engine/flame/commit/1efd067e31ad425941e5b83891c7289ba063ec90))
    
    FIX: Fix flame package example app (https://github.com/flame-engine/flame/issues/1709). ([bd2ef967](https://github.com/flame-engine/flame/commit/bd2ef967e10eb0309e0a468652a657cae3d5e7d5))
    
    FIX: Subscription for events when game changes in GameWidget (https://github.com/flame-engine/flame/issues/1659). ([04f0d5d1](https://github.com/flame-engine/flame/commit/04f0d5d172ca5065e58e8b9b5536cbce706147d4))
    
    FIX: performance improvements on SpriteBatch APIs (https://github.com/flame-engine/flame/issues/1637). ([4b19a1b2](https://github.com/flame-engine/flame/commit/4b19a1b203c5cfca5bb412b91c795fe6a215506e))
    
    FIX: Removed warnings using flutter v3 (https://github.com/flame-engine/flame/issues/1640). ([69214827](https://github.com/flame-engine/flame/commit/69214827a0edb563468951256eccecab408f89df))
    
    FIX: ParallaxComponent.update mustCallSuper (https://github.com/flame-engine/flame/issues/1635). ([9474ce74](https://github.com/flame-engine/flame/commit/9474ce7425ffc18f6b1a1a35c35f59b76f435166))
    
    FIX: Isometric tile map component uses scale when getting block from position (https://github.com/flame-engine/flame/issues/1569). ([0c430786](https://github.com/flame-engine/flame/commit/0c430786e2774174424a21a13464e93d04c69295))
    
    FIX: Dispose TextBoxComponent image cache properly (https://github.com/flame-engine/flame/issues/1579). ([c0e3257a](https://github.com/flame-engine/flame/commit/c0e3257a0b348885275f2659c351bacbfa5a8732))
    
    FIX: ParentIsA missing mustCallSuper (https://github.com/flame-engine/flame/issues/1604). ([72129019](https://github.com/flame-engine/flame/commit/721290198cc7062f8cfb958cb8499e64be7a1e9c))
    
    FIX: Component can now be removed in any lifecycle stage (https://github.com/flame-engine/flame/issues/1601). ([c0a14156](https://github.com/flame-engine/flame/commit/c0a141563b9e832b1a81bf32d860d4dfb2b359ae))
    
    FIX: Export NotifyingVector2 (https://github.com/flame-engine/flame/issues/1633). ([aeaf9999](https://github.com/flame-engine/flame/commit/aeaf9999b0b4f69e394063d3af8e18f67dff5ed9))
    
    FIX: RectangleHitbox should shrink to bounds (https://github.com/flame-engine/flame/issues/1596). ([60df3b9f](https://github.com/flame-engine/flame/commit/60df3b9f60f538fbad7a3d806f5d38262ab6d66c))
    
    FIX: Components in uninitialized state can now be safely removed (https://github.com/flame-engine/flame/issues/1551). ([ba617790](https://github.com/flame-engine/flame/commit/ba617790e4a7ca4dc03f4a2e29de43d42efd3482))
    
    FIX: Bug in "tty" TextBoxComponent (https://github.com/flame-engine/flame/issues/1619). ([6cc3e827](https://github.com/flame-engine/flame/commit/6cc3e82727509f8877873b095c84eef3543fe01e))
    
    FIX: Component.loaded future sometimes failed to complete (https://github.com/flame-engine/flame/issues/1593). ([89ee9b98](https://github.com/flame-engine/flame/commit/89ee9b984bfc3784dedde1ada1daa992a9f0dedc))
    
    FIX: correctly calculating frame length (https://github.com/flame-engine/flame/issues/1578). ([efda45e7](https://github.com/flame-engine/flame/commit/efda45e76c38a2d38a4cd0bb66ece9792f5832df))
    
    FIX: Optimize AcceleratedParticle and MovingParticle (https://github.com/flame-engine/flame/issues/1568). ([5591c109](https://github.com/flame-engine/flame/commit/5591c109437309907cdac72f0bb479a6a6bfa00a))
    
    FEAT: Method componentsAtPoint now reports the "stacktrace" of points (https://github.com/flame-engine/flame/issues/1615). ([e2398966](https://github.com/flame-engine/flame/commit/e239896624f1e2736de83148ff172ca1b0f97dae))
    
    FEAT: Allow changing parent from null parent (https://github.com/flame-engine/flame/issues/1662). ([53268b5f](https://github.com/flame-engine/flame/commit/53268b5f5fd81f3822bfda9721b97be4e72e48e3))
    
    FEAT: Callbacks in HudButtonComponent constructor and ViewportMargin mixin to avoid code duplication (https://github.com/flame-engine/flame/issues/1685). ([f55b2e0d](https://github.com/flame-engine/flame/commit/f55b2e0dc01c98718e4871430c6745472c221821))
    
    FEAT: Add more lint rules (https://github.com/flame-engine/flame/issues/1703). ([49252f8e](https://github.com/flame-engine/flame/commit/49252f8ef29aa6b77144dcb97c24346f2f39380b))
    
    FEAT: Keep stacktrace when rethrowing an error from GameWidget (https://github.com/flame-engine/flame/issues/1675). ([dd28183b](https://github.com/flame-engine/flame/commit/dd28183bc4ebe2ea2f80d1dab3b5ab22d11b8382))
    
    FEAT: Aligned text in the TextBoxComponent (https://github.com/flame-engine/flame/issues/1620). ([c64aedae](https://github.com/flame-engine/flame/commit/c64aedaeb3fed908722b8872b71e288ff87bc761))
    
    FEAT: Included completed completer in SpriteAnimation (https://github.com/flame-engine/flame/issues/1564). ([71999b19](https://github.com/flame-engine/flame/commit/71999b191af0285e8d61583b041da58afd40d8d2))
    
    FEAT: Optional key for Images.load (https://github.com/flame-engine/flame/issues/1624). ([067c34b5](https://github.com/flame-engine/flame/commit/067c34b5f29e1a9bd51861d872092ae5ee0a551f))
    
    FEAT: Bump to Flutter 2.10.0 (https://github.com/flame-engine/flame/issues/1617). ([beac9013](https://github.com/flame-engine/flame/commit/beac901313456cf0b39b6f4e6459f0feed183614))
    
    FEAT: Add isFirstFrame and onStart event to SpriteAnimation (https://github.com/flame-engine/flame/issues/1492). ([701d0706](https://github.com/flame-engine/flame/commit/701d0706af74e6437d71376d468b32bb2537e5b7))
    
    FEAT: Add FpsComponent and FpsTextComponent (https://github.com/flame-engine/flame/issues/1595). ([4c68c2b0](https://github.com/flame-engine/flame/commit/4c68c2b0a2660e705b30099234da4ab1eb4616d0))
    
    FEAT: Added FollowBehavior and ability for the new Camera to follow a component (https://github.com/flame-engine/flame/issues/1561). ([b583388c](https://github.com/flame-engine/flame/commit/b583388ca432f799ad13b92a3a7bf25ddf98ceb0))
    
    FEAT: Added componentsAtPoint() iterable (https://github.com/flame-engine/flame/issues/1518). ([b99e3512](https://github.com/flame-engine/flame/commit/b99e35120dc4fe81ebfedc89a666286ec489384c))
    
    FEAT: Added AnchorToEffect and AnchorByEffect (https://github.com/flame-engine/flame/issues/1556). ([eff72794](https://github.com/flame-engine/flame/commit/eff72794afed73bdb1df8e14b17d50f0f446e92b))
    
    FEAT: Added utility function solveCubic() (https://github.com/flame-engine/flame/issues/1696). ([31784ca0](https://github.com/flame-engine/flame/commit/31784ca0b05082042003f847be2b4004da83edb6))
    
    FEAT: add FutureOr support on SpriteButton (https://github.com/flame-engine/flame/issues/1645). ([2e82dc95](https://github.com/flame-engine/flame/commit/2e82dc95ecd6d7298239cadad5a746341c37fcd9))
    
    FEAT: MoveAlongPathEffect can now be applied to any PositionProvider (https://github.com/flame-engine/flame/issues/1555). ([a0ff2d18](https://github.com/flame-engine/flame/commit/a0ff2d18a1efc54f648a277453fa9cf6414ce44c))
    
    FEAT: adding KeyboardListenerComponent (https://github.com/flame-engine/flame/issues/1594). ([c887c361](https://github.com/flame-engine/flame/commit/c887c3616e9f65209b8e29cb8575a0052db3e2bb))
    
    FEAT: new flame bloc API (https://github.com/flame-engine/flame/issues/1538). ([f98970a9](https://github.com/flame-engine/flame/commit/f98970a91f91fe70e4a38834d7b69bfcb438d197))
    
    FEAT: Added the onLongTapDown event (https://github.com/flame-engine/flame/issues/1587). ([ed302d89](https://github.com/flame-engine/flame/commit/ed302d89160cd7391e3aaf66a0038cd8f57ceca9))
    
    FEAT: Add ability to add/remove multiple overlays at once (https://github.com/flame-engine/flame/issues/1657). ([0ac84c00](https://github.com/flame-engine/flame/commit/0ac84c0024338cbe87fcff264b83e01192aa355b))
    
    FEAT: Helpers for whether a PositionComponent is flipped. (https://github.com/flame-engine/flame/issues/1700). ([cf67147e](https://github.com/flame-engine/flame/commit/cf67147ea37aed8e5f1dd12def442dccbe4576fd))
    
    FEAT: World bounds for a CameraComponent (https://github.com/flame-engine/flame/issues/1605). ([abb497ab](https://github.com/flame-engine/flame/commit/abb497abe47f6366d27f44d25535924bd7de8a28))
    
    FEAT: Implement tap events based on componentsAtPoint (https://github.com/flame-engine/flame/issues/1661). ([2711ba60](https://github.com/flame-engine/flame/commit/2711ba60c2c700984d8a90d90519e17850038ab4))
    
    FEAT: add ParentIsA to force parent child relations (https://github.com/flame-engine/flame/issues/1566). ([2cdf3868](https://github.com/flame-engine/flame/commit/2cdf3868460f04cee76079e3f81cdd12fb407d3a))
    
    FEAT: Adding classes for raw geometric shapes (https://github.com/flame-engine/flame/issues/1528). ([666a2b19](https://github.com/flame-engine/flame/commit/666a2b199fc740d02628321bb19511ba98de1700))
    
    FEAT: Add solveQuadratic() utility function (https://github.com/flame-engine/flame/issues/1665). ([d8bbfc06](https://github.com/flame-engine/flame/commit/d8bbfc067e3885cedd133de47a98134fc15c9c82))
    
    FEAT: allow external packages to await for game to be loaded (https://github.com/flame-engine/flame/issues/1699). ([a15eda0b](https://github.com/flame-engine/flame/commit/a15eda0b67d6020bcb72162f0186e3c5069674bb))
    
    FEAT: Children as argument to FlameGame (https://github.com/flame-engine/flame/issues/1680). ([db336c03](https://github.com/flame-engine/flame/commit/db336c03b607b878faf618cb1ab5833cd859d0e6))
    
    FEAT: Add range constructor on SpriteAnimationData (https://github.com/flame-engine/flame/issues/1572). ([e42b4958](https://github.com/flame-engine/flame/commit/e42b495805efd2e969cfe412b069ffcc6e828ad6))
    
    FEAT: Add helper function for creating golden tests (https://github.com/flame-engine/flame/issues/1623). ([d0faaada](https://github.com/flame-engine/flame/commit/d0faaada2bb971c2dde5a37dfa20d316c532ea28))
    
    FEAT: Added ability to render spritesheet-based fonts (https://github.com/flame-engine/flame/issues/1634). ([3f287898](https://github.com/flame-engine/flame/commit/3f2878988195606b90d9e48b981444792af08ebe))
    
    BREAKING FIX: FixedResolutionViewport noClip -> clip (https://github.com/flame-engine/flame/issues/1612). ([02be4acd](https://github.com/flame-engine/flame/commit/02be4acd8798254eeaf832863d4000e1c5240db1))
    
    BREAKING FEAT: Adding GameWidget.controlled (https://github.com/flame-engine/flame/issues/1650). ([7ef6a51e](https://github.com/flame-engine/flame/commit/7ef6a51ec60a70807a126b6121a1fd4379b8e19b))
    
    BREAKING FEAT: remove onTimingsCallback for Flutter 3.0 (https://github.com/flame-engine/flame/issues/1626). ([0761a79d](https://github.com/flame-engine/flame/commit/0761a79df6c88a5a6ba74ec78d4f600983657c06))
    
    BREAKING FIX: Game.mouseCursor and Game.overlays can now be safely set during onLoad (https://github.com/flame-engine/flame/issues/1498). ([821d01c3](https://github.com/flame-engine/flame/commit/821d01c3fab3cdd9e80d6ead8d491ea2e8ec0643)) Migration instructions: The mouseCursor property is now a plain property with a setter, not a ChangeNotifier. Consequently, instead of writing game.mouseCursor.value = ..., one needs to write game.mouseCursor = ... now.
    
    BREAKING FEAT: Added anchor for the Viewport (https://github.com/flame-engine/flame/issues/1611). ([c3bb14b7](https://github.com/flame-engine/flame/commit/c3bb14b7ca9513fc75f51b0a5cbc9d986db48dd6)) Migration instructions: The coordinate system of the Viewport now always has the origin in the top-left corner of its bounding box (previously it was in the center) -- similar to the local coordinate system of a PositionComponent.
    
    BREAKING FEAT: Add ability to render without loading on image related widgets (https://github.com/flame-engine/flame/issues/1674). ([40a061bc](https://github.com/flame-engine/flame/commit/40a061bcf06b5bf028911964617c1d1e2599460a)) Migration instructions: It only breaks SpriteButton when you are using future as a sprite or pressedSprite parameter. You should use SpriteButton.future if previously you are using future as a parameter.
    
    BREAKING FEAT: Size effects will now work only on components implementing SizeProvider (https://github.com/flame-engine/flame/issues/1571). ([1bfed571](https://github.com/flame-engine/flame/commit/1bfed57132330fb948962261735a0545eb37e7b9)) Migration instructions: It only breaks SpriteButton when you are using future as a sprite or pressedSprite parameter. You should use SpriteButton.future if previously you are using future as a parameter.
    
    Source code(tar.gz)
    Source code(zip)
  • 1.1.1(Apr 12, 2022)

    2022-04-12

    Changes


    Packages with breaking changes:

    Packages with other changes:

    Packages with dependency updates only:

    Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.

    • flame_audio - v1.0.2
    • flame_flare - v1.1.1
    • flame_fire_atlas - v1.0.2

    flame_forge2d - v0.11.0

    • FEAT: Bump forg2d version and have flame_forge2d examples use latest syntax (#1535). (4f7a12eb)
    • FEAT: Added children parameter to Component constructor (#1525). (f0b31fcf)
    • DOCS: Fix flame_forge2d readme links (#1540). (c51bc6db)
    • BREAKING FEAT: Flip gravity in flame_forge2d to be able to mix Forge2D and Flame components (#1506). (bdb360f1)

    flame - v1.1.1

    • REFACTOR: Added classes MoveByEffect and MoveToEffect (#1524). (2171a119)
    • FIX: Invalidate polygon cache on resize (#1529). (11bf75d0)
    • FIX: Bug with anchor parameter in Sprite.render() (#1508). (325df46e)
    • FIX: Make CollisionProspect's a, b have unordered equality (#1519). (5b2471c8)
    • FEAT: able to clear all overlays (#1536). (7b15c9a1)
    • FEAT: Automatic Isometric Grid scaling (#1468). (cae8c0ce)
    • FEAT: Added children parameter to Component constructor (#1525). (f0b31fcf)
    • FEAT: Camera's Viewfinder can now be affected by rotation effects (#1527). (f46cae04)
    • FEAT: Scale (zoom) effects can now be applied to Viewfinder in CameraComponent (#1514). (403b6e60)
    • FEAT: adding HasGameRef.mockGameRef (#1520). (4f389f8b)
    • FEAT: flame tests can now generate golden tests (#1501). (316a0b3b)

    flame_oxygen - v0.1.2

    flame_bloc - v1.3.0

    • FEAT: flame tests can now generate golden tests (#1501). (316a0b3b)

    flame_rive - v1.2.0

    • FEAT: Added children parameter to Component constructor (#1525). (f0b31fcf)

    flame_svg - v1.2.0

    • FEAT: Added children parameter to Component constructor (#1525). (f0b31fcf)

    flame_test - v1.4.0

    • FEAT: Added closeToAabb() (#1531). (f7b6cc69)
    • FEAT: flame tests can now generate golden tests (#1501). (316a0b3b)

    flame_tiled - v1.4.0

    • FEAT: Possibility to create RenderableTiledMap from TiledMap (#1534). (5ed08333)
    • FEAT: Added children parameter to Component constructor (#1525). (f0b31fcf)
    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Apr 3, 2022)

    1.1.0

    • FIX: Only end collisions where there was a collision (#1471). (e1e87fc4)
    • FIX: debugMode should be inherited from parent when mounted (#1469). (e894d201)
    • FEAT: Added method that returned descendants (#1461). (a41f5376)
    • FEAT: Possibility to mark gesture events as handled (#1465). (4c3960c3)
    • FEAT: adding loaded future to the component (#1466). (6434829b)
    • FEAT: Deprecating Rect methods (#1455). (4ddd90aa)
    • FEAT: Added .anchor property to CameraComponent.Viewfinder (#1458). (d51dc5e1)
    • DOCS: Rect extension docs is out of date (#1451). (7e505722)
    • FIX: @mustCallSuper missing on components (#1443). (e01b4b1a)
    • FEAT: Add setter to priority (#1444). (34284686)
    • FIX: Setting images.prefix to empty string (#1437). (694102bd)
    • REFACTOR: Parent change and component removal logic (#1385). (8b9fa352)
    • FIX: viewfinders behavior under zoom (#1432). (f3cf85b6)
    • FIX: change strokeWidth in Component (#1431). (0e174fe8)
    • FEAT: allowing changing of the images prefix and allowing empty prefixes (#1433). (de4d9416)
    • REFACTOR: Loadable mixin no longer declares onMount and onRemove (#1243). (b1f6a34c)
    • REFACTOR: Organize tests in the game/ folder (#1403). (102a27cc)
    • REFACTOR: Clean up of top-level tests (#1386). (e50003ed)
    • REFACTOR: Resize logic in GameRenderBox (#1308). (17c45c28)
    • REFACTOR: Simplify GameWidgetState.loaderFuture (#1232). (eb30c2e5)
    • REFACTOR: Component.ancestors() is now an iterator (#1242). (ce48d77a)
    • REFACTOR: Add a few more rules to flame_lint, including use_key_in_widget_constructors (#1248). (bac6c8a4)
    • REFACTOR: Removed parameter Component.updateTree({callOwnUpdate}) (#1224). (ed227e7c)
    • REFACTOR: Remove Loadable, optional onLoads (#1333). (05f7a4c3)
    • REFACTOR: Loadable no longer declares onGameResize (#1329). (20776e86)
    • REFACTOR: Use canvas.drawImageNine in NineTileBox (#1314). (d77e5efe)
    • PERF: Allow components to have null children (#1231). (66ad4b08)
    • FIX: flame svg perfomance (#1373). (bce24173)
    • FIX: Fix collision detection comments and typo (#1422). (dfeafdd6)
    • FIX: ParallaxComponent should have static positionType (#1350). (cfa6bd12)
    • FIX: Add missing priority argument for JoystickComponent (#1227). (23b1dd8b)
    • FIX: Step time in SpriteAnimation must be positive (#1387). (08e8eac1)
    • FIX: HudMarginComponent positioning on zoom (#1250). (4f0fb2de)
    • FIX: Call onCollisionEnd on removal of Collidable (#1247). (5ddcc6f7)
    • FIX: Both places should have strictMode = false (#1272). (72161ad8)
    • FIX: remove vector_math dependency (#1361). (56b33da2)
    • FIX: Deprecate pause and resume in GameLoop (#1240). (dc37053f)
    • FIX: Deprecate Images.decodeImageFromPixels (#1318). (1a80130c)
    • FIX: Properly dispose images when cache is cleared (#1312). (825fb0cc)
    • FIX: Fix SpriteAnimationWidget lifecycle (#1212). (86394dd3)
    • FIX: redrawing bug in TextBoxComponent (#1279). (8bef4805)
    • FIX: Add missing paint argument to SpriteComponent.fromImage (#1294). (254a60c8)
    • FIX: black frame when activating overlays (#1093). (85caf463)
    • FIX: prepareComponent should never run again on a prepared component (#1237). (7d3eeb73)
    • FIX: Allow most basic and advanced gesture detectors together (#1208). (5828b6f3)
    • FEAT: Added SpeedEffectController (#1260). (20f521f5)
    • FEAT: Added SineEffectController (#1262). (c888703d)
    • FEAT: Added ZigzagEffectController (#1261). (59adc5f3)
    • FEAT: Add onReleased callback for HudButtonComponent (#1296). (87ee34ca)
    • FEAT: Turn off strictMode for children (#1271). (6936e1d9)
    • FEAT: onCollisionStart for Collidable and HitboxShape (#1251). (9b95686b)
    • FEAT: adding has mounted to component (#1418). (f8f9e045)
    • FEAT: Added NoiseEffectController (#1356). (fad9d1d5)
    • FEAT: exporting cache classes (#1368). (3e058973)
    • FEAT: Update scale events to contain pan info (#1327). (70b96b07)
    • FEAT: Components are now always added in the correct order (#1337). (c753fc46)
    • FEAT: Added transform to Rect (#1360). (1818be41)
    • FEAT: Camera as a component (#1355). (c61a1c18)
    • FEAT: Effect.onComplete callback as an alternative to onFinish() (#1201). (932a8111)
    • FEAT: Add RandomEffectController (#1203). (cdb2650b)
    • FEAT: Component.childrenFactory can be used to set up a global ComponentSet factory (#1193). (223ab758)
    • DOCS: Added documentation for GameLoop class (#1234). (b1d4e587)
    • DOCS: Fix various dartdoc warnings (#1353). (9f096053)
    • BREAKING REFACTOR: Separate ComponentSet from the Component (#1266). (e2655b88)
    • BREAKING FIX: Remove pointerId from Draggable callbacks (#1313). (27adda17)
    • BREAKING FEAT: Use a broadphase to make collision detection more efficient (#1252). (29dd09ca)
    • BREAKING FEAT: Added SequenceEffect (#1218). (7c6ae6de)
    • REFACTOR: Clean up of top-level tests (#1386). (e50003ed)
    • REFACTOR: Remove Loadable, optional onLoads (#1333). (05f7a4c3)
    • REFACTOR: Loadable no longer declares onGameResize (#1329). (20776e86)
    • REFACTOR: Organize tests in the game/ folder (#1403). (102a27cc)
    • REFACTOR: Use canvas.drawImageNine in NineTileBox (#1314). (d77e5efe)
    • REFACTOR: Resize logic in GameRenderBox (#1308). (17c45c28)
    • REFACTOR: Loadable mixin no longer declares onMount and onRemove (#1243). (b1f6a34c)
    • REFACTOR: Removed parameter Component.updateTree({callOwnUpdate}) (#1224). (ed227e7c)
    • REFACTOR: Add a few more rules to flame_lint, including use_key_in_widget_constructors (#1248). (bac6c8a4)
    • REFACTOR: Component.ancestors() is now an iterator (#1242). (ce48d77a)
    • REFACTOR: Simplify GameWidgetState.loaderFuture (#1232). (eb30c2e5)
    • PERF: Allow components to have null children (#1231). (66ad4b08)
    • FIX: prepareComponent should never run again on a prepared component (#1237). (7d3eeb73)
    • FIX: flame svg perfomance (#1373). (bce24173)
    • FIX: Deprecate pause and resume in GameLoop (#1240). (dc37053f)
    • FIX: Deprecate Images.decodeImageFromPixels (#1318). (1a80130c)
    • FIX: Properly dispose images when cache is cleared (#1312). (825fb0cc)
    • FIX: Add missing paint argument to SpriteComponent.fromImage (#1294). (254a60c8)
    • FIX: Add missing priority argument for JoystickComponent (#1227). (23b1dd8b)
    • FIX: remove vector_math dependency (#1361). (56b33da2)
    • FIX: redrawing bug in TextBoxComponent (#1279). (8bef4805)
    • FIX: Fix SpriteAnimationWidget lifecycle (#1212). (86394dd3)
    • FIX: black frame when activating overlays (#1093). (85caf463)
    • FIX: Call onCollisionEnd on removal of Collidable (#1247). (5ddcc6f7)
    • FIX: HudMarginComponent positioning on zoom (#1250). (4f0fb2de)
    • FIX: Both places should have strictMode = false (#1272). (72161ad8)
    • FIX: ParallaxComponent should have static positionType (#1350). (cfa6bd12)
    • FIX: Allow most basic and advanced gesture detectors together (#1208). (5828b6f3)
    • FIX: Step time in SpriteAnimation must be positive (#1387). (08e8eac1)
    • FEAT: Update scale events to contain pan info (#1327). (70b96b07)
    • FEAT: Add RandomEffectController (#1203). (cdb2650b)
    • FEAT: Components are now always added in the correct order (#1337). (c753fc46)
    • FEAT: Effect.onComplete callback as an alternative to onFinish() (#1201). (932a8111)
    • FEAT: exporting cache classes (#1368). (3e058973)
    • FEAT: Added NoiseEffectController (#1356). (fad9d1d5)
    • FEAT: Added SineEffectController (#1262). (c888703d)
    • FEAT: Added SpeedEffectController (#1260). (20f521f5)
    • FEAT: Added ZigzagEffectController (#1261). (59adc5f3)
    • FEAT: Turn off strictMode for children (#1271). (6936e1d9)
    • FEAT: onCollisionStart for Collidable and HitboxShape (#1251). (9b95686b)
    • FEAT: Component.childrenFactory can be used to set up a global ComponentSet factory (#1193). (223ab758)
    • FEAT: Added transform to Rect (#1360). (1818be41)
    • FEAT: Add onReleased callback for HudButtonComponent (#1296). (87ee34ca)
    • DOCS: Fix various dartdoc warnings (#1353). (9f096053)
    • DOCS: Added documentation for GameLoop class (#1234). (b1d4e587)
    • BREAKING REFACTOR: Separate ComponentSet from the Component (#1266). (e2655b88)
    • BREAKING FIX: Remove pointerId from Draggable callbacks (#1313). (27adda17)
    • BREAKING FEAT: Added SequenceEffect (#1218). (7c6ae6de)
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Dec 11, 2021)

    CHANGELOG

    [1.0.0]

    • Add ButtonComponent backed by two PositionComponents
    • Add SpriteButtonComponent backed by two Sprites
    • Allow more flexible construction of EffectControllers and make them able to run back in time
    • Remove old effects system
    • Export new effects system
    • Introduce updateTree to follow the renderTree convention
    • Fix Parallax.load with different loading times
    • Fix render order of components and add tests
    • Fix HitboxCircle when component is flipped
    • Add ColorEffect
    • MoveAlongPathEffect can now be absolute, and can auto-orient the object along the path
    • ScaleEffect.by now applies multiplicatively instead of additively
    • isHud replaced with PositionType
    • Remove web fallback for drawAtlas in SpriteBatch, but added flag useAtlas to activate it
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0-releasecandidate.14(Sep 17, 2021)

    CHANGELOG

    [1.0.0-releasecandidate.14]

    • Reset effects after they are done so that they can be repeated
    • Remove integrated joystick buttons
    • Add MarginHudComponent, used when components need to have a margin to the viewport edge
    • Refactor JoystickComponent
    • Add SpriteAnimationWidget.asset
    • Add SpriteWidget.asset
    • Add SpriteButton.asset
    • Add NineTileBox.asset
    • Fix resolution of TextBoxComponent
    • Add BaseGame.remove and BaseGame.removeAll helpers for removing components
    • Add BaseComponent.remove and BaseComponent.removeAll helpers for removing children
    • Rename Camera.cameraSpeed to Camera.speed
    • Rename addShape to addHitbox in Hitbox mixin
    • Fix bug with Events and Draggables
    • Add generics to components with HasGameRef so that they can be extended and have another gameRef
    • Fix parallax fullscreen bug when game is resized
    • Generalize paint usage on components
    • Create OpacityEffect
    • Create ColorEffect
    • Adding ability to pause SpriteAnimationComponent
    • Adding SpriteGroupComponent
    • Fix truncated last frame in non-looping animations
    • Default size of SpriteComponent is srcSize instead of spritesheet size
    • Export test helper methods
    • Rename ScaleEffect to SizeEffect
    • Introduce scale on PositionComponent
    • Add ScaleEffect that works on scale instead of size
    • Add class NotifyingVector2
    • Add class Transform2D
    • Added helper functions testRandom() and testWidgetsRandom()
    • Remove FPSCounter from BaseGame
    • Refactor PositionComponent to work with Transform2D: the component now works more reliably when nested
    • Properties renderFlipX, renderFlipY removed and replaced with methods flipHorizontally() and flipVertically().
    • Method .angleTo removed as it was not working properly.
    • In debug mode PositionComponent now displays an indicator for the anchor position.
    • Update Camera docs to showcase usage with Game class
    • Fixed a bug with worldBounds being set to null in Camera
    • Remove .viewport from BaseGame, use camera.viewport instead
    • MockCanvas is now strongly typed and matches numeric coordinates up to a tolerance
    • Add loadAllImages to Images, which loads all images from the prefixed path
    • Reviewed the keyboard API with new mixins (KeyboardHandler and HasKeyboardHandlerComponents)
    • Added FocusNode on the game widget and improved keyboard handling in the game.
    • Added ability to have custom mouse cursor on the GameWidget region
    • Change sprite component to default to the Sprite size if not provided
    • TextBoxComponent waits for cache to be filled on onLoad
    • TextBoxComponent can have customizable pixelRatio
    • Add ContainsAtLeastMockCanvas to facilitate testing with MockCanvas
    • Support for drawImage for MockCanvas
    • Game is now a Component
    • ComponentEffect is now a Component
    • HasGameRef can now operate independently from Game
    • initialDelay and peakDelay for effects to handle time before and after an effect
    • component.onMount now runs every time a component gets a new parent
    • Add collision detection between child components
    Source code(tar.gz)
    Source code(zip)
  • flame_oxygen-0.1.0-releasecandidate.13(Sep 6, 2021)

  • 1.0.0-releasecandidate.13(Jul 8, 2021)

    [1.0.0-releasecandidate.13]

    • Fix camera not ending up in the correct position on long jumps
    • Make the JoystickPlayer a PositionComponent
    • Extract shared logic when handling components set in BaseComponent and BaseGame to ComponentSet.
    • Rename camera.shake(amount: x) to camera.shake(duration: x)
    • Fix SpriteAnimationComponent docs to use Future.wait
    • Add an empty postRender method that will run after each components render method
    • Rename Tapable to Tappable
    • Fix SpriteAnimationComponent docs to use Future.wait
    • Add an empty postRender method that will run after each components render method
    • Rename HasTapableComponents to HasTappableComponents
    • Rename prepareCanvas to preRender
    • Add intensity to Camera.shake
    • FixedResolutionViewport to use matrix transformations for Canvas
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0-rc10(May 4, 2021)

    [1.0.0-rc10]

    • Updated tutorial documentation to indicate use of new version
    • Fix bounding box check in collision detection
    • Refactor on flame input system to correctly take camera into account
    • Adding SpriteAnimationGroupComponent
    • Allow isometric tile maps with custom heights
    • Add a new renderRect method to Sprite
    • Addresses the TODO to change the camera public APIs to take Anchors for relativePositions
    • Adds methods to support moving the camera relative to its current position
    • Abstracting the text api to allow custom text renderers on the framework
    • Set the same debug mode for children as for the parent when added
    • Fix camera projections when camera is zoomed
    • Fix collision detection system with angle and parentAngle
    • Fix rendering of shapes that aren't HitboxShape
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0-rc7(Feb 25, 2021)

  • 0.11.1(Apr 19, 2019)

    [0.11.1]

    • Fixed lack of paint update when using AnimationAsWidget as pointed in #78 (thanks, @renancarujo)
    • Added travis (thanks, @renancarujo)

    [0.11.0]

    • Implementing low latency api from audioplayers (breaking change)
    • Improved examples by adding some instructions on how to run
    • Add notice on readme about the channel
    • Upgrade path_provider to fix conflicts
    Source code(tar.gz)
    Source code(zip)
  • 0.10.0(Jan 11, 2019)

    • Fixing a few minor bugs, typos, improving docs
    • Adding the Palette concept: easy access to white and black colors/paints, create your palette to keep your game organized.
    • Adding the Anchor concept: specify where thins should anchor, added to PositionComponent and to the new text related features.
    • Added a whole bunch of text related components: TextConfig allows you to easily define your typography information, TextComponent allows for easy rendering of stuff and TextBox can make sized texts and also typing effects.
    • Improved Utils to have better and more concise APIs, removed unused stuff.
    • Adding TiledComponent to integrate with tiled
    Source code(tar.gz)
    Source code(zip)
  • 0.9.0(Jul 11, 2018)

    Updating to the new version of audioplayers, there was a huge refactoring and some functions were delegated to the lib. Also, minor APIs tweaks for flame.

    Source code(tar.gz)
    Source code(zip)
  • 0.8.0(Dec 22, 2017)

    This is major update, even though we are keeping things in alpha (version 0.*)

    Several major upgrades regarding the component system, new component types, Sprites and SpriteSheets, better image caching, several improvements with structure, a BaseGame, a new Game as a widget, that allows you to embed inside apps and a stop method. More minor changes.

    An updated tutorial is on the way!

    Source code(tar.gz)
    Source code(zip)
Owner
Flame Engine
2D game engine built on top of Flutter. Maintained by https://github.com/bluefireteam
Flame Engine
Warrior Runner - Game made with Flutter and Flame game engine

Warrior Runner - Game made with Flutter Demo and Screenshot Flutter Version Used : 1.22.4 flame: 0.29.3 hive: 1.5.0-pre Learing Resources: Create a Mo

Mohammed Hashim 19 Aug 7, 2022
A simple 2D multiplayer online game built using Flutter and Flame engine

Club Penguin Introduction ?? Club Penguin A multiplayer game involving penguins and anonymous chat in a virtual 2D world Before we start, you can take

Sanjeev Madhav 63 Sep 15, 2022
A Flutter RPG Game Engine.

DevilF 游戏引擎 A Flutter RPG Game Engine. 一款使用Flutter开发的RPG游戏引擎。 引擎介绍 (Devil Fighter) 自从有了Flutter,轻松实现了三端跨平台,并且不增加包体积,就能拥有一套Native游戏引擎,为APP游戏化提供了更多可能性。 开

zhaoqipeng 67 Sep 18, 2022
A Widget-based Game Engine For Flutter

illume A Widget-based Game Engine for Flutter Illume is a simple Flutter game engine which uses widgets to create game objects instead of sprites in n

Deven Joshi 21 Aug 7, 2022
🦖 🦖 🦖 Flutter 2D runner game using Flame engine.

t_rex_flame T-rex is the 2D game where you play as a cute little t-rex using Flame engine. All you need do it avoid being hit by enemies too many time

HuongPT 6 Aug 31, 2022
Dungeon Fantasy - A simple RPG game built with Bonfire and Flame engine

dungeon_fantasy A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Nguyen Minh Dung 1 Dec 28, 2021
Mason templates for the Flame Engine

Flame Bricks ?? ?? Flame Bricks is a collection of Mason's templates to help people bootstrap classes for the Flame engine. How to use To learn more a

Flame Engine 21 Nov 27, 2021
A graphics engine for creating 2D games. Creating objects based on composition and painting on canvas.

A graphics engine for creating 2D games. Creating objects based on composition and painting on canvas.

Stanislav 8 Mar 11, 2022
uses Firebase's ML Engine to recognize murals in San Diego's Chicano park.

ABOUT Flutter-based app that uses Firebase's ML Engine to recognize murals in San Diego's Chicano park. App can be run on iOS and android and the trai

null 0 Jan 3, 2022
An application cum Game-based App built using Flutter that compose a mind-tricked word game, Just for fun.

destini_challenge A new Flutter application. Getting Started This project is a starting point for a Flutter application. A few resources to get you st

dev_allauddin 3 Feb 3, 2022
M.U.D. Role-playing text-based game. A multiple-choice multiplayer interactive game developed on Flutter (Android, iOS, Windows, Web)

Teia M.U.D. Role-playing text-based game. A multiple-choice multiplayer interactive game developed on Flutter (Android, iOS, Windows, Web). The main f

Pedro Gonçalves 3 Feb 17, 2022
Snake-Game - A flutter based classic snake game with nothing just and just a feel to have play

snake_game This is a simple snake Game under development made with the help of y

Shubham Kumar 2 Mar 22, 2022
Game characters ui - A redesign of a game characters app using flutter

Game characters ui - A redesign of a game characters app using flutter

null 19 Jul 30, 2022
Flutter Switch Game: Get Fun With Play This Game

switch_game A new Flutter project. Getting Started Try Swap red circle to green

Sermed Berwari 1 Jun 17, 2022
A simple dice game built using Flutter, that allows users to engage in a dice game

A simple dice game built using Flutter, that allows users to engage in a dice game. Each player rolls the dice and the highest value number that you can make WINS!

Dubem Ezeagwu 1 Sep 1, 2022
Game Flutter Using Flame.It was for the Game Jam 2022

binarymemory Memory Binary Flame Flutter Game Jam Getting Started This project is a starting point for a Flutter application. A few resources to get y

Victor Manuel Lagunas Franco 2 Sep 7, 2022
A starter game in Flutter with all the bells and whistles of a mobile (iOS & Android) game

A starter game in Flutter with all the bells and whistles of a mobile (iOS & Android) game including the following features: sound music main menu scr

Samuel Abada 9 Sep 23, 2022
Chess-game - Some simple lines of coding and made this awesome looking full functional chess board game

flutter simple chess game It's a flutter chess game application with fast code.

Munem Sarker 5 Jun 17, 2022
Wordle-flutter - A Wordle Game Made With Flutter

wordle with flutter A small wordle made with flutter Getting Started Just a 4 ho

Fernando Souto Gonzalez 8 Apr 13, 2022