← PlaybookGame hoàn chỉnh · beat 'em up · khó

LANTERN ALLEY

Volt dọn sạch một con hẻm kiểu truyện tranh: bốn đợt côn đồ, rồi đến boss Big Anvil. Combo ba đòn, đá, đòn tấn công khi chạy. Do Claude Code làm bằng prompt Playbook; chúng tôi chỉ nói “go” hoặc mô tả những gì mình thấy.

Chơi ngay

Đấm J, đá K, di chuyển WASD, chạy Shift.

Game mở ra ở dạng khối xám. Nhấn nút màu vàng bên dưới game, hoặc phím V trong game, để tải các nhân vật Tripo; sau đó việc chuyển đổi diễn ra tức thì theo cả hai chiều.

Cùng một trận đánh, trước và sau khi có Tripo

Mọi cơ chế đều chơi được và đã được kiểm thử bằng các viên nang từ trước. Các mô hình được đưa vào ở giai đoạn 5 mà không phải đụng đến code gameplay.

Khối xám · giai đoạn 2

Khối xám · giai đoạn 2

Những viên nang đổi màu theo trạng thái: hồng khi bị đánh trúng, một vòng đỏ quanh kẻ địch duy nhất được phép tấn công.

Nhân vật Tripo · giai đoạn 5

Nhân vật Tripo · giai đoạn 5

Sáu võ sĩ đã rig với animation từ thư viện chuyển động. Viền đen và kiểu đổ bóng phẳng được thêm bằng code.

Trong Tripo Studio · giai đoạn 4

Trong Tripo Studio · giai đoạn 4

Volt sau khi Auto Rig, với các đòn đấm và đá áp dụng từ thư viện chuyển động. Không dùng phần mềm 3D nào.

Lượt chạy diễn ra thế nào, theo từng giai đoạn

23 lượt trao đổi, khoảng 3 giờ 20 phút thời gian chạy agent, $45 chi phí agent và 1.190 credit Tripo. Chúng tôi chưa từng chỉ cho agent cách sửa bất cứ điều gì.

  1. Agent hỏi năm câu, viết bản thiết kế một trang kèm bảng đòn tấn công, rồi dựng toàn bộ trận đánh bằng viên nang trong Three.js, cùng một bot chơi bằng đúng những phím đó.

    • Mỗi đòn tấn công đều ghi rõ animation, sát thương và tỷ lệ thời điểm trúng đòn
    • Bot thắng 5 trên 5 ván; bản khối xám xong trong 11 phút với $2
    • Chúng tôi nói “đứng yên là mất 70 HP trong 30 giây”; nó đo trước, rồi mới làm chậm các đợt đầu
    Thiết kế, rồi bản khối xám
  2. Chúng tôi làm theo danh sách các bước mà agent đã viết: ảnh, Smart Mesh P2.0, texture, rồi Auto Rig và animation từ thư viện chuyển động cho bốn võ sĩ.

    • 890 credit, khoảng 37 phút
    • 4 nhân vật đã rig với 29 animation, 4 đạo cụ
    Tám asset trong Tripo
  3. Chúng tôi chỉ nói “các tệp đã có rồi”. Agent phát hiện animation bị đổi tên, một cú đá quay sang ngang và các đòn tấn công chậm hơn bản khối xám 4–6×. Nó đo khung hình mà mỗi cú đấm trúng đích và hỏi trước khi đổi bất kỳ con số nào.

    • Một trang thử nghiệm render từng mô hình cạnh khối giữ chỗ của nó
    • Khung thời gian trúng đòn được căn lại từ các khung hình thật; bot thắng 3 trên 3 khi dùng mô hình
    Đưa mô hình vào: ba cái bẫy ẩn
  4. Côn đồ bị hạ gục biến thành những cái bóng đen, bước đi bị giật trên laptop 120 Hz, và các combo không có cảm giác như combo. Chúng tôi mô tả từng lỗi; agent tìm ra nguyên nhân và sửa xong trong một lượt.

    • Số combo đủ mỗi trận: 1 → 9
    • Hai võ sĩ mới làm trong Tripo từ các prompt do agent viết: thêm 300 credit
    • Kết quả: 6 nhân vật đã rig, bot 6/6, 46 bài kiểm tra; bản dựng tĩnh 19 MB trên tripo.page
    Chơi thử, rồi xuất bản

