flame_behaviors
Flame 的行為組合模式實作。由 Very Good Ventures 🦄 建構
- 星標
- 70
- 分支
- 4
- 最近推送(UTC)
- 2025年10月21日
- 專案狀態
- 已封存
原始 README
以下為英文專案原文快照,最新內容請造訪 GitHub。
Flame Behaviors
Note: This repository has been transferred to https://github.com/flame-engine/flame. For more information see https://github.com/VeryGoodOpenSource/flame_behaviors/issues/99
Flame Behaviors applies separation of concerns to game logic in the form of Entities and Behaviors.
Developed with 💙 and 🔥 by Very Good Ventures 🦄
Flame Behaviors was created to make it easier to create scalable, testable games with a well-defined structure. It applies the separation of concerns to the game logic, in the form of Entities and Behaviors.
Imagine you want to build an old school Pong game. At its very core there are two objects: a paddle and a ball. If you have a look at the paddle, you could say its game logic is: move up and move down. The ball has the simple game logic of: on collision with a paddle reverse the movement direction.
These objects, paddles and balls, are what we call entities and the game logics we just described are their behaviors. By applying these behaviors to each individual entity we get the core gameplay loop of Pong: hitting balls with our paddles until we win.
By defining what kind of entities our game has and describing what type of behaviors they may hold, we can easily turn a gameplay idea into a structured game that is both testable and scalable.
Documentation 📝
View the full documentation here.
Packages 📦
| Package | Pub |
|---|---|
| flame_behaviors | |
| flame_steering_behaviors |
Quick Start 🚀
Installing 🧑💻
In order to use Flame Behaviors you must have the Flame package added to your project.
Adding the Package
# 📦 Add the flame_behaviors package from pub.dev to your project
flutter pub add flame_behaviors
Creating Entities and Behaviors
Use Flame Behaviors to define your game entities and how they behave. Or follow the Introduction to Flame Behaviors article to learn how to use the package!
分類
如何選擇適合專案的儲存庫?
先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
- 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
- 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
- 使用前在 GitHub 確認 README、授權條款與 Issues。
來源與維護
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