Communitygithub.com

evalix098/tiktoklive

生成可用於生產的 2D 遊戲地圖,透過 `imagine_text_to_image` 產生 RPG 俯視圖、橫向卷軸關卡、圖塊地圖、分層點陣圖、道具包、碰撞區域與可行走區域。適用於建構需要真實地圖美術(非純程式繪製的圖塊)、分層道具或地圖碰撞元數據的瀏覽器遊戲。觸發關鍵字包括「map」、「level」、「stage」、「tilemap」、「overworld」、「dungeon」、「side scroller background」、「prop pack」、「2D map」。

tiktoklive 是什麼?

此技能專為需要產生高品質、可直接使用的 2D 遊戲地圖的開發者與 AI 代理程式設計。其核心功能是透過文字生成圖像 (`imagine_text_to_image`) 來建立多種地圖模式,包括圖塊地圖 (tile_mode)、場景地圖 (scene_mode)、橫向卷軸關卡 (side_scroll_mode)、網格地圖 (grid_mode)、模組化房間 (room_chunk_mode) 以及非遊玩用的靜態場景 (baked_scene_mode)。技能強制要求地圖必須是可遊玩的,將基礎美術與可互動物件、碰撞資料分層獨立處理,並提供詳細的參考文件(如 prop-pack-contract.md、side-scroll-stages.md)來指導整個生產管線。它支援多種遊戲引擎目標(如 Phaser、Godot、Unity 的圖塊地圖匯出),但預設為 `raw_canvas` 或 Phaser,特別適合於 TanStack 瀏覽器沙箱環境中使用。最終的交付成果不包括角色、敵人、NPC 或動畫精靈(這些屬於 `generate2dsprite` 技能的範疇),而是專注於地圖圖層、碰撞資料、場景物件元數據,並透過 `extract_prop_pack.py` 和 `compose_layered_preview.py` 等指令稿進行自動化處理與驗證。

相容平台~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/evalix098/tiktoklive/tree/HEAD/.grok/skills/generate2dmap

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Generate2dmap

App-builder / Grok 環境

項目值
技能目錄 / 指令稿.grok/skills/generate2dmap/,以 python3 .grok/skills/generate2dmap/scripts/<script>.py … 執行
圖像工具imagine_text_to_image / imagine_image_to_image(基於路徑;請參閱 imagine);使用 read_file 檢查 PNG 路徑的輸出(非 Codex view_image)
生成圖像路徑imagine_text_to_image → 沙箱 file_path → 複製到 assets/map/;Pillow 已預先安裝
預設 engine_target此 TanStack 瀏覽器沙箱使用 raw_canvas 或 Phaser——僅在使用者明確要求匯出至 Godot/Unity/Tiled 時才使用
相關技能generate2dsprite(角色/特效精靈;道具包仍使用此技能的提取指令稿)、building-games、imagine

先決定管線

建構能滿足遊戲需求的最小可遊玩地圖套件:選擇一個產品級別的 map_mode,然後決定較低層級的軸線(visual_model、runtime_object_model、collision_model、engine_target)。

  • tile_mode——可編輯的圖塊/網格地圖:寶可夢風格路線、俯視 RPG 城鎮、平台遊戲圖塊地圖,或任何已在使用 Tiled/LDtk/Godot/Unity/Phaser 圖塊地圖的專案。
  • scene_mode——基礎底圖加上獨立道具:塔防、倖存者類競技場、溫馨的俯視展示地圖。
  • side_scroll_mode——視差橫向卷軸關卡:洛克人風格、動作平台遊戲、銀河戰士惡魔城房間、跑酷遊戲、格鬥遊戲。
  • grid_mode——規則較重的網格:戰術 RPG、工廠/自動化、棋盤/卡牌對戰、建造網格。
  • room_chunk_mode——模組化房間/區塊:Rogue-like 地下城、銀河戰士惡魔城網路、程序化組合。
  • baked_scene_mode——僅限明確為平面、不可遊玩的場景:標題/選單畫面、戰鬥背景、視覺小說場景、概念藝術。

當使用者提供參數時使用;否則根據現有遊戲、攝影機、碰撞需求、地圖規模和編輯需求推斷最精簡的可遊玩管線。當模式和軸線不一致時,以模式的可遊玩/可編輯合約為準。類型路由、各模式軸線預設值、預設集以及升級啟發式規則均在 references/map-strategies.md 中——當選擇不明顯時請務必閱讀。

