Skip to content

Instantly share code, notes, and snippets.

@jenaiho
Created August 10, 2026 22:28
Show Gist options
  • Select an option

  • Save jenaiho/7311241f812cd266f53d0eb621cc0933 to your computer and use it in GitHub Desktop.

Select an option

Save jenaiho/7311241f812cd266f53d0eb621cc0933 to your computer and use it in GitHub Desktop.
Stop Asking AI To Build The Whole Game At Once —— AI 遊戲開發原子化工作流深度分析(Can It Code? 2026-08-10)

Stop Asking AI To Build The Whole Game At Once

來源:YouTube | 00:06:50 | 2026-08-10

核心觀點

以 AI 輔助開發遊戲時,真正的生產力來自於將專案拆解為單一任務的原子化工作流,而非妄想以單一提示詞(Prompt)生成整個遊戲。

內容大綱

  1. 作者使用多模型協作策略,為 Claude (Fable/Opus)、GPT-56 與 Kim K3 分配不同的開發職責角色(規劃、程式、3D 建模、審美)。
  2. 專案起始於 Pinterest 的視覺靈感,但關鍵第一步是建立「色彩聖經」,將原始白天色調轉換為夜間版本,作為所有後續素材的強制規範。
  3. 核心開發原則是禁止一次性生成整個遊戲,而是讓最佳模型撰寫計劃,每個開發任務獨立使用全新的對話 session 進行。
  4. 動態雪地系統是技術亮點,包含基於高度圖的雪深、影響移動速度、以及透過單一固定尺寸圖像而非列表來實現的高效足跡系統。
  5. 所有 3D 模型皆由 AI 生成腳本並在 Blender 中執行,優點是修改只需調整腳本的一行程式碼重新生成,而非手動調整網格。
  6. 遊戲氛圍由可調式的打光控制面板驅動,展示了同一場景在不同預設下(如暴風雪、日出)的劇烈視覺差異。
  7. 敵人AI行為設計為高威脅性遭遇(如熊會逆風嗅聞並不可逃脫),且房屋內部透視是透過直接移除屋頂與牆面來實現,而非載入新場景。

五點深度分析

  1. 原子化工作流是對抗 AI 上下文窗口崩塌的唯一解方:作者反覆強調「一個任務,一個全新對話」的原則,這不僅僅是為了降低 Token 消耗,更是為了解決大型語言模型(LLM)的「注意力稀釋」問題。傳統的瀑布式對話會讓模型揹負越來越重的歷史包袱,導致在生成後續程式碼時混淆變數或邏輯。這種將每個特徵孤立開發的方法,實際上是在模擬微服務架構,即便某個任務失敗,也只需重試該任務,而不會汙染穩定的程式碼庫。這是從「AI 即魔術」轉變為「AI 即工具鏈」的成熟思維。

  2. 「色彩聖經」是先驗約束優於後驗修正的典範:作者在專案初期就將參考圖的光照環境從白天強制翻譯為夜晚,並以此建立色彩規範。這是一個極具遠見的設計決策。在 AI 生成素材的工作流中,風格一致性是最大的痛點。與其讓 AI 自由發揮後再費力統一色調,不如在一開始就輸入經過人工策展的色彩限制。這本質上是將人類的藝術指導權重提高,將 AI 的生成能力限制在一個極窄但極深的通道內,確保了 3D 模型、貼圖、燈光在最終合成時能無縫融合。

  3. 足跡系統的技術極簡主義揭示了遊戲開發的核心錯覺:將所有足跡繪製在一張固定大小的圖像上,而非維護一個無限增長的足跡列表,這是一個經典的運算複雜度陷阱規避案例。在傳統程式邏輯中,開發者直覺會建立一個陣列來儲存每個腳印的座標,導致記憶體和渲染成本隨時間線性增長。作者利用圖像取樣機制,讓「千個足跡的成本等同於一個」,完美體現了在 AI 時代,「知道要求 AI 做出什麼」遠比「AI 本身的能力」更為關鍵。

  4. 程序化生成腳本取代直接生成網格的隱性優勢:當作者發現屋頂網格有誤時,他修正的是 Blender 腳本中的一行程式碼,而不是直接用手去拖拽頂點。這種「生成邏輯保留」的做法,代表了 AI 輔助開發的高階形態。它將資產從靜態實體轉變為可重複執行的函式。這帶來了可審計性與參數化調整能力,當遊戲需求改變時(如「所有窗戶需加大 20%」),只需修改參數重新執行腳本,而不是在混亂的拓撲結構中掙扎。這在歷史上是從手動建模到 Houdini 程序化思維的延續,現在被 AI 普及化了。

  5. 「移除屋頂」的場景管理是反直覺的渲染優化與設計巧思:玩家進入屋內時,系統並非載入一個全新的室內場景,而是直接將當前場景的屋頂和前方牆壁移除。這種做法極大減少了場景切換的載入延遲與狀態同步問題,維持了遊戲世界的連續感(玩家仍能看見屋外的危險)。這種思維打破了靜態關卡設計的框架,將建築視為一組可動態開關的可見性圖層。它暗示了未來 AI 輔助開發的方向:不應教 AI 如何建造兩個分離的空間,而是教它如何優雅地折疊與展開單一空間。

