Files
Fishdice/analysis/FishDice/index.html
2026-06-25 10:55:02 +08:00

78 lines
4.9 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>FishDice 框架分析总览</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="shell">
<div class="topbar">
<div class="brand">FishDice Framework Analysis</div>
<div>分析根目录:<span class="path">C:\Users\13999\Documents\Fishdice\FishDice</span></div>
</div>
<section class="hero">
<h1>FishDice / LuckyDice 游戏框架分析总览</h1>
<p class="subtitle">这份报告分析的是当前仓库中已经落地的 Lucky Dice 玩法内核框架。它不是完整游戏壳,而是一个“纯 C# 可测试核心 + Unity Demo 表现层”的玩法流程框架。</p>
<div class="nav-grid">
<a class="nav-card" href="structure.html"><strong>结构与分层</strong><span>Runtime、Demo、DemoEditor、Tests 的边界与依赖方向。</span></a>
<a class="nav-card" href="lifecycle.html"><strong>流程与生命周期</strong><span>从 Roll 请求到奖励、Lucky Dice、目标玩法入口的完整链路。</span></a>
<a class="nav-card" href="random-logic.html"><strong>随机逻辑解释</strong><span>权重随机、分层池漏斗、状态沉淀与可观测 Trace 的决策图。</span></a>
<a class="nav-card" href="module-development.html"><strong>玩法与模块开发</strong><span>规则、Matcher、Action、候选、TargetMode 如何扩展。</span></a>
<a class="nav-card" href="resources.html"><strong>资源管理</strong><span>当前资源策略、配置形态、Unity 资源接入缺口。</span></a>
<a class="nav-card" href="ui.html"><strong>UI 管理</strong><span>Demo UI 的组织方式,以及框架层尚未拥有的 UI 抽象。</span></a>
<a class="nav-card" href="design-highlights.html"><strong>设计精妙点</strong><span>纯核心、注入随机源、配置校验、可观测 Trace 等。</span></a>
<a class="nav-card" href="weaknesses.html"><strong>缺点与风险</strong><span>当前框架缺失的系统能力和后续落地风险。</span></a>
</div>
</section>
<section>
<h2>一句话结论</h2>
<div class="note good">FishDice 当前最强的设计点,是把 Lucky Dice 的核心决策链路压成无 UnityEngine 依赖的纯 C# 服务,并用配置、注册表、随机源注入和 Trace 让它可测、可回放、可扩展。</div>
<div class="note warning">当前最明显的边界是它还不是一个完整游戏框架资源加载、UI 导航、场景生命周期、目标玩法启动器、远端配置与持久化服务都还停留在 Demo 或未来接入层。</div>
</section>
<section>
<h2>宏观结构图</h2>
<pre>Unity Demo / Scene
-> LuckyDiceDemoController
-> LuckyDiceDemoRunner
-> LuckyDiceRuntimeFactory
-> LuckyDiceRollFlowService
-> DiceRollService
-> ComboFactBuilder
-> ComboRuleMatcher
-> RollActionDispatcher
-> LuckyDiceFlowService
-> TargetModeResolver
-> RollTrace</pre>
<div class="grid-3">
<div class="metric"><div class="value">纯 C#</div><div class="label">Runtime asmdef 设置 <code>noEngineReferences: true</code>,核心不依赖 UnityEngine。</div></div>
<div class="metric"><div class="value">7 层</div><div class="label">Roll、Facts、Rules、Actions、LuckySelection、TargetMode、Trace。</div></div>
<div class="metric"><div class="value">Demo 外挂</div><div class="label">UGUI、场景构建和 Unity 生命周期都在 Demo/DemoEditor 层。</div></div>
</div>
</section>
<section>
<h2>如何阅读</h2>
<p>先读 <a href="structure.html">结构与分层</a>,理解它为什么是“玩法内核”而不是“完整游戏框架”。再读 <a href="lifecycle.html">生命周期</a>,顺着一次 Roll 的数据流看完整闭环。随后按工作目的进入模块开发、资源、UI、亮点或风险页面。</p>
</section>
<section class="evidence">
<h2>关键证据</h2>
<ul>
<li><span class="path">FishDice/Assets/FishDice/Runtime/FishDice.Runtime.asmdef:13</span> 声明 <code>noEngineReferences: true</code></li>
<li><span class="path">LuckyDiceRollFlowService.cs:32</span> 是核心流程入口。</li>
<li><span class="path">LuckyDiceRuntimeFactory.cs:24-59</span> 统一装配配置、随机源、matcher、executor、服务。</li>
<li><span class="path">LuckyDiceDefaultConfig.cs:151-238</span> 定义默认规则、候选和目标模式。</li>
<li><span class="path">LuckyDiceDemoController.cs:131-244</span> 运行时构建 Demo UGUI并只使用内置字体资源。</li>
</ul>
</section>
<div class="footer">生成目录:<span class="path">analysis/FishDice</span>。所有页面为离线静态 HTML。</div>
</main>
</body>
</html>