← Playbook 首頁成品遊戲 · 俯視角射擊 · 困難

PIT NINE

拾荒者在廢料場競技場裡先打兩波機械獵犬,再對付巨型機甲 Foreman:把它的炮、飛彈艙和護甲一件件打掉,最後攻擊核心。Claude Code 依照 Playbook 提示詞完成,我們從沒告訴它該怎麼修。

先玩玩看

WASD 移動,滑鼠瞄準,空白鍵翻滾。

遊戲一開始是灰盒。按下它下方的黃色按鈕,或在遊戲中按 M,就會載入 Tripo 模型;載入模型後,按 L 可以把所有東西換成 Tripo 的 Mecha Pop 風格。

一款遊戲,三種外觀

灰盒、Tripo 預設貼圖,以及同一批模型的 Mecha Pop 貼圖。切換時,已打掉的部件仍然是壞的。

灰盒 · 第 2 階段

灰盒 · 第 2 階段

方塊和圓柱體。Boss 在這時就已經是一組有命名的部件,各自繞著自己的鉸鏈轉動。

Tripo 模型 · 第 5 階段

Tripo 模型 · 第 5 階段

Foreman 是一個拆成部件的 Tripo 模型;射擊時,炮、飛彈艙和護甲會一件件掉下來。

Mecha Pop · 一個按鈕

Mecha Pop · 一個按鈕

每件素材都多貼了一套 Tripo 的 Mecha Pop 風格貼圖。遊戲會直接原地換檔。

一個階段一個階段看這次怎麼做出來

10 輪對話,agent 實際執行約 3 小時,agent 費用 $47,Tripo 點數 1,130。最久的一輪是換上模型:75 分鐘、超過 120 次工具呼叫。

  1. agent 替 Boss 寫了一張部件表(每個部件的功用、鉸鏈位置、打掉後會失去哪種攻擊),接著做出已內建風格切換的灰盒、19 項機制檢查和兩個 bot。

    • 只有主角是帶骨骼的人形;獵犬和 Boss 都由部件組成
    • 我們站著不動,20 秒就死了:bot 從第一個畫面就在移動。於是第 1 波改成了溫和的教學波
    • 它自己找出五個 bug,包括設計稿裡左右炮寫反了
    設計,接著做灰盒
  2. 每件素材:圖片、Smart Mesh P2.0、貼圖,再貼一套 Mecha Pop。Segment 把獵犬和 Foreman 分別切成 106 塊和 111 塊;手動合併只讓數量減少約十分之一。

    • 8 件素材 × 2 種外觀 = 16 個 GLB
    • 1,130 點數,約 50 分鐘
    在 Tripo 拆部件、換風格
  3. 每一塊匯出後都叫 tripo_part_N。agent 依每塊與哪個佔位物件重疊來為獵犬歸組;這招對 Foreman 行不通,它就改用標好編號的渲染圖來分類,並切開了一塊同時包含小腿和腳的零件。

    • 每個模型約 100 張貼圖合併成一張;Foreman 只要 10 次 draw call
    • 貼圖 213 → 105 MB,手機上 37 MB
    • 修改 6 個玩法數值前先來問過
    換上模型:100 塊沒有名字的零件
  4. 灰盒的狀態顏色讓貼圖後的模型整體發白,打擊感很弱,雙腿還跟著滑鼠轉。我們只描述看到的狀況;agent 把狀態顏色限縮在小範圍、加上命中回饋,並把身體拆開:雙腿朝跑動方向,脊椎轉向瞄準點。

    • 獵犬被染色的時間比例 91% → 17%;腿偏離跑動方向 25° → 7°
    • 火花、命中標記和程式合成的音效;它還抓到了自己造成的碰撞盒退化
    • 24 MB 的靜態建置版本發布到 tripo.page;兩種外觀的機制檢查都是 19/19
    試玩,然後發布

六個階段之外

主線教學從不拆分模型,也不給模型第二套外觀。這裡的 Boss 會一件件被打下來,獵犬沒有骨架,每件素材都有兩種風格。選一個主題。

Segment

把模型拆成部件

Segment 會把生成的模型切成多塊,每一塊在 GLB 裡都是獨立的網格。所以你把 Foreman 的炮打掉時,它才會真的少一門炮。