關鍵概念速查

概念 說明
原子化工作流 (Atomic Workflow) 將複雜遊戲開發拆解為數十個獨立任務,每個任務在 AI 的新對話中執行,互不干擾。
色彩聖經 (Color Bible) 於專案初期制定的色彩映射規範,確保 AI 生成的所有素材在特定光照環境下風格統一。
Garat 此處應指製作影片者使用的遊戲引擎(可能為 Godot 或其他自定義引擎的誤植/暱稱)。
高度圖雪地系統 針對每個角落查詢高度,動態計算雪深,並影響玩家移動速度與足跡深淺的系統。
網格簡化 (Decimation) 將高面數寫實模型(如熊)透過 AI 腳本在 Blender 中自動減少多邊形數量以符合低面數美術風格。
動態場景遮蔽 不需要載入新關卡,而是直接透過程式碼移除屋頂與牆壁,或淡出遮擋視野的物體。

產業啟示

這種「多模型聯邦 + 人工策展」的開發模式,預示了未來小型開發團隊或獨立開發者的核心競爭力不再是程式碼編寫速度,而是「任務拆解粒度」與「設計意圖表達」的能力。當前的 AI 影片生成工具(如 Sora, Kling)容易讓人陷入追求一鍵生成的幻覺,但在對確定性與可維護性要求極高的軟體工程領域,這種幻覺是致命的。作者展示的流程證明了,保持人類在迴路中進行細粒度控制,能將 AI 幻覺(Hallucination)的破壞力限制在單一 session 內。

然而,此工作流對開發者的系統設計能力提出了更高要求。開發者需要非常清楚每個 AI 模型的強項與邊界,並設計出穩固的介面來整合這些分離的輸出(例如 Opus 寫的程式碼需完美承接 Kim K3 產生的 Blender 資產)。這就像是從一位全端工程師,轉變為一位技術 PM 與整合工程師。未來能普及此類高階工作流的 IDE 或開發工具,將在遊戲引擎市場中取得巨大優勢。同時,這也引發了一個倫理與版權的深層問題:當遊戲的每一行程式碼、每一個模型都由不同的混合 AI 模型生成時,傳統的智慧財產權歸屬將徹底崩塌,變成一個必須由貢獻權重與提示詞創造性來界定的灰色地帶。

金句

  • "Do not ask for the whole game in one prompt. Let the best model write the plan. Every job then gets its own clean session." (不要妄想用一個提示詞生成整個遊戲。讓最好的模型來制定計劃,然後每個任務都要有自己乾淨的獨立對話階段。)
  • "The model is not carrying nine other jobs, so it reads less and make fewer mistakes." (模型不需要同時揹負其他九個任務,所以它能讀懂更多,犯的錯也更少。)

原文逐字稿

點擊展開完整字幕

