Files
EVEngine/docs/dev/README.md
T
西风逍遥游 6cc4e8b602 feat(rpg): RPG-Maker-style main model + complete RPG interface
Extend the RPG module into a data-driven RPG-Maker-style main model and add
a complete turn-based RPG example demonstrating the whole surface.

New RPG subsystems (all string-keyed, JSON-driven, Squirrel-bound):
- Quest tracker: QuestRegistry + Tracker + QuestSystem (states, notify,
  prerequisite chain, events); eve.RPG.newTracker().
- Progression: LevelSystem + RPGActor::Progression (XP/level/level-up events).
- Vitals: VitalsSystem + RPGActor::Vitals (current resource, takeDamage/heal/
  death/revive).
- Traits: Trait/TraitSystem + RPGActor::Traits (paramRate, elementRate,
  stateRate/resist, exParam, attack elements/states/times/speed).
- Turn-based battle: BattleSystem (damage-formula DSL "a.atk*4-b.def*2",
  hit/crit/element) + Battle (arbitrary sides, initiative order, target
  resolution, winner detection, events).
- Classes: Class/ClassSystem + RPGActor::ClassInfo (class traits + learn
  skills by level).
- GameState: global switches/variables/self-variables.
- Equipment + loot: EquipmentSystem (equip -> attribute modifiers) and
  LootSystem (loot table -> inventory Bag), via the inventory module.

Bindings: bind RPGActor::release for script-side destruction; wrap
registerSkillDamage double as float (SQUSEDOUBLE).

Example: examples/rpg-classic - complete RPG interface (bag/shop/stat
allocation/equipment/adjust every 3 waves/status screen anytime).

Tests: rpg_quest, rpg_progression, rpg_trait, rpg_battle, rpg_class,
rpg_gamestate, rpg_equipment (loot). Full rpg.* regression green.
2026-08-28 15:02:13 +08:00

3.7 KiB
Raw Blame History

EVEngine 开发者文档

本目录保存引擎的架构、模块设计、测试策略和实现计划,面向 EVEngine 本身的维护者与贡献者。

如果你是游戏开发者而不是引擎开发者:请从官网发布页 下载预编译 SDK 直接使用,不需要编译引擎;用户文档见用户指南与 模块使用手册。本目录及下文“从源码构建”只对需要修改引擎的人有意义。

架构与工程约定

功能设计

实施记录

阶段性设计稿与实施计划位于 superpowers/。文档使用的图示位于 img/。

构建与文档

  • 生成 C++ API 文档(Doxygen):make docs(或 cmake --build <build-dir> --target docs), 产物位于 docs/api/html/(已加入 .gitignore)。需要先安装 doxygen: Ubuntu/WSL sudo apt install doxygen、macOS brew install doxygen、Windows choco install doxygen。 文档配置见 docs/Doxyfile.in 与 docs/CMakeLists.txt,入口 src/、Readme.md 与 docs/usr/。 在线版由 GitHub Pages 持续发布:https://evengine.github.io/EVEngine/。

  • 运行时断言:引擎统一通过 zeroerr 的 ASSERT 系列宏做函数参数校验与内部不变量检查, 入口见 src/engine/common/Assert.h(EV_PARAM_CHECK / EV_ASSERT)。

    • Debug 构建默认启用;
    • Release 等非 Debug 构建默认通过 ZEROERR_NO_ASSERT 编译剔除,零运行时开销;
    • 需要手动开启时:make build/linux CMAKE_EXTRA_ARGS=-DEVENGINE_ENABLE_ASSERTS=ON (或 CMake 配置时加 -DEVENGINE_ENABLE_ASSERTS=ON)。

如果你是使用 EVEngine 制作游戏,而不是修改引擎,请从用户指南开始。