Ngoài sáu giai đoạn

Ví dụ trong hướng dẫn sáu giai đoạn chỉ rig một vận động viên trượt tuyết với ba chuyển động. Sáu võ sĩ cần nhiều thứ mà hướng dẫn đó không đề cập: rig cả một dàn nhân vật, thư viện chuyển động, xuất kèm animation, đòn đánh khớp theo khung hình, cel shading và ngân sách texture. Chọn một chủ đề.

Rig cả dàn nhân vật

Sáu võ sĩ, một bộ xương

Mọi võ sĩ đều qua cùng một quy trình rig: Humanoid, preset Mixamo, Auto Rig. Vì các bộ xương khớp nhau, võ sĩ nào cũng có thể dùng chuyển động của võ sĩ khác.

credit để rig một võ sĩ
20
xương trong mỗi tệp
65
võ sĩ, một cấu trúc bộ xương
6 → 1
  • Hãy chọn ảnh ứng viên với việc rig trong đầu: hai tay dang ngang, bàn tay mở, có khoảng hở rõ giữa hai chân.
  • Tỷ lệ dễ rig: đầu không quá một phần ba chiều cao, tay dài tới giữa đùi, thân không rộng hơn vai, có khoảng trống giữa tay chân và thân.
  • Bất cứ thứ gì treo lủng lẳng khỏi cơ thể đều vẫn cứng. Cái đuôi bandana của Sprat đẩy mọi clip lệch 30 cm khỏi tâm, nên agent căn mỗi võ sĩ vào giữa theo phần hông.
  • Boss chỉ là một hình người to hơn. Kiểu rig Other không được thử cho game này, nên không có gì phụ thuộc vào nó.
  • Trước khi có chuyển động mới, các võ sĩ mượn clip của nhau: Sprat dùng cú đá cao của Volt, boss dùng cú đập từ trên xuống của Slab.
  • Hai võ sĩ thêm sau đó tốn 150 credit mỗi người: mô hình 100, texture 30, rig 20.
Bảng rig: Humanoid với preset Mixamo. Auto Rig tốn 20 credit và mất khoảng 30 giây.
Bảng rig: Humanoid với preset Mixamo. Auto Rig tốn 20 credit và mất khoảng 30 giây.
Hai trong bốn ảnh ứng viên của Sprat. “Bandana tied over the head” khiến ảnh nào cũng có một cái đuôi cứng đơ.
Hai trong bốn ảnh ứng viên của Sprat. “Bandana tied over the head” khiến ảnh nào cũng có một cái đuôi cứng đơ.
Nói với agent của bạn
Tất cả võ sĩ dùng chung một rig hình người, nên clip nào cũng chạy được trên bất kỳ ai. Hãy liệt kê võ sĩ nào cần chuyển động nào, và những chuyển động nào có thể mượn.

Thư viện chuyển động

Chọn chuyển động theo việc nó làm, không theo tên

Thư viện chuyển động của Tripo có đấm bốc, đá, phản ứng khi bị đánh và ngã gục. Tên gọi chỉ là nhãn, vì vậy hãy xem từng chuyển động trước khi áp dụng.

