explaingit

flame-engine/flame

10,572DartAudience · developerComplexity · 3/5Setup · moderate

TLDR

A 2D game engine built on top of Flutter that provides a game loop, sprite and animation support, collision detection, and optional bridge packages for physics, audio, and tile maps.

Mindmap

mindmap
  root((Flame))
    What it does
      2D game engine
      Built on Flutter
      Cross-platform
    Core features
      Game loop
      Sprites and animation
      Collision detection
    Bridge packages
      Forge2D physics
      Audio playback
      Tiled maps
    Tech stack
      Dart
      Flutter
      pub.dev
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build a 2D mobile or desktop game in Flutter using Flame's built-in game loop, component system, sprite rendering, and collision detection.

USE CASE 2

Add realistic physics to a Flutter game by combining Flame with the Forge2D bridge package for gravity, rigid bodies, and collision response.

USE CASE 3

Design 2D game levels in the Tiled map editor and load them directly into a Flame game using the Tiled bridge package.

USE CASE 4

Prototype a cross-platform 2D game targeting iOS, Android, and web from a single Dart codebase with Flame.

Tech stack

DartFlutterForge2D

Getting it running

Difficulty · moderate Time to first run · 30min

Requires a working Flutter environment, add Flame and any bridge packages as dependencies from pub.dev.

No explicit license information is stated in the repository description.

In plain English

Flame is a game engine built on top of Flutter, Google's toolkit for building apps that run on mobile, web, and desktop from a single codebase. A game engine is a collection of tools and building blocks that handle the common technical problems in game development, so you don't have to solve them from scratch every time. Flame provides those building blocks specifically for Flutter developers who want to create 2D games. The engine covers the core needs of most 2D games: a game loop (the mechanism that updates and redraws the game many times per second), a system for organizing game objects into components, sprite and animation support for loading and displaying images, collision detection so you can tell when objects hit each other, and input handling for touch, mouse, and keyboard events. Beyond the core engine, Flame is extended through a set of optional bridge packages. These connect Flame to other specialized tools: a physics engine called Forge2D for realistic movement and gravity, audio playback, tile map editing via Tiled (a popular tool for designing 2D levels), animated vector graphics via Rive, and more. You only add the packages your game actually needs. Flame is written in Dart, the programming language Flutter uses. To add it to a Flutter project, you include it as a dependency from pub.dev, Flutter's package registry. The repository includes runnable examples for most features that can be tried directly in a browser, along with tutorials for getting started. The project is maintained by the Blue Fire team and is an officially recognized Flutter Favorite package, a designation Flutter gives to packages that meet a high quality bar. Support is available through a Discord server and Stack Overflow. Funding comes from OpenCollective, GitHub Sponsors, and Patreon, and the project lists Invertase as its top sponsor.

Copy-paste prompts

Prompt 1
Using Flame, write a Flutter game with a player sprite that moves with keyboard input, detects collisions with falling obstacles, and shows a score counter on screen.
Prompt 2
I am building a 2D platformer with Flame. How do I integrate the Forge2D bridge to add gravity and ground collision so the player character falls and lands correctly?
Prompt 3
Help me load a Tiled map in my Flame game, spawn enemy components on a specific object layer, and make the camera follow the player as they move through the level.
Prompt 4
Add background music and collision sound effects to my Flame game using the flame_audio package, triggered when the player hits an obstacle.
Prompt 5
Write a Flame component that animates a sprite sheet with four states: idle, walk, jump, and attack, switching based on player keyboard input.
Open on GitHub → Explain another repo

← flame-engine on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.