點數,第一次免費
40
每個模型
~1 min
Balanced 拆出的塊數
68–111
  • 三個等級:Simple(3–6 個部件)、Balanced(6–15 個)和 Detailed。數量只是名義上的:這次 Balanced 拆出了 68、106 和 111 塊。
  • Segment 需要 Triangle 網格,而且模型不能已經綁定骨架。要先拆分,再綁定。
  • 每次從圖片開始,Topology 都會重設為 Quad 和 5,000,所以每個模型都要再選一次 Triangle。
  • 貼圖之後部件仍然保留:測試用的機甲匯出為 68 個網格、68 張小貼圖,加起來約 1 MB。
  • 每個部件一種顏色、部件之間留有縫隙的機械圖,拆出來的結果最接近你想要的部件。
預覽把機械分成約九個區域。
預覽把機械分成約九個區域。
Balanced 實際回傳了 68 塊,每塊都命名為 tripo_part_N。
Balanced 實際回傳了 68 塊,每塊都命名為 tripo_part_N。
告訴你的 agent
把每件素材標明是人形、道具,還是由部件組成的機械。機械請要求每個部件一種純色,部件之間留縫隙。

Merge 與歸組

大致合併一下,剩下的交給程式

Studio 可以手動合併零件。點了幾十下之後,其餘的部分改由程式依每塊所在的位置歸組。

合併後 Foreman 的塊數
111 → 103
Foreman 的 draw call
10
每隻獵犬的 draw call
6
  • 要選取多塊,請在 3D 視圖中按住 Cmd 點選(Windows 上是 Ctrl)。點清單沒有用,按 Shift 則會取消選取。
  • Merge 對已貼圖的模型也有效,合併後的塊在 GLB 裡仍然維持合併。
  • 獵犬是依每一塊與灰色佔位物件的重疊程度來歸組的。Foreman 的比例差太多,所以 agent 改為渲染標好編號的視圖,把它拆成幾個大塊,再把螺栓歸給最近的大塊。
  • 有一塊同時包含左前小腿和左後腳,agent 把它切成兩塊。背面的螺栓黏在護甲上,已被移開。
  • 每個部件都帶著自己的小貼圖,每個模型約 100 張。agent 把它們打包成每個模型一張圖集。
  • 飛彈艙的蓋子不是獨立的一塊,所以它的開啟動畫被拿掉,而不是硬做假的。
把獵犬合併回大約六個部件。
把獵犬合併回大約六個部件。
Studio 裡選取的部件會出現移動、旋轉和縮放的控制軸。
Studio 裡選取的部件會出現移動、旋轉和縮放的控制軸。
告訴你的 agent
列出每個 tripo_part_N 的位置和大小,把它們歸入設計文件中的部件,並在接上遊戲之前先給我看一張標好編號的渲染圖。

運作中的部件

鉸鏈、受擊區、被打掉

每個部件依設計文件繞著鉸鏈轉動,有自己的受擊區和 HP,被打掉時會讓 Boss 少一種攻擊。

護甲落在受擊區內的比例
22% → 48%
炮口的真實位置
3.0 → 2.1 m
改之前先問過的數值
6
  • 受擊區一開始是照灰色方塊配的。換成模型後,護甲的受擊區從護甲板的 22% 擴大到 48%,炮口位置從 3.0 m 移到 2.1 m。
  • 它自己的改動讓衝撞打不到玩家(停止半徑 3.6 m)之後,agent 又先問過我們,才把衝撞距離調到 4.2 m。
  • 炮出現的顏色和概念圖相反,所以改用位置而不是顏色來命名。
  • 讓被打中的部件晃動時,連碰撞判定用的軸心也跟著動了;核心滑進車身,戰鬥時間從 60 秒變成 107–158 秒。現在只有看得見的網格會晃動。
  • 炮、飛彈和獵犬在檔案裡朝向 −X,已被轉成朝向 +Z。
遊戲中的 Foreman:炮、飛彈艙和護甲都是獨立的部件。
遊戲中的 Foreman:炮、飛彈艙和護甲都是獨立的部件。
告訴你的 agent
把每個受擊區重新對準真實模型,並讓我看修改前後的數字。只讓看得見的網格做動畫,不要動碰撞判定用的軸心。

四足綁定

為什麼獵犬沒有骨架

Tripo 在網頁版可以為四足模型綁定骨架,但只附帶一個預設動作,而且失敗了。獵犬就成了六個由程式碼移動的部件。

Rig → Other 的骨骼數
15
預設動作:Walk
1
花掉的點數,沒有可用結果
40
  • Rig → Other 不到兩分鐘就建好四足骨架,花了 20 點數。
  • 第一次匯出 Walk 沒有動畫;第二次嘗試回傳「An error occurred while running task」。
  • Text to Motion(20 點數)做出的是人形動作,無法套用在獵犬上。
  • Tripo 的 API 能綁定的身體類型比現在的網頁版多,包括四足的。
  • 遊戲裡每隻獵犬是一個身體、一個頭和四條腿;腿由程式碼擺動,頭在蓄力時發紅光,撲擊時發橘光。
Rig → Other 替獵犬生成 15 根骨骼的骨架;有一根後腿骨骼的角度不對。
Rig → Other 替獵犬生成 15 根骨骼的骨架;有一根後腿骨骼的角度不對。
唯一的預設動作 Walk 失敗了兩次。Text to Motion 只做出人形動作。
唯一的預設動作 Walk 失敗了兩次。Text to Motion 只做出人形動作。
告訴你的 agent
凡是不是人形的東西都不綁骨架:把它拆成部件,再用程式碼移動這些部件。

風格貼圖

同一個網格,第二種外觀

用風格預設為同一個模型再貼一次圖,就會得到形狀相同的第二個版本。一顆按鈕就能切換全部 16 個檔案。

帶風格貼圖多花的點數
+5
素材 × 外觀 = 16 個 GLB
8 × 2
貼圖記憶體
213 → 105 MB
  • 2K 貼圖要 10 點數,加風格是 15。面板預設是 8K,要 30。
  • 風格會被記住,套用到下一次貼圖。要回到不使用風格,再點一下已選取的風格即可。
  • 先匯出預設外觀,再用風格重新貼圖並匯出。已綁定骨架的角色,在第二次匯出前要重新套用動作。
  • 只載入目前的外觀,而且貼圖會縮小:213 MB 變成 105 MB,手機上 37 MB。
  • 戰鬥中途切換外觀時,已打掉的部件仍然保持被打掉。
  • Edit 底下的 Magic Brush 可以重繪部分貼圖(每次預覽 5 點數)。這款遊戲沒有用到。
貼圖風格:Mecha Pop、classic、Wood,或上傳你自己的風格圖片。
貼圖風格:Mecha Pop、classic、Wood,或上傳你自己的風格圖片。
同一場戰鬥,換成 Mecha Pop。
同一場戰鬥,換成 Mecha Pop。
告訴你的 agent
替每件素材從 Tripo 的預設風格中選一個第二種風格。只載入正在使用的外觀,外觀切換時要讓已打掉的部件維持被打掉。

Text to Motion

動作庫裡沒有的動作

閃避翻滾不在動作庫裡,所以用一句話寫進 Text to Motion。

每個生成動作的點數
20
個字元會成為動畫名稱
64
Multi-stage 最多串的動作數
5
  • 描述的開頭要先寫動作名稱和冒號:「roll: a small character dives forward into a quick shoulder roll…」。
  • Studio 給這張卡片自己取了標題 Shoulder Roll and Crouch。在 GLB 裡,動畫片段是用描述的前 64 個字元命名的,所以名稱要放最前面。
  • 生成的動作會以卡片形式保留;再次套用,例如重新貼圖之後,不用花點數。
  • Multi-stage Motion 最多可把五個動作串成一段。這裡沒有測試,可考慮用在連段上。
翻滾,一行就描述完。花 20 點數。
翻滾,一行就描述完。花 20 點數。
告訴你的 agent
動作庫裡沒有的動作,就寫一行 Text to Motion,開頭是動作名稱加冒號。

跑動與瞄準

腿往一個方向跑,槍指向另一個方向

在雙搖桿射擊遊戲裡,你往一個方向跑,卻朝另一個方向射擊。agent 把身體拆開:腿跟著跑動方向,上半身轉向瞄準。

腿偏離跑動方向
25° → 7°
腳底打滑,m/s
2.5 → 0.72
手臂穿進身體,mm
33.7 → 4.0
  • 上半身透過三根脊椎骨骼扭向瞄準點。
  • 邊跑邊瞄後方時,跑步動畫倒著播放;往側邊跑時會扭轉臀部。
  • run 以 1.57× 的速度播放,以對上 3.82 m/s;它的臀部在動畫中往前 0.94 m,已重新置中。
  • agent 逐格量出手臂陷進身體的深度。