credit để áp dụng và xuất các chuyển động
0
clip trên bốn võ sĩ
29
cho một clip “slash”
6.58 s
  • Thư viện cho chọn nhiều chuyển động. Một vòng tròn ở góc thẻ nghĩa là chuyển động đã được áp dụng cho mô hình này; mỗi lần nhấp sẽ retarget trong vài giây.
  • Ô tìm kiếm chỉ tìm trong nhóm hiện tại. Hãy chuyển sang All trước: từ Recently Used, các chuyển động mới sẽ không bao giờ xuất hiện.
  • Recently Used dùng chung cho cả tài khoản và không nói gì về mô hình hiện tại. Chỉ hộp thoại xuất mới liệt kê những gì đã được áp dụng.
  • Chuyển động trong thư viện dài hơn nhiều so với nhu cầu của game: idle 15,33 s, cheer 12,08 s, slash 6,58 s. Game chỉ phát từng đoạn của chúng, với tốc độ nhanh hơn.
  • Thêm chuyển động cho một võ sĩ đã rig về sau là miễn phí. run được thêm trong một lượt và xuất lại dưới cùng tên.
“defeat”, lấy mẫu từ 0 đến 0,85 của clip: nhân vật chỉ lảo đảo và không bao giờ ngã.
“defeat”, lấy mẫu từ 0 đến 0,85 của clip: nhân vật chỉ lảo đảo và không bao giờ ngã.
“defeat_02” là clip kết thúc khi đã nằm trên mặt đất.
“defeat_02” là clip kết thúc khi đã nằm trên mặt đất.
Nói với agent của bạn
Với mỗi chuyển động trong danh sách, hãy mô tả nó phải trông như thế nào và có thể kéo dài khoảng bao lâu, để tôi xem bản xem trước trong thư viện trước khi áp dụng.

Xuất kèm animation

Xuất võ sĩ kèm các chuyển động của họ

Một võ sĩ đã rig chỉ mang theo chuyển động của mình nếu bạn đổi ba thiết lập trong hộp thoại xuất. Các giá trị mặc định bỏ chúng đi.

chuyển động được xuất theo mặc định
0
kích thước texture trong hộp thoại
8K → 2K
hông của clip run nằm lệch về phía trước
0.55 m
  • Number of Animations bắt đầu từ 0. Hãy mở nó ra, chọn Select All, rồi bỏ chọn những chuyển động bạn không dùng.
  • “Animation stay in Place” chỉ xuất hiện khi đã chọn chuyển động. Hãy bật nó, nếu không đi bộ và chạy sẽ kéo cơ thể rời khỏi collider của nó.
  • Stay in place bỏ phần di chuyển chứ không bỏ độ lệch: trong run, hông lệch về phía trước 0,55 m suốt cả clip. Agent đã đo nó và căn lại theo hông.
  • Texture Resolution mặc định là 8K ở lần xuất đầu tiên. Sau khi đổi một lần sang 2K, hộp thoại đã nhớ lựa chọn đó.
  • Nút Export đôi khi không làm gì ở lần nhấp đầu tiên và hộp thoại vẫn mở. Hãy nhấp lại.
Export: GLB, texture 2K, bật bộ xương, chọn mọi chuyển động, bật giữ nguyên tại chỗ.
Export: GLB, texture 2K, bật bộ xương, chọn mọi chuyển động, bật giữ nguyên tại chỗ.
Thêm run về sau: áp dụng trong thư viện, rồi xuất lại dưới cùng tên.
Thêm run về sau: áp dụng trong thư viện, rồi xuất lại dưới cùng tên.
Nói với agent của bạn
Với mỗi GLB, hãy liệt kê các clip bên trong kèm độ dài, và kiểm tra xem hông có lệch khỏi gốc tọa độ trong từng clip không.

Thời điểm trúng đòn

Một cú đánh trúng ở một khung hình, không phải lúc bấm phím

Agent dựng một trang thử nghiệm phát từng clip trên mô hình cạnh viên nang xám của nó, rồi đọc xương bàn tay và bàn chân từng khung hình.

