RafaelBarbosatec/bonfire

(RPG maker) Create RPG-style or similar games more simply with Flame.

1,469

stars

3,128

commits

Dart

primary language

Sep 7, 2026

updated

bonfire-engine.github.io
dart
flutter
flutter-package
game
gamedev
gamedev-library

README

Powered by Flame Flutter MIT Licence pub package GitHub stars pub points Telegram

bonfire

Bonfire

Build RPG-style games (and beyond) with the power of FlameEngine! ๐ŸŽฎ

๐Ÿ“š Documentation

Complete documentation with examples: docs.page/rafaelbarbosatec/bonfire

โœจ Features

  • ๐Ÿง™ RPG-ready components โ€” Player, Enemy, Ally, Npc, GameDecoration and a complete GameComponent API.
  • ๐Ÿ—บ๏ธ Maps โ€” Tiled map support, multi-map worlds, custom/matrix maps, collisions and portals.
  • ๐Ÿ•น๏ธ Input โ€” Joystick, keyboard and mouse controls with 8-direction movement.
  • โš”๏ธ Combat โ€” melee and ranged attacks, projectiles, damage feedback and life bars.
  • ๐Ÿง  Behaviors & AI โ€” behavior trees (BSelector, BParallel, BOnce), pathfinding, random movement, sensors and vision.
  • ๐ŸŽจ Effects & polish โ€” particles, lighting, shaders, camera effects, parallax, color filters and force physics.
  • ๐Ÿ–ฅ๏ธ Game interface โ€” life bars, dialogs, text effects, minimap and HUD components.
  • ๐Ÿ“ฑ Multi-platform โ€” mobile, desktop and web with Flame.

๐ŸŽฎ Bonfire 4.0 โ€” what's new

Version 4.0 is a major restructuring of the API surface, focused on developer experience when building complex game components.

In previous versions each mixin added methods and fields directly to the component. With several mixins (Movement, Jumper, Sensor, PathFinding, Pushable, RandomMovement...), the component namespace became crowded and autocomplete less useful.

Starting with 4.0, mixins follow a consistent WithFeature + feature.{resource} pattern:

class MyEnemy extends SimpleEnemy
    with Movement, WithCollision, WithRandomMovement, WithPathFinding {
  @override
  void update(double dt) {
    super.update(dt);
    randomMovement.update(dt, speed: 20, maxDistance: 64);
  }
}

Highlights of the release:

  • API-first mixins โ€” WithJumper (jumper), WithSensor (sensor), WithRandomMovement (randomMovement), WithPathFinding (pathFinding), WithCollision (collision), WithAttack (attack), WithVision (vision), WithLighting (lighting), WithShader (shader), WithUtil (util), plus WithFollower, WithPushable, WithFlipRender, WithMovePerCell, WithAssetsLoader and WithLifeBar.
  • Simplified, velocity-based Movement โ€” the only mixin that keeps its direct access style, but was rewritten: direction/hDirection/vDirection now reflect the current velocity, stop()/idle() replace the old stop helpers and legacy members (lastDirection, stopMove, setZeroVelocity, moveFromAngle, *Once, acceleration...) were removed.
  • Event-driven collision โ€” WithCollision exposes collision.onBlockMovementListener(...) and a bodyType API instead of the old BlockMovementCollision overrides.
  • Direction animations โ€” SimplePlayer/SimpleEnemy drive their 8-direction sprite animations (SimpleDirectionAnimation) from direction automatically.
  • Behavior trees โ€” brand-new behavior system (BSelector, BParallel, BOnce) with debugging support.
  • Better intervals โ€” IntervalTick replaces the old InternalChecker/checkInterval.
  • Bug fixes & correctness โ€” exact diagonal normalization (sqrt(2)/2), forces default to no drag, no double damage on FlyingAttackGameObject, modern Color API (withValues).
  • Upgraded to Flame ^1.38.0, with example/ and awesome/ updated to the new APIs and analyzed by CI.

Migrating from Bonfire 3.x? Read the Migration Guide from 3.x to 4.0 โ€” it has the full breaking-change tables. Every pre-release change is also listed in the CHANGELOG.

๐Ÿš€ Getting started

Add Bonfire to your pubspec.yaml:

dependencies:
  bonfire: ^4.0.0

Then create your first map + character and run it inside a BonfireWidget. The quickest way to see everything working is to open the bundled example app โ€” a complete, runnable project with maps, players, enemies, attacks, life bars and interface.

Run it:

cd example
flutter pub get
flutter run

Bonfire is ideal for building games from the following perspectives:

Test our online DEMO or Download APK.

๐Ÿ“š Documentation

bonfire-engine.github.io

๐Ÿงฉ Bonfire Awesome

Link

If you build a game using Bonfire, you can open a PR to add your game here.

Useful packages

NameLink
bonfire_blocpub package
bonfire_spinepub package

Encourage my work

Credits

  • The entire FlameEngine team.
  • And thanks to everyone who contributes and has already contributed.

Contribution

If you find any errors or want to add improvements, you can open an issue or develop the fix and open a pull request. Thank you for your cooperation!

Documentation repository

Contributors

RafaelBarbosatec

2,962 commits

KyleKun

42 commits

rezendegc

37 commits

dvmatyun

16 commits