往一個方向跑,朝另一個方向射擊。
往一個方向跑,朝另一個方向射擊。
告訴你的 agent
把角色拆開:腿播放朝向移動方向的跑步動畫,脊椎讓上半身轉向瞄準方向。並量測腳底打滑和手臂穿模。

命中回饋

回饋和音效,全由程式碼完成

灰色方塊只要一點點就有被打中的感覺;貼圖模型需要多得多。火花、命中標記和所有音效都是用程式碼加的,沒有任何音訊檔案。

打中獵犬時的畫面變化,0–255
4.6 → 13.6
打中 Boss 時
9.9 → 22.4
個音訊檔案
0
  • 命中處有閃光和火花;被打中的部件會晃動,並短暫發出橘光;螢幕上出現十字標記,擊殺或打掉部件時會更大、變紅;Boss 血條會跳動。
  • 所有音效都是用程式碼合成的:金屬鏗鏘聲、打中核心時較高的音、打中獵犬的悶響、被擋下的射擊、槍聲和爆炸。「音效」按鈕可以全部關掉。
  • agent 量測命中點周圍前後的像素變化,而不是憑感覺猜。
命中回饋:火花、命中標記、被打中的部件晃動。
命中回饋:火花、命中標記、被打中的部件晃動。
告訴你的 agent
量測命中點周圍的畫面變化多大,再加上火花、命中標記和用程式合成的音效。換上模型後,要重新調整所有回饋。

這次踩到的坑

哪裡出了問題、為什麼,以及怎麼修好的。新版 Playbook 提示詞已經涵蓋其中大部分。

在 Tripo Studio 裡輸入的部件名稱,在 GLB 裡不見了

改過名的部件匯出時仍然叫 tripo_part_N。請改為記下每個部件所在的位置,讓 agent 依位置用程式碼為各塊歸組。

Segment 切出的塊數遠多於你列出的

Balanced 把模型切成 106–111 塊,手動合併只減少了約十分之一。其餘由 agent 用程式碼歸組,所以大致合併一下就夠了。

已綁定骨架的角色重新貼圖後,動畫不見了

為已綁定骨架的模型重新貼圖會丟掉動畫,匯出的檔案只剩骨骼。匯出前先在 Animate 重新套用;這不花點數。

貼圖後的模型看起來發白

灰盒時用來標示狀態的顏色,會蓋滿整個貼圖模型。把狀態顏色限制在小範圍,並調亮貼圖,而不是疊上白色。

打掉的部件看起來是空心的

切開的零件是薄殼。把縫隙補上、兩面都畫,或在後面放點深色的東西;agent 把內側的面調暗了。

bot 全勝,新手卻一開局就死

bot 從第一個畫面就在移動、閃避。也要測試站著不動、或只有一半注意力的玩家,並為他們調整第一波。

做你自己的遊戲

把這段貼進你的 coding agent

在 Claude Code 或 Codex 開啟一個空資料夾,把提示詞貼進去。它會先問 5 個問題,再一個階段一個階段做下去,每個階段結束都會停下來讓你試玩。

提示詞
Help me make a small 3D browser game, step by step. I have never made a game before.

Before you write any code, ask me up to 5 short questions in one message: what the game is about, the one thing the player does, keyboard or phone or both, the art style, and anything I already have. Wait for my answers.

Once I have answered, start a git repository, save this whole prompt word for word to AGENTS.md, and add a CLAUDE.md that only says to read AGENTS.md. Keep a short PROGRESS.md: what is done, what we decided and what is next. Read both at the start of every stage, and commit at the end of every stage that works, so we can go back if a later change breaks something; each time, tell me the one command that takes us back to it.

Then work in stages. Stop at the end of every stage, tell me how to try it, and wait for my feedback:

