v4.1.0bonfire
(RPG Maker) 使用 Flame 更简单地创建 RPG 风格或类似游戏
(RPG Maker) 使用 Flame 更简单地创建 RPG 风格或类似游戏
以下为英文项目原文快照,最新内容请访问 GitHub。
Build RPG-style games (and beyond) with the power of FlameEngine! 🎮
![]() |
![]() |
![]() |
![]() |
Complete documentation with examples: docs.page/rafaelbarbosatec/bonfire
Player, Enemy, Ally, Npc, GameDecoration and a complete GameComponent API.BSelector, BParallel, BOnce), pathfinding, random movement, sensors and vision.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:
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.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.WithCollision exposes collision.onBlockMovementListener(...) and a bodyType API instead of the old BlockMovementCollision overrides.SimplePlayer/SimpleEnemy drive their 8-direction sprite animations (SimpleDirectionAnimation) from direction automatically.BSelector, BParallel, BOnce) with debugging support.IntervalTick replaces the old InternalChecker/checkInterval.sqrt(2)/2), forces default to no drag, no double damage on FlyingAttackGameObject, modern Color API (withValues).^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.
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.
If you build a game using Bonfire, you can open a PR to add your game here.
| Name | Link |
|---|---|
| bonfire_bloc | |
| bonfire_spine |
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!
依赖清单 7 项
{"sdk":"flutter"}^0.4.1^1.6.0^1.38.2^1.4.2^1.2.1{"sdk":"flutter"}先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