Add prototype gameplay loop with character/battlefield assets and server game APIs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
udx
2026-10-20 18:50:00 +08:00
co-authored by Cursor
parent 79369e4473
commit 6c64210331
833 changed files with 998079 additions and 1042 deletions
@@ -0,0 +1,33 @@
# 主界面背景音乐:糖果营地
制作日期:2026-10-20。用途:Candy 风格营地主界面,伙伴收集与轻策略游戏的日常停留背景。
风格依据为 `GameDesign.md`、`Doc/Design/UI/UI_Themes.md` 与 `Doc/Design/UI/Home/home_generation.json`:阳光、奶油色小屋、绿色原野、喷泉和可爱动物伙伴。配器目标为柔和马林巴/木琴短旋律、木吉他分解和弦、拨弦、温暖低音、轻木管与少量铃音,情绪欢迎、轻松、有准备出发的探索感。完整英文提示词保存在 `generation.json` 的 `prompt`。
## 成品
| 文件 | 用途与规格 |
| --- | --- |
| `AIClient/Assets/Bundles/Sound/BGM/CandyCamp_MainMenu_Loop.ogg` | 主界面循环候选成品,90.9秒、48000 Hz、立体声 Vorbis,1,621,586字节 |
| `CandyCamp_MainMenu_Source.mp3` | 未修改的DGX原曲,94秒、48000 Hz、立体声、128 kbps,留档及试听 |
| `server_metadata.json` | 服务返回的原始生成元数据,含实际种子、caption与LM规划 |
| `generation.json` | 风格提示词、生成参数、循环处理参数、音频验证与SHA-256 |
| `unity_validation.json` | Pipeline验证后的AudioClip规格、导入设置与资源收集信息 |
## 生成
严格按 `D:/UD/AI/XModel/DGX音乐_AI调用指南.md` 调用局域网DGXA音乐服务。模型 `acestep-v15-xl-sft`,LM `acestep-5Hz-lm-4B`;50步、CFG 7、思考开启、批量1、空歌词、无人声提示词。用户未指定时长与BPM,保持时长 `-1`、BPM `null`,交由LM规划;未更换权重或启动参数。
服务种子为 `1430014797`,LM规划200 BPM、C major、三拍、94秒。BPM及拍号为服务规划值,尚未人工确认实际节拍。服务元数据中的 `instrumental: false` 为其内部默认标记;调用接口按指南不额外添加纯音乐字段,无人声意图通过空歌词与提示词表达,实际人声有无仍以试听为准。
生成入口为 `Tools/generate_main_menu_music.py`,原始请求、队列事件、返回和下载记录保留在 `Tools/output/main_menu_music/`。任务ID `89793b8b202341b0944499ce482d1124`。首次SSE订阅在会话创建前返回session_not_found;脚本恢复到同一session与event_id读取结果,只提交了一次生成请求,没有重复排队。
## 循环处理与验证
`python Tools/prepare_main_menu_music.py` 在Unity外处理原始音频:按LM规划的小节长度裁至92.7秒,去掉尾部明显衰减,首尾以1.8秒(两个规划小节)等功率交叉淡化,并旋转接缝到连续波形处。全局降低约1.34 dB后输出Vorbis质量5,得到90.9秒。OGG容器避免MP3编码填充影响循环长度;并未宣称已通过人工听感的无缝音乐衔接。
完整解码成功,采样有限且无削波;OGG解码峰值约-3.17 dBFS,RMS约-20.90 dBFS;循环边界采样差约0.00797,小于内部相邻采样差的99百分位0.05113。上述为技术检查,不能替代旋律、节奏及有无人声的人工试听。
Unity导入与验证使用项目的 `unity-pipeline` 技能:`import_asset` 导入,然后执行 `AIClient/AgentScripts/ImportMainMenuMusic.cs` 的 `ConfigureAndVerify`。AudioClip实际为4,363,200采样帧、90.9秒、双声道、48000 Hz。导入设置为Vorbis质量0.7、CompressedInMemory、保留采样率、后台加载、不预加载,避免启动即展开整首PCM。Art包新增Sound组,仅收集 `Assets/Bundles/Sound/BGM`,按文件名寻址、单独打包;原有收集项保留。本轮Console游标558之后无新增错误。
本次完成生成、循环处理、Unity入库、收集配置与资源登记;未添加AudioSource或运行时播放代码,未接入设置页音乐开关,未构建Bundle、发布CDN或进行微信真机验证。音乐听感和最终循环衔接待试听确认。
+44
View File
@@ -0,0 +1,44 @@
{
"date": "2026-10-20",
"model": "acestep-v15-xl-sft",
"lm_model": "acestep-5Hz-lm-4B",
"inference_steps": 50,
"seed": 1430014797,
"planned_bpm": 200,
"planned_key": "C major",
"planned_meter": "3",
"prompt": "Original instrumental background music for a cozy, colorful Candy-style mobile game's main menu: a sunny miniature village camp, cream cottages, green meadows, a little fountain, friendly cute animal companions and a gentle sense of preparing for an adventure. Warm, welcoming, playful and relaxed, cheerful without being hyperactive. A memorable but understated short pentatonic melody on soft marimba and wooden xylophone, answered by a mellow flute or clarinet; light nylon-string acoustic guitar arpeggios, pizzicato strings, rounded upright bass and very delicate shaker and woodblock percussion. A few soft celesta sparkles, warm acoustic chamber arrangement, moderate gently bouncing walking pace, clear major-key harmonies. Instrumental only, no singing, no humming, no choir, no speech. Small recurring A and B phrases with subtle variations, stable gentle dynamics and lots of breathing space for menu interactions. Designed for comfortable repeated listening, a short pickup and a final phrase that naturally returns to the opening harmony, loop-friendly structure, no dramatic buildup, no big finale, no heavy drums, no aggressive brass, no distorted guitars, no EDM drops, no environmental sound effects. Polished clean stereo game soundtrack.",
"lyrics": "",
"source": {
"file": "CandyCamp_MainMenu_Source.mp3",
"seconds": 94.0,
"sample_rate": 48000,
"channels": 2,
"bitrate": "128 kbps",
"sha256": "65f7c8fe5f799adc1121bed3bf166a43ee2161f1297f6bf33491786bd491ddb8"
},
"loop": {
"asset": "AIClient/Assets/Bundles/Sound/BGM/CandyCamp_MainMenu_Loop.ogg",
"seconds": 90.9,
"sample_rate": 48000,
"channels": 2,
"bytes": 1621586,
"codec": "Vorbis",
"quality": 5,
"source_end_seconds": 92.69999999999999,
"crossfade_seconds": 1.7999999999999998,
"gain_db": -1.3376273615099534,
"decoded_peak_dbfs": -3.171337127685547,
"decoded_rms_dbfs": -20.89783477783203,
"boundary_sample_delta": 0.007966671139001846,
"internal_sample_delta_p99": 0.05112835392355919,
"sha256": "59fb32c3dc42efd2183fefd8c82a76d5068c270a772fd6bec154684eaebe7294"
},
"verification": {
"decode": "passed",
"finite_samples": true,
"clipping": false,
"musical_seam": "Two planned bars crossfaded; human listening review pending",
"runtime_playback": "Not wired; resource generation/import only"
}
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,20 @@
{
"asset": "Assets/Bundles/Sound/BGM/CandyCamp_MainMenu_Loop.ogg",
"guid": "c2de2ab8cb8c4c340a9ac699a274cc40",
"length": 90.9,
"samples": 4363200,
"channels": 2,
"frequency": 48000,
"loadType": "CompressedInMemory",
"compression": "Vorbis",
"quality": 0.7,
"loadInBackground": true,
"preloadAudioData": false,
"package": "Art",
"group": "Sound",
"address": "CandyCamp_MainMenu_Loop",
"packRule": "PackSeparately",
"runtimePlaybackWired": false,
"bundleBuilt": false,
"verifiedUtc": "2026-10-20T09:55:34.2279400Z"
}