Guide · Open source
How to use Flame: a Flutter game engine guide
Updated · written with AI from the project's own documentation and checked against our catalogue data
Flame is an open-source game engine built on Flutter and written in Dart. It gives Flutter developers ready-made game building blocks such as a game loop, a component system, collision detection and input handling. This guide explains what Flame is, what you need before starting, what it includes, and where to find documentation and help.
Quick start
- 1Check prerequisites. Install the Flutter SDK and Dart. Flame is a code-first engine, so you will write Dart.
- 2Get Flame into your project. Follow the setup in the official docs. The README lists a git clone command for the repository.
- 3Read the tutorials. Start with the simple tutorials on the docs site to learn the game loop and components.
- 4Try the examples. Open the examples site in your browser and view the code for features you need.
- 5Add a bridge package if needed. Pick an official bridge, such as flame_tiled or flame_forge2d, only when your game needs that feature.
- 6Ask for help when stuck. Use the Flame Discord or StackOverflow with the Flame tag.
What is Flame and who is it for?
Flame is a game engine built on Flutter, the Google UI toolkit, and written in Dart. It is meant for developers who want to make games with Flutter instead of a dedicated game engine.
It suits Flutter developers who want to add a game to an app, developers making 2D games in Dart, and learners who want to explore game loops and component systems in a familiar language.
- Good fit: adding a game to a Flutter app, making 2D games in Dart, learning game architecture.
- Poor fit: people who need a full visual editor, large 3D games, or no coding at all.
What you need before you start
Flame's listed prerequisites are the Flutter SDK and Dart. Because Flame is code-first, you will be writing Dart code to build your game.
The README does not describe a visual editor, so plan to work in code.
- Flutter SDK
- Dart
How to get Flame into your project
The README lists the following command under the heading 'Add Flame to a Flutter project'. It clones the repository from GitHub.
The project is also published as the flame package on pub.dev, and the full documentation covers how to add it to your app. Check those pages for the current setup steps.
git clone https://github.com/flame-engine/flameCore features you get with Flame
Flame aims to provide ready-made solutions for common problems that Flutter games share. The README lists these key features:
- A game loop.
- A component/object system (FCS).
- Effects and particles.
- Collision detection.
- Gesture and input handling.
- Images, animations, sprites, and sprite sheets.
- General utilities to make development easier.
Extend Flame with bridge packages
Bridge packages connect Flame to other libraries. The README lists official bridges for physics, tile maps, animation and more. Examples include flame_forge2d for Forge2D physics, flame_tiled for Tiled tile maps, flame_rive for Rive animations, and flame_audio for playing multiple audio files at once.
Other official packages include flame_console, an in-game console for debugging, and flame_test, which provides helpers for testing Flame games. The flame_cli tool lets you inspect and control running games from the terminal.
- flame_forge2d: Box2D physics.
- flame_tiled: Tiled 2D tile map level editor support.
- flame_rive: interactive Rive animations.
- flame_audio: multiple audio files simultaneously.
- flame_console: in-game debug console.
- flame_test: testing helpers.
Find documentation, examples and help
The full documentation is at docs.flame-engine.org. The site has tutorials and an API reference. The examples site lets you try most features in your browser and view the code for each example.
For questions, the README points to the Flame community on Blue Fire's Discord server, and to StackOverflow using the Flame tag.
- Documentation: docs.flame-engine.org
- Examples: examples.flame-engine.org
- API reference: pub.dev/documentation/flame/latest/
- Community: Discord server or StackOverflow with the Flame tag.
What people use it for
- Adding a 2D game screen to an existing Flutter app.
- Building a 2D game with sprites, animations and collision detection in Dart.
- Loading Tiled tile maps with the flame_tiled bridge.
- Adding Box2D physics with the flame_forge2d bridge.
- Learning game loops and component systems in a language you already know.
Frequently asked questions
Is Flame free to use?
Yes. The Flame repository is licensed under the MIT licence, as listed in the project details. Check the LICENSE file in the repository for the full terms.
What do I need to install Flame?
The listed prerequisites are the Flutter SDK and Dart. You also need to write Dart code, since Flame is a code-first engine.
How do I install Flame?
The README lists git clone https://github.com/flame-engine/flame under the heading to add Flame to a Flutter project. The official docs at docs.flame-engine.org and the flame package on pub.dev describe the setup steps.
Does Flame have a visual editor?
The README does not mention a visual editor and describes Flame as a code-first engine. Plan to build your game in code.
What are alternatives to Flame?
Comparable projects listed for this guide include Godot, Bevy, LÖVE and Phaser. The README does not compare Flame to them, so judge based on your language and platform needs.
Where can I get help if something breaks?
Ask in the Flame community on Blue Fire's Discord server, or create a question on StackOverflow and add the Flame tag so others can help.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Flame is a good choice for Flutter developers and Dart programmers who want to make 2D games or add a game to an app. It is a weaker fit for people who need a visual editor, large 3D games, or no coding.
Install options & downloads