https://github.com/2002yy/ballwar
领土战争 / Marble Dominion Ricochet War — 四阵营 2D 领土争夺 · Godot 4.6 · GDScript
https://github.com/2002yy/ballwar
2d-game gds godot godot-engine strategy-game territory-war
Last synced: about 1 month ago
JSON representation
领土战争 / Marble Dominion Ricochet War — 四阵营 2D 领土争夺 · Godot 4.6 · GDScript
- Host: GitHub
- URL: https://github.com/2002yy/ballwar
- Owner: 2002yy
- License: mit
- Created: 2026-05-14T15:21:54.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-05-15T19:35:52.000Z (about 1 month ago)
- Last Synced: 2026-05-15T19:51:53.078Z (about 1 month ago)
- Topics: 2d-game, gds, godot, godot-engine, strategy-game, territory-war
- Language: GDScript
- Size: 75.9 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Roadmap: ROADMAP.md
Awesome Lists containing this project
README
# BallWar / 领土战争 (Marble Dominion Ricochet War)
A **Godot 4.6 + GDScript** 2D territory-control arcade prototype — four factions fight for grid dominance in a chaotic bullet arena.
一个基于 **Godot 4.6 + GDScript** 的 2D 四阵营领土争夺街机原型。
**Engine:** Godot 4.6 · **Language:** GDScript · **Tests:** 10 runners · GitHub Actions CI · **Platforms:** Windows / Android
## Screenshots / 截图
| 开始界面 | 游戏初始 | 游戏中场 | 事件画面 | 胜利结果 |
|:--:|:--:|:--:|:--:|:--:|
|  |  |  |  |  |
## Download Latest Release / 下载最新版本
> **v2.1.11.1 (Latest Stable)** — [Windows zip](https://github.com/2002yy/BallWar/releases/tag/v2.1.11.1) · [Android APK](https://github.com/2002yy/BallWar/releases/tag/v2.1.11.1)
> All releases: [github.com/2002yy/BallWar/releases](https://github.com/2002yy/BallWar/releases)
## Tech Highlights / 技术亮点
- **10 headless CI runners** — smoke, wiring, coordinator, integration, layout tests via GitHub Actions
- **Architecture layering** — `Main.gd` orchestration → coordinators, restore planners, save adapters ([docs/ARCHITECTURE.md](docs/ARCHITECTURE.md))
- **Save/load with hardening** — slot-based saves, backup recovery, version checks, input sanitization ([docs/SAVE_SYSTEM.md](docs/SAVE_SYSTEM.md))
- **Performance probes** — bullet pressure, frame time, trail cache metrics built into runtime ([docs/PERFORMANCE.md](docs/PERFORMANCE.md))
- **Android export pipeline** — ETC2/ASTC validation, debug APK, PowerShell scripts ([docs/ANDROID_EXPORT.md](docs/ANDROID_EXPORT.md))
- Four-faction territory control, chamber-driven firing rhythm, event roulette, multi-mode rules
## Architecture / 架构
System layering (see [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)):
- **`Main.gd`** — top-level lifecycle orchestration
- **`SaveFlowController`** — continue/load flow (`prepare_*` / `apply_*`)
- **`RestorePlan`** — active restore planning data through the continue path
- **`SaveGameCodec`** + **`SaveStateApplier`** — validate, normalize, then apply
- **`ControlChamber`**, **`Turret`**, **`Bullet`** — each owns `restore_from_state(...)`
- Runtime-heavy: `Battlefield`, `BulletPool`, pooled trail internals
## Testing / 测试
10 headless test runners run via GitHub Actions CI. Correctness baseline: **1083 checks**.
| Runner | Checks |
|---|---|
| `LayoutSanityTestRunner.gd` | 376 |
| `SmokeTestRunner.gd` | 218 |
| `SaveFlowControllerTestRunner.gd` | 190 |
| `IntegrationTestRunner.gd` | 133 |
| `StartMenuSceneTestRunner.gd` | 55 |
| `GameStateCoordinatorTestRunner.gd` | 50 |
| `GameHUDSceneTestRunner.gd` | 27 |
| `EventRouletteSceneTestRunner.gd` | 14 |
| `RestorePlanTestRunner.gd` | 11 |
| `SettingsPanelSceneTestRunner.gd` | 9 |
Full guide: [docs/TESTING.md](docs/TESTING.md)
## Development Setup / 开发环境
Open `project.godot` with **Godot 4.6** in the editor.
```powershell
# Headless check examples:
--headless --path . --script res://scripts/tests/SmokeTestRunner.gd
--headless --path . --script res://scripts/tests/IntegrationTestRunner.gd
--headless --path . --script res://scripts/tests/LayoutSanityTestRunner.gd
```
Release packaging: [docs/RELEASE_PROCESS.md](docs/RELEASE_PROCESS.md)
## Roadmap / 路线图
Current direction: visual & audio polish, mobile layout verification, performance baselines.
当前方向:素材与音效接入、移动端布局验证、性能基线归档。
See [docs/ROADMAP.md](docs/ROADMAP.md)
## License / 许可
[MIT License](LICENSE)