可遊玩地圖絕非一張烤好的單一圖像。 對於任何暗示可遊玩地圖、關卡、舞台、房間、原型或引擎場景的請求,交付成果必須將遊戲邏輯幾何和物件以獨立的圖層、道具、圖塊/物件資料、碰撞、區域或引擎原生的場景節點形式公開。烤好的單一圖像可能是背景、參考或預覽成品——但絕非執行時期地圖——除非使用者明確要求僅有平面背景。

僅限場景和地圖。 請勿在此產生角色、敵人、頭目、NPC、玩家、投射物或動畫精靈;這些屬於 $generate2dsprite。地圖攜帶場景鉤子(生成標記、巡邏/遭遇區域、競技場入口、閘門、出口、攝影機觸發器)作為元數據,而非繪製的美術。

美術來自圖像生成,且由您編寫提示詞

  • imagine_text_to_image 是基礎地圖、視差圖層、參考圖、道具表和圖塊美術的預設美術來源。預設 art_style 為 clean_hd(手繪高畫質、形狀清晰銳利、紋理噪音低、無粗大像素);僅在要求時才使用 pixel_inspired 或 retro_pixel。
  • 親自撰寫每個創意提示詞。 指令稿可能負責組合、切割、去背、裁剪、驗證、組成預覽以及產生 JSON/引擎檔案——絕不編寫創意提示詞或繪製最終美術。僅在使用者明確要求佔位符、固定裝置、偵錯地圖或腳手架時才使用程序化/佔位符美術。對於圖塊引擎目標,先產生圖塊美術,然後指令稿僅負責處理圖層、碰撞、區域和場景接線。
  • 每當執行時期創建新的視覺資產時,將每個提示詞儲存在其資產旁邊,命名為 <asset>.prompt.txt(或明確的清單欄位)。
  • 參考交接是一個檔案路徑,而非一句話。 要在先前的圖像基礎上構建,請將其沙箱 file_path 傳遞給 imagine_image_to_image(並使用 read_file 以查看它),然後指名要保留的具體特徵:攝影機取景、地平線、道路/水域形狀、地形邊界、入口/出口、地標。僅有檔名、「基於該地圖」,或僅僅是在對話中看到該圖像並非交接——請停止並傳遞路徑。

將執行時期物件排除在基礎圖層之外

首先生成的基礎/背景/底圖圖像只能包含穩定、不可互動的基礎美術——地面材質、路徑、道路、水域、懸崖、地板圖案、車道標記和建造平台;對於側視圖則包含天空、遠/中景景物、剪影、氛圍;對於圖塊地圖則包含作為可編輯圖層的圖塊美術。它不得包含高大的道具、建築物、樹木、岩石、板條箱、標誌、門、閘門、拾取物、寶箱、檢查點、危險物、陷阱、砲塔、梯子、前景遮擋物、可破壞物、角色、敵人、NPC、UI、標籤,或任何需要碰撞、互動、重複使用、Y軸排序、動畫或自有渲染順序的東西——請重新生成僅有基礎的圖像,或將此類圖像降級為參考成品。

參考模型是檢查點,而非最終交付物

帶有裝飾的參考(俯視圖)和關卡參考(側視圖)用於規劃遊戲世界中的放置:自然的遊戲世界物件或微妙的區塊幾何,最多9個不同的可見物件候選(重複計算一次,然後在放置元數據中重複出現),無註釋圖形(圓圈、箭頭、輪廓、標籤、文字、標註、圖例、測量線),且無非視覺元數據——生成點、觸發器、巡邏提示、攝影機範圍稍後將作為場景鉤子寫入。

產生了一個之後,請不要就此停止。 繼續進行 references/object-production-gate.md:重新使用 read_file 讀取兩個圖像,建構物件清單,產生最終的獨立物件,寫入放置/碰撞/場景鉤子元數據,並組成 QA 預覽。僅輸出參考是未完成的執行,除非使用者明確要求概念圖。