RafaelBarbosatec/bonfire

(RPG maker) Create RPG-style or similar games more simply with Flame.

1,469

stars

3,128

commits

Dart

primary language

Sep 7, 2026

updated

bonfire-engine.github.io
dart
flutter
flutter-package
game
gamedev
gamedev-library

README

Powered by Flame Flutter MIT Licence pub package GitHub stars pub points Telegram

bonfire

Bonfire

Build RPG-style games (and beyond) with the power of FlameEngine! ๐ŸŽฎ

๐Ÿ“š Documentation

Complete documentation with examples: docs.page/rafaelbarbosatec/bonfire

โœจ Features

  • ๐Ÿง™ RPG-ready components โ€” Player, Enemy, Ally, Npc, GameDecoration and a complete GameComponent API.
  • ๐Ÿ—บ๏ธ Maps โ€” Tiled map support, multi-map worlds, custom/matrix maps, collisions and portals.
  • ๐Ÿ•น๏ธ Input โ€” Joystick, keyboard and mouse controls with 8-direction movement.
  • โš”๏ธ Combat โ€” melee and ranged attacks, projectiles, damage feedback and life bars.
  • ๐Ÿง  Behaviors & AI โ€” behavior trees (BSelector, BParallel, BOnce), pathfinding, random movement, sensors and vision.
  • ๐ŸŽจ Effects & polish โ€” particles, lighting, shaders, camera effects, parallax, color filters and force physics.
  • ๐Ÿ–ฅ๏ธ Game interface โ€” life bars, dialogs, text effects, minimap and HUD components.
  • ๐Ÿ“ฑ Multi-platform โ€” mobile, desktop and web with Flame.

๐ŸŽฎ Bonfire 4.0 โ€” what's new

Version 4.0 is a major restructuring of the API surface, focused on developer experience when building complex game components.

In previous versions each mixin added methods and fields directly to the component. With several mixins (Movement, Jumper, Sensor, PathFinding, Pushable, RandomMovement...), the component namespace became crowded and autocomplete less useful.

Starting with 4.0, mixins follow a consistent WithFeature + feature.{resource} pattern:

class MyEnemy extends SimpleEnemy
    with Movement, WithCollision, WithRandomMovement, WithPathFinding {
  @override
  void update(double dt) {
    super.update(dt);
    randomMovement.update(dt, speed: 20, maxDistance: 64);
  }
}

Highlights of the release:

  • API-first mixins โ€” WithJumper (jumper), WithSensor (sensor), WithRandomMovement (randomMovement), WithPathFinding (pathFinding), WithCollision (collision), WithAttack (attack), WithVision (vision), WithLighting (lighting), WithShader (shader), WithUtil (util), plus WithFollower, WithPushable, WithFlipRender, WithMovePerCell, WithAssetsLoader and WithLifeBar.
  • Simplified, velocity-based Movement โ€” the only mixin that keeps its direct access style, but was rewritten: direction/hDirection/vDirection now reflect the current velocity, stop()/idle() replace the old stop helpers and legacy members (lastDirection, stopMove, setZeroVelocity, moveFromAngle, *Once, acceleration...) were removed.
  • Event-driven collision โ€” WithCollision exposes collision.onBlockMovementListener(...) and a bodyType API instead of the old BlockMovementCollision overrides.
  • Direction animations โ€” SimplePlayer/SimpleEnemy drive their 8-direction sprite animations (SimpleDirectionAnimation) from direction automatically.
  • Behavior trees โ€” brand-new behavior system (BSelector, BParallel, BOnce) with debugging support.
  • Better intervals โ€” IntervalTick replaces the old InternalChecker/checkInterval.
  • Bug fixes & correctness โ€” exact diagonal normalization (sqrt(2)/2), forces default to no drag, no double damage on FlyingAttackGameObject, modern Color API (withValues).
  • Upgraded to Flame ^1.38.0, with example/ and awesome/ updated to the new APIs and analyzed by CI.

Migrating from Bonfire 3.x? Read the Migration Guide from 3.x to 4.0 โ€” it has the full breaking-change tables. Every pre-release change is also listed in the CHANGELOG.

๐Ÿš€ Getting started

Add Bonfire to your pubspec.yaml:

dependencies:
  bonfire: ^4.0.0

Then create your first map + character and run it inside a BonfireWidget. The quickest way to see everything working is to open the bundled example app โ€” a complete, runnable project with maps, players, enemies, attacks, life bars and interface.

Run it:

cd example
flutter pub get
flutter run

Bonfire is ideal for building games from the following perspectives:

Test our online DEMO or Download APK.

๐Ÿ“š Documentation

bonfire-engine.github.io

๐Ÿงฉ Bonfire Awesome

Link

If you build a game using Bonfire, you can open a PR to add your game here.

Useful packages

NameLink
bonfire_blocpub package
bonfire_spinepub package

Encourage my work

Credits

  • The entire FlameEngine team.
  • And thanks to everyone who contributes and has already contributed.

Contribution

If you find any errors or want to add improvements, you can open an issue or develop the fix and open a pull request. Thank you for your cooperation!

Documentation repository

Contributors

RafaelBarbosatec

2,962 commits

KyleKun

42 commits

rezendegc

37 commits

dvmatyun

16 commits

Languages

Dart

99.8%