0:00 And this video will be different because 0:02 in this one I'm going to show you how I 0:05 built this. 0:07 It was made in Garat. 0:09 And yes, it's not one prompt. And I want 0:12 to show you the whole process how I 0:14 usually work with AI models. And I'm 0:17 using four. Fable 5, Opus 5, GPD56 Soul, 0:20 [music] and Kim K3. And each of those 0:23 models has different responsibility. 0:25 Fable 5 takes the hard [music] calls. 0:28 what we built and why. OPOS 5 rides the 0:31 mechanics and build models [music] too. 0:34 GPT56 is my Blender guy. Sometimes 0:37 mechanics, too. And Kim K3 is Blender 0:39 only. It has really good feel of 0:41 aesthetics, [music] 0:42 I noticed. So, how do you start? And 0:45 that's the hard part. I had a few of 0:47 these and I finished [music] none. They 0:49 all looked right, but none of them had a 0:52 gameplay loop. This one started the same 0:55 way. I was looking at Pinterest [music] 0:57 and that one scene stopped me and I just 1:00 wanted to make it a game so badly. So I 1:02 made it a reference not to copy it to 1:05 catch the [music] same feeling. And we 1:07 started with a color bible but the 1:09 picture is daylight and I wanted the 1:12 same place after dark. So every color 1:14 get translated first. From [music] now 1:16 on nothing goes in the game without it. 1:19 Okay, let's make a game. [music] Do not 1:21 ask for the whole game in one prompt. 1:23 Let the best model write the plan. Every 1:25 job then gets its own clean session and 1:28 every job ends the same way, a test. 1:31 [music] 1:32 If it fails, one job goes back, not the 1:34 game. So, one job, one fresh chat. The 1:38 model is not carrying nine other jobs, 1:40 so it reads less [music] and make fewer 1:42 mistakes. It also uses fewer tokens. So, 1:45 first job on the list, the ground. 1:48 [music] I told Fable what I wanted. Snow 1:50 deep in one place and thin in another. 1:53 Fable made a plan and Opus wrote it. It 1:55 starts flat. Completely [music] flat. 1:57 Every corner gets asked one question. 2:00 How high are you? [music] 110,000 of 2:03 them 60 times a second. You may ask why 2:06 I do [music] not save the answers once. 2:08 Because the height keeps changing. A 2:10 boot press the snow down. The wind 2:12 builds a drift up. And I never asked 2:14 about the [music] whole map. Only 120 m 2:17 of it. and it slides along with the 2:19 character. Next, a house, some trees, 2:22 and a car. These are just placeholders. 2:25 The real [music] Blender models come 2:26 later. Then we put snow on the ground. 2:29 And remember, the ground has a height. 2:32 So, the snow can be deep here and thin 2:34 [music] there. And now the snow slows 2:36 you down. Deep snow you walk. Thin snow 2:40 you can [music] run. And finally, 2:42 footprints. You can see where you 2:44 walked. It is a small thing, but it 2:46 makes the world feel alive. Behind the 2:48 scenes, it works like this. Every step 2:51 paints into one picture, [music] 2:52 not a list of footprints. One image 2:55 fixed size. The snow reads it. The winds 2:58 erase it. The enemy [music] writes into 3:00 the same one. A thousand tracks cost the 3:02 same as one. Okay, now let's replace 3:05 those placeholders with real Blender 3:07 models. Nobody modeled this house by 3:10 hand. An AI model wrote a script. 3:13 Blender run it. Every line adds one 3:16 piece. So when the roof is wrong, I do 3:18 not touch the [music] mesh. I fix one 3:20 line and run it again. Now let's add it 3:23 to the scene. And yes, it is much 3:25 better. Let's do the same with trees and 3:27 a car. Okay, it is starting to looks 3:30 like a game. If you like this video, 3:33 click subscribe button. Quick tip, don't 3:36 ask AI for realistic meshes. It will not 3:39 deliver. Simple shapes, it does well. 3:41 This house is just the boxes and a roof. 3:44 The light does [music] the rest and we 3:46 will work on it in a second. But first, 3:48 let's replace a character placeholder 3:51 with the real character. And first, I 3:53 wanted to [music] create a concept with 3:55 GPD. So, that's the prompt for GPD. And 3:58 those are the results. And those images 4:00 goes to mesh AI. I like to use that tool 4:03 for generating a character meshes. We 4:06 have 8,000 polygons, which is perfectly 4:08 fine for a main character. Okay, let's 4:10 texture it. And that's [music] fine. We 4:12 will map the colors to our color bible 4:15 later. And this time I also decided to 4:17 use the animations from meshi directly. 4:19 And the [music] rigged character looks 4:21 much more simple and has like less 4:24 details and a bit different colors. But 4:26 as I said, we will fix it and it will 4:27 look perfectly fine in our game. 4:30 And there it is. Our new character is in 4:32 the game and it looks really, really 4:34 cool. Now, let's just walk around. Oh, I 4:37 love those footprints and the fact that 4:39 each footprints can have like a 4:41 different depth and also the snow that 4:43 you feel where it's deep. Okay, so we 4:45 have the character and we have all of 4:47 the meshes on the map. We will play with 4:49 the light a bit about the lightning. It 4:52 is really helpful to ask your AI model 4:54 to expose you this kind of lightning 4:56 control panel with those sliders so you 4:58 can play around. Of course, if you can't 4:59 do that directly in the game engine, for 5:01 example, go do. So here I have few 5:03 presets. Each of them reflects a 5:05 different daytime. So let's play along. 5:08 This one is like a flat then nightfall. 5:10 And you can see how much this scene 5:12 changes. Deep night, which is a bit bit 5:15 [music] lighter, and a white out 5:17 blizzard. A lot more density of the fog. 5:20 And the sunrise. I love this one. It is 5:22 really warm here. 5:25 And then pale day um midday. So you can 5:28 see how much the same scene [music] 5:30 differs based on the lightning settings. 5:33 And I love this that you can affect the 5:35 [music] game a lot this way. And now the 5:38 enemies. I want a very few of them, but 5:40 every meeting should be able to kill 5:42 you. Right now there are two, a starving 5:44 man and bears. I found the bear on 5:47 Sketch Fab with CC attribution and a lot 5:49 of animations. So I downloaded it. But 5:51 the bear is realistic here and we need 5:53 more low poly models. So I asked AI to 5:56 decimate it in Blender. And here you can 5:58 see a three stages of decimation. and 6:00 decimation. Simply reducing a polygon 6:02 counts. The man sees you. The bear 6:05 smells you on the wind. This part is 6:07 still a prototype. You press [music] F 6:09 and the gun finds the target. The bear 6:12 you cannot outrun ever [music] so it 6:15 warns you first and then it charges. It 6:18 knocks you down and for now you just lie 6:20 there. Last thing I want to show you the 6:22 house interior. It's not a different 6:24 location. It's the same one. So player 6:26 sees the danger outside the house. How 6:28 does it work? Simple. The moment I step 6:31 inside, the roof and the front wall come 6:33 off. That's it. But there is also 6:35 another system. When our character goes 6:37 behind some object, for example, a tree, 6:39 then the whole shape fades out. How the 6:42 camera shoots array at me all [music] 6:44 the time. And that's it, guys. If you 6:47 want more deep dive videos, let me know 6:49 in the comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment