Skip to content

feat(recastnavigation): add compat.recastnavigation 1.6.0 - #7

Merged
wellwei merged 1 commit into
mainfrom
feat/add-recastnavigation
Aug 29, 2026
Merged

feat(recastnavigation): add compat.recastnavigation 1.6.0#7
wellwei merged 1 commit into
mainfrom
feat/add-recastnavigation

Conversation

@wellwei

@wellwei wellwei commented Aug 29, 2026

Copy link
Copy Markdown
Owner

模式:Add — compat.recastnavigation 1.6.0

新增 Recast Navigation v1.6.0(Zlib 许可)——游戏行业导航网格事实标准:Recast 把关卡几何烘成导航网格,Detour 在网格上跑运行时寻路。三平台(linux / macosx / windows)同一上游 tag tarball,sha256 d48ca0121962fa0639502c0f56c4e3ae72f98e55d88727225444f500775c0074

形态与消费者语法

Form A(源码 compat,C++23):上游五个 CMake target → 一个 lib target + 三个 source-gated feature。无 configure 产物、无外部依赖(30 个 .cpp 只依赖标准库,已核实全部 #include 并集):

  • 核心Recast + Detour(几乎不会有消费者只用其一,不做成 feature)
  • feature crowd(DetourCrowd)、tilecache(DetourTileCache)、debug-utils(DebugUtils,implies tilecache——上游 DebugUtils 无条件链接 DetourTileCache,不 imply 会让只开调试绘制的消费者在链接期报缺 dtTileCache* 符号)
  • 上游两个 ABI 开关(DT_POLYREF64 / DT_VIRTUAL_QUERYFILTER)刻意做成 feature:feature 的 defines 只作用于本包 TU,会造成库/消费者 ODR/ABI 分裂

include 两种拼写都支持(对齐上游安装契约):#include <Recast.h>(五个模块的 Include/ 目录)与 #include <recastnavigation/Recast.h>(26 个生成头:25 个转发头 + version.h)。

消费者语法:

[dependencies.compat]
recastnavigation = "1.6.0"
# 或带 feature:
recastnavigation = { version = "1.6.0", features = ["crowd", "debug-utils"] }

测试成员(可失败断言,return ok ? 0 : 1

  • tests/examples/recastnavigation:20×20 地面中间挖 4×4 洞,断言路径必须绕行(多边形数 > 0、8 三角形全部 walkable、直线路径 ≥ 3 点、终点距目标 < 2.0、路径长 > 直线距离 + 0.5);混用两种 include 拼写
  • tests/examples/recastnavigation-features:只声明 crowd + debug-utils(验证 implies 链,链断则本成员链接期失败);crowd agent 400 步后接近目标 > 5m、tilecache 物化的 tile 能答 findNearestPolyduDebugDraw 收到顶点与三角形批次

镜像

无 CN 镜像(编写环境无 gtc / mcpp-res 写权限),url 为纯字符串,CN 用户回落 GitHub 上游。后续有权限的维护者可改为 { GLOBAL = ..., CN = ... } 表;需上传的 tarball 与 GLOBAL 逐字节一致,sha256 不变。

本地验证(macOS arm64,mcpp 2026.8.21.3)

  • 描述符 lint 全套通过:lua 语法 / 必填字段 / 版本无 v 前缀 / mirror 规则 / 包名单原子段 / 平台版本 parity / 跨包引用
  • mcpp xpkg parse 通过(三平台 1.6.0、26 生成头、3 feature、implies 被识别)
  • 两个成员冷构建+运行通过(注册表无缓存,完整走下载 → sha256 校验 → 解包 → 生成 → 编译 → 链接 → 断言)

平台局限:本机仅 macOS arm64;linux(default + llvm)与 windows 由本 PR CI 覆盖。

floor/pin 影响

无:index.tomlmin_mcpp 保持 2026.8.3.3,描述符未使用新语法。

@wellwei
wellwei merged commit 870fc80 into main Aug 29, 2026
11 checks passed
@wellwei
wellwei deleted the feat/add-recastnavigation branch August 29, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant