搜索插件、代码仓与 APP 分类

bonfire 封面
插件详情v4.1.0

bonfire

(RPG Maker) 使用 Flame 更简单地创建 RPG 风格或类似游戏

AndroidiOSmacOSWindowsLinux
近 30 天下载
3780
喜欢数
514
Pub 分数
130

安装插件

flutter pub add bonfire

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Bonfire 是一个用于 Flutter/Dart 的软件包,旨在通过 Flame 游戏引擎简化 RPG 类型游戏的创建。它为常见的 RPG 机制(如角色移动、战斗、对话系统和地图管理)提供了高级抽象。专为开发者设计,Bonfire 通过提供可立即使用的组件(如瓦片地图、非玩家角色和玩家控制器)来减少样板代码并加速原型开发。非常适合希望以最少设置构建 2D 回合制或实时 RPG 游戏的独立开发者和爱好者。

适合场景

  • 开发2D RPG游戏
  • 创建回合制或实时战斗系统
  • 构建互动式叙事游戏
  • 快速原型化游戏机制
  • 实现基于瓦片地图的世界

主要特点

  • 基于 Flame 游戏引擎构建
  • 预定义的RPG组件(NPC、玩家、地图)
  • 支持对话和任务系统
  • 与 Flame 的渲染和物理系统轻松集成
  • 跨平台部署支持

适合对象

  • 独立游戏开发者
  • RPG爱好者
  • Flutter 开发者新手游戏开发
  • 寻求快速迭代的原型设计者
  • 那些开发2D横向卷轴或瓦片地图游戏的人

使用建议

  • 需要熟悉 Flame
  • 限制为2D游戏类型
  • 最适合角色扮演游戏,不适合其他类型
  • 可能需要为复杂机制进行额外自定义
  • 依赖于火焰的稳定性和更新

原始 README

以下为关联源码仓库的 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

Name Link
bonfire_bloc pub package
bonfire_spine pub 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

所属分类

依赖

依赖清单 4 项

源码仓库

使用此插件的项目