您所選管線的深度——在產出資產前請先開啟這些文件

  • 分層點陣地圖 → references/layered-map-contract.md(圖層類型、基礎和道具提示詞模式、道具元數據、渲染順序、碰撞、QA 檢查清單)。
  • side_scroll_mode → references/side-scroll-stages.md:stage_canvas 決策、僅有名稱的景物視差圖層,以及在進行任何平台/物件工作前必須先建立的遊戲世界中關卡參考。
  • 任何道具或場景物件生成 → 首先對每個物件進行分類,然後遵循 references/prop-pack-contract.md:只有緊湊型道具可以共享一個方形道具包;平台、地板、橋樑、閘門、建築物以及任何與碰撞對齊的物件需要逐一處理,作為平台條、自訂寬包或圖塊/物件圖層。
  • 參數、逐步工作流程以及 extract_prop_pack.py / compose_layered_preview.py 指令 → references/pipeline.md。
  • 每個管線的交付清單和驗證檢查清單 → references/deliverables.md;在認定地圖完成前請務必執行這兩項。

Individual skills in this repo

This repo contains 17 individual skills — each has its own dedicated page.

evalix098/tiktoklive

Add user accounts and sign-in to this TanStack Start app. Use when the app needs authentication, sign-in, user accounts, protected routes, or per-user data. Triggers on "auth", "login", "log in", "sign in", "sign up", "account", "users", "authentication", "protected", "who is logged in", "current user", "per-user".

evalix098/tiktoklive

Build browser games and interactive/canvas/3D experiences in this TanStack Start + React app. Use for any game, simulation, or WebGL/Canvas experience — 2D or 3D, single-player. Covers the game loop & timing, 3D orientation/camera conventions, collision, performance, assets, audio, save, game feel, and per-genre playbooks. For WASD / vehicle / flight **input signs and inverted A/D**, open the **`controls`** skill — do not rely on this file or racing-kart alone. Triggers on "game", "minecraft", "fps", "platformer", "racing", "tetris", "snake", "shooter", "3d", "three.js", "canvas", "voxel", "physics".

evalix098/tiktoklive

Player-facing input signs for browser games: WASD, vehicles, flight, FPS mouse-look, and the #1 failure mode (inverted A/D). Mandatory control self-tests and a tiny test interface so you can verify A turns left before shipping. Load for ANY game with movement, steering, flying, driving, tanks, boats, mechs, drones, planes, karts, third-person follow cams — not only racing. Triggers on "controls", "WASD", "inverted", "steer", "flight", "airplane", "kart", "vehicle", "yaw", "roll", "pitch", "mouse look", "A/D".

evalix098/tiktoklive

Design and build polished, non-generic UI for this TanStack Start + React + Tailwind v4 + shadcn/Radix app. Use whenever you create or restyle any interface surface — pages, landing pages, dashboards, forms, modals, nav, and game overlays (start screens, HUD, menus). Covers design tokens, layout, typography, color, spacing, motion, and the anti-"AI-slop" rules that keep output from looking generic. Triggers on "design", "UI", "make it look good", "polish", "landing page", "theme", "style", "redesign", "ugly", "clean up".

evalix098/tiktoklive

Deep guide for game ANIMATION assets: motion cycles, action keyframes, effect sequences, and animation sprite sheets — built around a video-first pipeline. In this app-builder sandbox, execute via the video2dsprite / generate2dsprite skills (magenta + scripts), not ad-hoc ffmpeg. Use whenever generating anything that moves: walk/run cycles, attacks, idles, FX, flags, fire, animation sheets. Complements game-asset-core.

evalix098/tiktoklive

Core discipline for ANY game-asset generation with Imagine tools: the engine-ready defaults users don't state, spec checklists, style anchoring, read-back verification, honest defect flagging. Use whenever generating any game art (sprites, sheets, animations, tiles, UI, FX) — then ALSO load the matching specialist skill: game-animation-frames for anything that moves, game-tilesets for tiles/terrain, game-character-consistency for recurring characters, game-ui-icons for UI and icons.

evalix098/tiktoklive

Deep guide for CHARACTER IDENTITY across images: turnarounds (front/side/ back), state and damage variants, palette swaps, equipment changes, and same-character-in-context sets. Use whenever generating character turnarounds, character sheets, variants of an existing sprite, or any same-subject multi-image set. Complements game-asset-core.

evalix098/tiktoklive

Deep guide for game TILE assets: seamless tileable textures, terrain transition tilesets, autotiles, and ground/platform tiles. Use whenever generating tileable textures, tilesets, terrain transitions, or seamless patterns. Complements game-asset-core.

evalix098/tiktoklive

