Communitygithub.com

evalix098/tiktoklive

为 TikTok Live 生成 2D 游戏地图资源,支持 RPG 俯视角、横版卷轴、瓦片地图、道具包、碰撞区域和可行走区域。

tiktoklive 是什么?

这是一个专为构建浏览器游戏而设计的 AI 助手技能,能够生成生产级别的 2D 游戏地图,包括 RPG 俯视角地图、横版卷轴关卡、瓦片地图、分层光栅地图、道具包、碰撞区域和可行走区域。它通过调用 `imagine_text_to_image` 图像生成工具来创建基础地图和道具艺术,然后使用 Python 脚本进行切片、合成、碰撞元数据生成和引擎场景编排。该技能支持多种地图模式(如瓦片模式、场景模式、横版卷轴模式、网格模式、房间块模式和烘焙场景模式),并为 Phaser、Godot 或 Tiled 等游戏引擎输出结构化的可编辑资源。当用户请求“地图”、“关卡”、“舞台”、“瓦片地图”、“大地图”、“地下城”、“横版卷轴背景”或“道具包”时触发。该技能强调将游戏对象(如道具、碰撞区域)与基础层分离,确保地图是可玩的,而不是单一的平面图像。

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

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

生成2d地图

应用构建器 / 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 — 模块化房间/块:Roguelike 地下城、银河恶魔城网络、程序化组装。
  • baked_scene_mode — 明确为平面、不可玩的场景:标题/菜单画面、战斗背景、视觉小说场景、概念艺术。

当用户指定参数时使用它们;否则根据现有游戏、摄像机、碰撞需求、地图比例和编辑需求推断最轻量的可玩流程。当模式和轴存在分歧时,模式的可玩/可编辑契约优先。类型路由、每种模式的轴默认值、预设和升级启发式规则在 references/map-strategies.md 中 —— 当选择不明显时请阅读它。

一张可玩的地图永远不是一张烘焙好的图像。 对于任何暗示可玩地图、关卡、舞台、房间、原型或引擎场景的请求,交付物必须将游戏几何体和对象作为单独的图层、道具、瓦片/对象数据、碰撞区域、区域或引擎原生场景节点暴露出来。烘焙图像可以是背景、参考或预览工件——但绝不是运行时地图——除非用户明确要求仅平面背景。

仅限于场景和地图。 不要在此处生成角色、敌人、BOSS、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).

相关技能