搜尋套件、儲存庫與 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 項

原始碼儲存庫

使用此套件的專案