1. Design — write GDD.md, one page: core loop, controls (keyboard and touch), win and lose, camera, and a table of every object on screen with an id, its size in metres and which way it faces. Keep it to one level and one core loop. Make up your own characters, names and level layout; do not copy any existing game, and do not make anything look like a well-known game character or item either. For every character that animates, list its states (for example idle, run, attack, hurt, knocked down) and when it switches between them, and say whether it is a person or another kind of body (an animal, a robot dog, a bug); only people get bones, so a body that is not a person is built from parts that move in code. If characters fight, write for each attack: which animation it uses, how much damage it does, and at what fraction of the animation the hit lands and ends. If a machine or object has parts that move, can be shot off or break apart, list its parts: what each part does, where it hinges, how much it can take, and what changes when it breaks. If parts can be swapped between machines or characters, give all of them the same set of slots, and for each slot write one attach point (where it sits, measured from the centre of the feet) and which way a part faces on that point.

2. Greybox — build it with Three.js and Vite, no game engine. Use only boxes, cylinders and capsules, sized from the table. Keep everything about how objects look in one place: a registry from id to a builder function, so a 3D model can replace any placeholder later without touching gameplay code. Build an object with parts as a group of named child placeholders, one per part, each turning around its own hinge, and let gameplay find parts by name. If parts can be swapped, hang each swappable part on a named attach point; swapping a part means hanging another part on that point and scaling it to fit the slot, and gameplay still finds parts by name. Every placeholder faces +Z. If the player jumps, make it feel good: a jump pressed just before landing still counts, a jump just after walking off a ledge still works, and holding the button jumps higher. If the player fights, make it feel good: a button pressed during an attack queues the next one, a hit freezes both fighters for a split second and pushes the target back, a character that was just hit cannot be hit again at once, and enemies take turns attacking instead of all at once. Show states on the placeholders (a colour or a lean) so I can see them. Put every number I might want to tune (speeds, sizes, camera, timings) in one config file, and add a hidden debug panel, opened with a key, with sliders for those numbers and readouts of FPS, draw calls, bounding boxes and each character's current state. Moving characters must look smooth on both 60 Hz and 120 Hz screens. Done when I can play a full round and restart, on desktop and on a phone. If a later change adds a new state, add it to GDD.md and tell me which animation it needs.

3. Asset list — write assets.json with one entry per id: its kind (prop, person or parts), size in metres (height for people, longest edge for everything else), a polygon budget in triangles (at least 500; at least 10000 for parts), and one English image prompt. Give every prompt the same art-style sentence, describe the shape and proportions it must have to fit its size, give visible details to the side the camera sees most (for a vehicle the player follows, its back) while still asking for one view of one object, and end it with "single isolated object, centered, on a plain white background". The ground, sky and edge of the level are part of the look too: say how each will be made (a Tripo entry or built in code), so none of them stays greybox. At most 8 entries; if several enemies share a shape, they share one entry, and one that differs only in colour gets a texture prompt on that entry instead of a new entry. A texture prompt repaints the whole model, so describe the whole object with every colour, not "the same but red"; a prop in one plain colour is tinted in code instead.

   - A person that animates must stand in a T-pose, facing the camera, with its head no more than a third of its height, arms long enough to reach mid-thigh, a body no wider than its shoulders, space between the arms, legs and body, and nothing loose that would flap or stick out (scarves, long hair, bandana tails, capes). Give it a list of animations taken only from these names in the Tripo library: idle, walk, run, jump, jump_down, fall, box_01, box_02, box_03, front_kick_01, slash, shoot, hit_to_body_01, hit_to_head, defeat_02, cheer. The name is only a label, so pick by what the motion is: jump has a long crouch before take-off, jump_down is a drop through the air, fall is tripping over onto the ground, defeat_02 is being knocked down, and the attacks are much slower than a game needs.

      If no name fits, write a one-line description of the motion instead, starting with its name and a colon (for example "dodge: a small character rolls forward and gets back up"); this works for people only, and it is reliable for motions on the ground; a motion in mid-air often comes out standing. Anything that only spins, bobs, squashes or flashes is animated in code, not in Tripo. A person who stays seated (a driver, a rider) keeps its legs and hips posed in code and uses animations for the upper body only; Text to Motion does not make good seated poses.

   - An object with parts (a machine, an animal or robot animal, anything that breaks apart) is one model that Tripo will split. List its parts in plain words (for example "left_cannon", "armour_plate", "front_left_leg"), at most 10, and if parts can be swapped, say which slot each part fits. Write the image prompt so that any central body is clearly its own piece, and every part in one main colour of its own, with a gap between parts. Parts that walk or swing are moved in code at their hinges, not rigged.

   - Mark at most two entries as hero: the player's character or vehicle and the main enemy, the ones the camera stays close to. A hero's image prompt keeps its name, colours and art-style sentence and adds what it is made of (painted metal, knitted wool, rubber), small details (rivets, stitching, buckles), decals or wear, and detail on the side the camera sees most, described as part of one front view of a single figure; never ask for a back view or several views. A hero gets 10000 triangles for a person and 15000–20000 for a model with parts; keep a hero's parts list to 6 or fewer, because Tripo merges neighbouring parts and cannot reduce small pieces much.

   - If I want more looks for the game (for example a skin switch, or an elite enemy), give the entry up to 4 styles, each one of classic, Wood (dark old wood), another style Tripo Studio lists under Create Your Own Texture Style, or "own image: [a close-up swatch of the material: colours and surface, no creature or object]" if I will make my own style picture and upload it; or "none". Pick only styles that suit the art style, and tell me what each will look like. Each style costs one more texture generation in Tripo.

   Add up the triangles and texture memory for the busiest moment on screen and say whether a phone can handle it. A Tripo model that is not a hero has colour textures only: one at the chosen resolution, or one per piece for a split model, smaller for small pieces. A hero has three 4K textures (colour, normal and metal-rough), shared by all its pieces. Count a split model that is not a hero at 1.5 times its budget, because filling its gaps adds triangles.

