|
| 1 | +# ZeroEngine |
| 2 | + |
| 3 | +[](https://github.com/liuzqk/zeroengine/actions/workflows/tests.yml) |
| 4 | +[](LICENSE) |
| 5 | +[](https://unity.com/releases/editor/archive) |
| 6 | + |
| 7 | +ZeroEngine is the shared Unity codebase I maintain for ZeroGameStudio projects. |
| 8 | +It is split into Unity Package Manager packages so a game can pull in only the |
| 9 | +systems it needs. |
| 10 | + |
| 11 | +Most of these packages came out of production work on POB: runtime helpers, |
| 12 | +editor tooling, data systems, save logic, UI, analytics, and 2D platform |
| 13 | +navigation. The repository is kept public so those reusable pieces can be used |
| 14 | +and tested outside a single game project. |
| 15 | + |
| 16 | +## Why I Keep This Separate |
| 17 | + |
| 18 | +Unity projects tend to accumulate the same glue code over time: singleton and |
| 19 | +event helpers, pooled runtime objects, save data, quests, platform navigation, |
| 20 | +UI panels, editor data browsers, and debugging tools. Keeping these systems in |
| 21 | +packages makes it easier to reuse them across projects and to test them without |
| 22 | +mixing in game-specific content. |
| 23 | + |
| 24 | +## Package Highlights |
| 25 | + |
| 26 | +| Package | Purpose | |
| 27 | +| --- | --- | |
| 28 | +| `com.zerogamestudio.zeroengine.core` | Core helpers, logging, pooling, singleton patterns, and performance utilities. | |
| 29 | +| `com.zerogamestudio.zeroengine.data` | Data and stat systems for game configuration and runtime values. | |
| 30 | +| `com.zerogamestudio.zeroengine.data-toolkit` | Editor tooling for browsing, inspecting, and validating project data assets. | |
| 31 | +| `com.zerogamestudio.zeroengine.gameplay` | Reusable gameplay mechanics and trigger helpers. | |
| 32 | +| `com.zerogamestudio.zeroengine.narrative` | Quest and narrative runtime services. | |
| 33 | +| `com.zerogamestudio.zeroengine.pathfinding2d` | 2D platform navigation, graph generation, jump links, route costs, and diagnostics. | |
| 34 | +| `com.zerogamestudio.zeroengine.persistence` | Save and persistence infrastructure. | |
| 35 | +| `com.zerogamestudio.zeroengine.ui` | Runtime UI framework and toast notification systems. | |
| 36 | +| `com.zerogamestudio.analytics` | Self-hostable analytics and bug feedback SDK. | |
| 37 | + |
| 38 | +There are also packages for AI, audio, combat, economy, input, localization, |
| 39 | +network, RPG, social, world, and editor dashboard systems. |
| 40 | + |
| 41 | +## Installation |
| 42 | + |
| 43 | +Add packages through Unity Package Manager using a Git URL with the package |
| 44 | +path you need: |
| 45 | + |
| 46 | +```text |
| 47 | +https://github.com/liuzqk/zeroengine.git?path=com.zerogamestudio.zeroengine.core#main |
| 48 | +``` |
| 49 | + |
| 50 | +For example, a project `Packages/manifest.json` can pin several packages: |
| 51 | + |
| 52 | +```json |
| 53 | +{ |
| 54 | + "dependencies": { |
| 55 | + "com.zerogamestudio.zeroengine.core": "https://github.com/liuzqk/zeroengine.git?path=com.zerogamestudio.zeroengine.core#main", |
| 56 | + "com.zerogamestudio.zeroengine.pathfinding2d": "https://github.com/liuzqk/zeroengine.git?path=com.zerogamestudio.zeroengine.pathfinding2d#main", |
| 57 | + "com.zerogamestudio.zeroengine.ui": "https://github.com/liuzqk/zeroengine.git?path=com.zerogamestudio.zeroengine.ui#main" |
| 58 | + } |
| 59 | +} |
| 60 | +``` |
| 61 | + |
| 62 | +For production work I usually pin a tested commit hash instead of `#main`. |
| 63 | + |
| 64 | +## Repository Layout |
| 65 | + |
| 66 | +Each top-level `com.zerogamestudio.*` directory is a UPM package. Most packages |
| 67 | +follow the same structure: |
| 68 | + |
| 69 | +```text |
| 70 | +com.zerogamestudio.zeroengine.<module>/ |
| 71 | + Runtime/ |
| 72 | + Editor/ |
| 73 | + Tests/ |
| 74 | + Samples~/ |
| 75 | + package.json |
| 76 | + README.md |
| 77 | +``` |
| 78 | + |
| 79 | +Not every package has every folder; small runtime-only packages stay minimal. |
| 80 | + |
| 81 | +## Testing |
| 82 | + |
| 83 | +The repository includes a GitHub Actions workflow that builds a temporary Unity |
| 84 | +project and runs EditMode tests through GameCI. |
| 85 | + |
| 86 | +For local work, open a Unity 2022.3 project that references the package under |
| 87 | +test, then run the relevant EditMode tests from Unity Test Runner. Keep new |
| 88 | +tests narrow and package-scoped. |
| 89 | + |
| 90 | +## Support and Security |
| 91 | + |
| 92 | +- Use [GitHub issues](https://github.com/liuzqk/zeroengine/issues) for |
| 93 | + reproducible bugs and focused feature requests. |
| 94 | +- See [SUPPORT.md](SUPPORT.md) for the information maintainers need. |
| 95 | +- See [SECURITY.md](SECURITY.md) for private security reporting guidance. |
| 96 | + |
| 97 | +## Production Use |
| 98 | + |
| 99 | +POB depends on multiple ZeroEngine packages, including analytics, core, data, |
| 100 | +data-toolkit, economy, gameplay, narrative, pathfinding2d, persistence, and UI. |
| 101 | +That is the main production feedback loop for this repository. |
| 102 | + |
| 103 | +## Contributing |
| 104 | + |
| 105 | +See [CONTRIBUTING.md](CONTRIBUTING.md) before opening issues or pull requests. |
| 106 | +Small, tested fixes are preferred over broad rewrites. |
| 107 | + |
| 108 | +## License |
| 109 | + |
| 110 | +ZeroEngine is available under the [MIT License](LICENSE). |
0 commit comments