lệch khỏi phía trước: cú đá trước thực ra là đá ngang
81–88°
đầu dịch chuyển khi trúng một cú đấm thẳng
13 → 30 cm
trộn vào animation bị đánh trúng
0.04 s
  • Mỗi đòn tấn công giữ thời điểm trúng ở cùng một tỷ lệ của clip; thay đổi là tốc độ phát, không phải bảng thời gian.
  • front_kick_01 hóa ra là một cú đá ngang. Chỉ clip đó bị xoay −85°.
  • Đi bộ và chạy được phát với đúng tốc độ võ sĩ thực sự di chuyển, để chân không bị trượt.
  • Animation bị đánh trúng mở đầu bằng một tư thế bình thản. Bắt đầu chúng đúng lúc va chạm, trộn trong 0,04 s, khiến một cú đấm thẳng làm đầu dịch 30 cm thay vì 13.
  • Các viên nang xám dùng cùng độ dài clip, nên cả hai diện mạo đều đánh theo cùng một cách.
box_02, lấy mẫu từ 0 đến 0,85 của clip. Nắm đấm chỉ trúng ở cuối.
box_02, lấy mẫu từ 0 đến 0,85 của clip. Nắm đấm chỉ trúng ở cuối.
Sau khi căn lại thời gian, cú đá và cú trúng đòn xảy ra cùng lúc.
Sau khi căn lại thời gian, cú đá và cú trúng đòn xảy ra cùng lúc.
Nói với agent của bạn
Hãy dựng một trang thử nghiệm phát mọi clip trên mô hình cạnh khối giữ chỗ của nó. Đọc xương bàn tay và bàn chân từng khung hình rồi cho tôi biết mỗi đòn tấn công thật sự trúng vào lúc nào.

Cel shading

Viền và đổ bóng toon nằm trong code

Phong cách truyện tranh không được vẽ vào texture. Tripo tạo ra màu phẳng; game thêm viền đen và ánh sáng có cạnh cứng.

tam giác sau khi vẽ viền
52k → 105k
bóng nướng sẵn vào texture
0
  • Prompt của mọi asset dùng chung một dòng style: màu phẳng, không chuyển sắc, ánh sáng đều, không có bóng nướng sẵn.
  • Một đường viền vẽ sẵn vào texture sẽ bị nhòe khi texture thu nhỏ, và nó không thể bám theo hình bóng khi võ sĩ xoay người.
  • Đường viền là một bản sao màu đen, lớn hơn một chút, của mỗi cơ thể, được vẽ lộn trong ra ngoài. Nó nhân đôi số tam giác, nên ngân sách phải tính cả nó.
  • Đổ bóng toon thay vật liệu có ánh sáng bằng vài dải sáng cứng.
  • Ban đầu mọi khối giữ chỗ màu xám dùng chung một vật liệu viền, nên làm mờ một kẻ địch là làm mờ mọi đường viền. Agent đã cho mỗi cái một vật liệu riêng.
Các ứng viên nhân vật chủ lực từ một prompt: màu phẳng, ánh sáng đều, không có bóng nướng sẵn.
Các ứng viên nhân vật chủ lực từ một prompt: màu phẳng, ánh sáng đều, không có bóng nướng sẵn.
Trong game: viền và đổ bóng toon đến từ code.
Trong game: viền và đổ bóng toon đến từ code.
Nói với agent của bạn
Giữ viền và cel shading trong code. Hãy yêu cầu Tripo màu phẳng, ánh sáng đều và không có bóng nướng sẵn, rồi tính cả đường viền vào ngân sách tam giác.

Bộ nhớ texture

Ngân sách là texture, không phải tam giác

Trước khi tạo bất cứ thứ gì, agent đã đếm bộ nhớ ở thời điểm đông nhất của trận đánh. Số tam giác ổn; texture thì không.

bộ nhớ texture, mọi map → điện thoại
470 → 22 MB
credit cho mỗi texture, 8K → 2K
30 → 10
toàn bộ bản dựng đã xuất bản
19 MB
  • Ở thời điểm đông nhất, đợt 3, các mô hình cộng lại thành 52k tam giác, trong khi riêng bảy bản đồ màu 2K đã chiếm khoảng 157 MB.
  • Nếu có thêm cả normal map và roughness map, con số sẽ là khoảng 470 MB.
  • Khi tải, game thu nhỏ texture: 1024 cho võ sĩ, 512 cho đạo cụ, tổng cộng khoảng 22 MB.
  • Thêm hai võ sĩ nâng con số lên 34 MB; agent báo tổng mới ngay khi viết prompt cho họ.
  • Bảng texture mặc định là 8K với 30 credit; 2K chỉ tốn 10. Game này đã trả giá 8K cho những texture rồi thu nhỏ xuống 1024.