Deep guide for game UI assets: buttons with interaction states, panels, bars, wordmark logos, and icon sets. Use whenever generating game UI elements, HUD assets, inventory icons, icon sets, buttons, or title logos. Complements game-asset-core.

evalix098/tiktoklive

Generate and postprocess 2D game sprites and animation sheets: pixel-art characters, NPCs, creatures, spells, projectiles, impacts, props, summons, and transparent PNG/GIF exports. Use when building browser games that need real sprite sheets (not code-drawn placeholders), matching a map art style, or producing magenta-background sheets for chroma-key cleanup. Triggers on "sprite", "sprite sheet", "animation sheet", "pixel art character", "walk cycle", "attack animation", "projectile sprite", "2D game asset".

evalix098/tiktoklive

How to use the Imagine tools in Grok Build: imagine_text_to_image, imagine_image_to_image, imagine_reference_to_image, imagine_text_to_video, imagine_image_to_video, imagine_reference_to_video, and render_file for chat previews. When to build a visual with code instead of generating it, prompt-craft, reference-first handling of real people, factual grounding, and asset-consistency. Load this whenever generating or editing an image or video is on the table. Tool-usage-driven, not triggered by a user merely mentioning images.

evalix098/tiktoklive

Peer-to-peer realtime multiplayer over WebRTC data channels: every user of the deployed app connects directly to every other user (full mesh), the server only brokers the handshake at /api/rtc. Lowest possible latency, zero per-message server cost. Use for 2-8 player co-op/casual realtime: shared cursors, drawing, party games, casual action. Triggers: p2p, peer to peer, webrtc, low latency multiplayer, direct connection.

evalix098/tiktoklive

Use Neon Postgres (the database) in this TanStack Start app. Use when the app needs to store or query data, persist state, or keep per-user data. Triggers on "database", "Postgres", "Neon", "save data", "store data", "persist", "tables", "SQL", "query", "migrations".

evalix098/tiktoklive

Share-link previews and app identity for apps on *.grok.me: the injector-owned og:image card, the SVG favicon, and PWA icons for installable apps. Use when scaffolding, renaming, or restyling the app — and for share / unfurl / OG / Twitter card questions. A custom 1200×630 card from the app's own art is the default — games of every kind (DOM board/word games included), whimsical apps, creative tools, and brand-forward pages; only plain utilities keep the placeholder. Always run the brand-asset pass as a `task` subagent and never wait for it. Triggers on "share", "rename", "app name", "OG", "Open Graph", "twitter card", "unfurl", "og:image", "og:type", "x:game:image", "x-banner", "link preview", "social card", "thumbnail", "preview image", "favicon", "app icon", "PWA", "manifest", "installable", "home screen", "SEO", "meta description".

evalix098/tiktoklive

Official Three.js API and TSL (Three.js Shading Language) reference for LLM code generation. Load when writing or debugging three.js / WebGL / WebGPU / custom materials / shaders / GLTF / advanced three APIs beyond basic game loop/controls. Prefer building-games for game correctness (loop, WASD, camera, orientation); use this skill for full API/TSL depth. Triggers on "three.js", "threejs", "WebGPU", "TSL", "NodeMaterial", "shader", "GLTF", "MeshStandard", "OrbitControls", "WebGLRenderer".

evalix098/tiktoklive

Grok Build only. Turn a 2D character still into denser animation sprites via imagine_text_to_image base → imagine_image_to_video (6s/10s run-in-place) → ffmpeg frames → magenta chroma-key → dense sampled strips/grids/GIFs. Use when the user wants video-to-sprite, smoother run/walk cycles, or denser intermediate poses. Prefer generate2dsprite for crisp production pixel sheets. Triggers on "video to sprite", "imagine_image_to_video sprite", "dense walk cycle", "smooth run animation from video".

evalix098/tiktoklive

Call the xAI API (Grok) from this app's server code using the injected XAI_API_KEY: chat/LLM features, image and video generation (Imagine), and voice (text-to-speech). Use when the app needs any "AI" / "assistant" / "chatbot" / "Grok" functionality, runtime image/video generation, or speech. Triggers on "AI", "LLM", "chatbot", "assistant", "Grok", "xAI", "generate text", "summarize", "generate image", "AI video", "voice", "text to speech", "TTS", "OpenAI" (use xAI instead).

相關技能