4. Models — first ask me whether the Tripo MCP (https://studio.tripo3d.ai/mcp?from=vgh-prompt-agent) is connected in this session. If it is, make these entries yourself through it: every prop, every object with parts, and every hero or person that does not animate. Generate each one from its prompt and keep it within its polygon budget; for a hero, use the high-detail model and then reduce it to the budget. Before the first job, tell me roughly how many credits the list will cost and wait for my yes. Run one job at a time and wait until it finishes; a high-detail job can take ten minutes. Export GLB, save each file straight from the link the MCP returns (do not retype the link) into public/assets with the entry's file name, and check that it loads. If the MCP is not connected, or an entry fails twice, leave that entry to me.

   My turn — give me one table with a row per entry you did not make (people that animate always come to me, because the MCP cannot export their animations yet): id, kind, hero or not, prompt, polygon budget, file name, animations or parts, and styles or texture prompt (or "none"). Then tell me to make them in Tripo Studio (https://studio.tripo3d.ai/workspace/generate?from=vgh-prompt-agent) by following these steps, which cover every kind of entry, heroes, styles, colour versions and export: https://github.com/TripoGrowthLab/vibe-gaming-interactive-playbook/blob/main/prompt/tripo-studio-steps.md . Wait until I say they are in.

5. Swap — load each GLB in place of its placeholder (models made through the MCP are compressed with meshopt, so load them with the MeshoptDecoder): scale it to the size in the list (people by height), sit it on the ground, and add an environment map so materials are not black. Keep every map a model comes with (colour, normal, metal-rough) and its metal and roughness values; only a model with a colour map alone gets roughness 1 and metalness 0. Render every model next to its placeholder and check it faces the same way; rotate it if it does not. Do this again whenever a model is replaced: a new version can face another way and has new UVs, so its style and colour files must be made again from it. First list what is really inside each file: animation names (Tripo often renames them: defeat_02 can come out as defeat_03, and a Text to Motion clip is named after the start of its description) and, for split models, every piece with its name, size and position. Match animations by the closest name. Match pieces by name first; a piece still called tripo_part_N belongs to a part only if its centre sits inside that part's placeholder, and to the body otherwise, so group them in code; print the pieces of each part and check them on a render before you move any hinge. The sizes stored in the file are not reliable, so recompute each bounding box before you measure anything. The order of meshes changes from file to file, so always match pieces by node name. Tell me what you matched and what is missing. Every piece keeps the whole model's origin: move each part's pivot to its hinge before you turn it, and since a few pieces may still have small holes, make sure nothing looks see-through when a part comes off (close it, show both sides, or put something dark behind it). Merge the pieces of each part into one mesh when they share one material (a hero with parts comes that way) or when draw calls hurt on a phone. If parts can be swapped between machines, line up where each part joins with its slot's attach point and scale it to fit the slot. When a swapped part has a different height, such as another machine's legs, seat everything above it on the new part's real height and hinges, not the old part's or the placeholder's, so nothing floats or sinks. If an entry has style versions, they have the same shape, but Tripo can change their UVs: compare each style's UVs with the default file's, and where they differ, use that style file's own mesh with its textures, cut into the same parts or bound to the same skeleton. List which maps each style file has; a style may come without a metal-rough map. Look at each version and tell me if one does not match its prompt, and add a button that switches skins, loading each style only the first time it is chosen. Never pair the shape data of one file with another file. Put a close-up of each model in the game next to how it looks in Tripo Studio; if colours look washed out or flat, fix the lighting (one main light that casts shadows, less flat ambient light, the right colour space), not the textures.

   Look at the frames of every animation before you use it: pick the part you need, find the moment a punch or kick really lands, and check arms and feet do not go through the body or clothes. Tripo animations are the same for every body shape, so on a character with a big head, a round belly or thick clothes the arms often sink into the hips or chest when they hang down and pass through the head when they go up. Measure this in code instead of judging it from small frames: in every frame of every animation, work out where the arm vertices really are and test whether they are inside the rest of the body (a winding-number test stays right on clothes and open meshes), using the T-pose as zero. Also look at close-ups from the front and from a 3/4 angle, including the armpits. If an arm goes in, fix it in code: after each animation frame, turn the upper arm outward at the shoulder just enough to clear the body (hips, belly, chest and head); ignore a few millimetres of sleeve resting on clothes, and never change a pose where the hands are meant to touch the body (pockets, hips). Tell me the worst depth for every animation before and after the fix.

   Play character animations by name with an AnimationMixer, blending between states, and keep the character in place so only gameplay code moves it: "stay in place" can still leave the body ahead of or behind its feet, so check the hips over the whole clip and centre them. Match walk and run playback speed to how fast the character really moves so the feet do not slide. If a character must do two things at once (run and shoot), play the legs from one animation and the upper body from another: the legs always face where it runs, the upper body twists toward the aim, and it backpedals when aiming behind. When one model is used by several characters at once, clone it with SkeletonUtils so each has its own skeleton. Check where characters stop and touch things using the models' real sizes, not the placeholders', colliding with simple shapes that follow each model's visible surface (a capsule for every character; for a rounded top, step it down and keep it inside the visible edge, so no one stands in the air) and never with a model's mesh itself; fit the shapes to the models, never stretch a model unevenly to fit an old shape, and measure every frame of a crash or knockdown so no character ends up inside what it hit. On a phone held upright, measure over a full round how much of the screen height the player takes up and how much of the screen is empty sky or background, and tell me the smallest and largest of each. Keep a button that switches between greybox and models. The colour tints and white hit flashes that showed states on the placeholders wash out painted models, so on models glow only the part that matters and brighten its own colours instead of adding white; then check that a landed hit is still easy to see and hear (a flash or sparks at the spot, a jolt of the part, a sound). Effects that shake a part must not move the point used for hit detection. Do not change gameplay code, not even to fix a bug; if timings, sizes or triggers need new numbers, tell me what and why, and wait for my yes. Tell me which files, animations or pieces did not load and why.

6. Publish — as a build step, shrink every GLB with glTF Transform (meshopt geometry, WebP textures no larger than they ever appear on screen) and load them with the matching decoders, leaving the files in public/assets as they are. Play a full round on the small files to check that every animation, piece and style still works. Compression changes a rigged model's bind matrices, so play every animation on both the small and the original files and compare how high the feet sit above the ground; anything measured from the bind pose (such as skeleton.pose()) should use the bones' own starting positions instead. Then tell me the total download size and how long the first screen takes to appear on a phone. Then help me put it on a free static host and give me the link. Ask me before you create any account, repository or public page.

Test your own work before you hand it to me: run the build, open the game, check the console for errors, and tell me exactly what you checked. If the game has fights or levels, write a small bot that plays a full round and report what it hit and whether it won, and a second one that plays badly (holds forward into walls and obstacles) to check nothing gets stuck. Wait for every test to finish before you reply; never start a test with & or in the background. Use only a browser that is already installed on this machine; never download one. If you cannot test something, tell me what to try myself. If something does not work, say so.
在 GitHub 上查看
Mecha Pop · 一個按鈕

為你自己的遊戲做模型

描述一個角色或丟一張圖片進去,Tripo Studio 就會給你可以直接放進遊戲的模型;需要動的話,也會綁好骨架、套好動畫。新帳號有免費點數。

免費做出你的第一個模型 ↗
或跟著六個階段的教學做 →