Được agent đếm trước khi tạo, và đếm lại sau khi thêm hai võ sĩ.
Được agent đếm trước khi tạo, và đếm lại sau khi thêm hai võ sĩ.
Năm võ sĩ trên màn hình sau bản cập nhật.
Năm võ sĩ trên màn hình sau bản cập nhật.
Nói với agent của bạn
Trước khi tạo, hãy đếm tam giác và bộ nhớ texture ở thời điểm đông nhất, và cho tôi biết bạn sẽ thu nhỏ gì trên điện thoại.

Những lỗi gặp trong lần chạy này

Điều gì đã hỏng, vì sao, và cách sửa. Prompt Playbook mới hơn đã xử lý được phần lớn.

Danh sách animation nêu những clip không có trong tệp

Thư viện hiển thị hit_to_body, nhưng tệp lại có hit_to_body_01; defeat xuất ra thành defeat_02 hoặc defeat_03. Hãy để agent liệt kê tên clip thật bên trong từng GLB trước khi ghép, và ghép theo tên gần nhất.

Đòn đấm trông đúng nhưng không bao giờ trúng

Các đòn tấn công từ thư viện chuyển động chậm hơn thời gian của bản khối xám 4–6×, và một cú slash dài 6,6 s không bao giờ chạm tới khung thời gian trúng đòn của nó. Agent đọc xương bàn tay và bàn chân từng khung hình, tìm ra lúc mỗi đòn thật sự trúng, và căn lại các cú trúng đòn ở cùng tỷ lệ.

Kẻ địch bị hạ gục biến thành những hình đen

Đường viền truyện tranh là một bản sao màu đen, lớn hơn một chút, của cơ thể. Khi cơ thể mờ dần, nó không còn che được bản sao đó. Tắt đường viền trong lúc mờ dần đã sửa được lỗi.

Bước đi bị giật trên màn hình 120 Hz

Logic game chạy theo các bước cố định 60 Hz và renderer vẽ bước cuối cùng, nên ở 120 Hz cứ cách một khung hình lại đứng yên. Vẽ xen giữa hai bước đã sửa được. Bot không thể thấy lỗi này; prompt giờ yêu cầu chuyển động mượt ở 60 và 120 Hz.

Kết quả kiểm thử biến mất khi hết một lượt

Khi agent chạy headless, các tác vụ còn để chạy nền sẽ bị dừng khi agent trả lời. Hãy bảo nó chờ mọi bài kiểm tra chạy xong trước khi trả lời.

Bạn xin thêm đòn của kẻ địch nhưng nhận về hành vi mới, không phải animation mới

Agent thích tái sử dụng những gì đang có: đổi màu, mượn clip, mẫu AI mới. Nếu bạn muốn mô hình hoặc animation mới, hãy nói “làm chúng trong Tripo” và nó sẽ viết prompt cho bạn.

Tự làm game của bạn

Dán đoạn này vào agent lập trình

Mở một thư mục trống trong Claude Code hoặc Codex rồi dán vào. Nó hỏi năm câu, sau đó dựng game theo từng giai đoạn và dừng lại sau mỗi giai đoạn để bạn chơi thử.

Prompt
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.
Xem trên GitHub
Trong Tripo Studio · giai đoạn 4

Tạo mô hình cho game của riêng bạn

Mô tả một nhân vật hoặc thả vào một hình ảnh, Tripo Studio sẽ trả cho bạn một mô hình sẵn sàng cho game, đã rig và có animation nếu cần chuyển động. Tài khoản mới được tặng credit miễn phí.

Tạo mô hình đầu tiên miễn phí ↗
Hoặc làm theo hướng dẫn sáu giai đoạn →