game-geometry-representation-choice
Choose the right geometric representation for game systems before implementing rendering, collision, procedural generation, editing, or conversion code. Use when deciding between meshes, SDFs, voxels, splines, parametric surfaces, fields, or hybrid geometry workflows for games.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 1.6k
- Forks
- 483
01 前言 Front Matter
- name
- game-geometry-representation-choice
- license
- MIT
- metadata
- { "tags": "game-dev,game-geometry,geometry,representation,procedural-generation", "version": "0.1.0", "category": "Game Development", "displayName": "Game Geometry Representation Choice" }
- description
- Choose the right geometric representation for game systems before implementing rendering, collision, procedural generation, editing, or conversion code. Use when deciding between meshes, SDFs, voxels, splines, parametric surfaces, fields, or hybrid geometry workflows for games.
- compatibility
- Codex, Claude Code, and other Agent Skills-compatible clients.
03 SKILL.md 正文
Game Geometry Representation Choice
Use this skill before writing geometry-heavy game code. Pick the representation that makes the important operation simple, robust, and fast enough, then plan conversion boundaries deliberately.
Primary source: Geometry for Programmers by Oleksandr Kaleniuk (https://www.manning.com/books/geometry-for-programmers), transformed and paraphrased, especially chapters 2 and 10-12.
Core Workflow
- Name the operation first: render, collide, pick, offset, deform, Boolean, smooth motion, destruct terrain, generate props, edit geometry, or convert.
- List the data the game already has and the data the game ultimately needs. Include textures, normals, animation bindings, gameplay tags, and LODs.
- Pick the working representation where the core operation is cheapest and least fragile. Do not default to meshes just because rendering ends there.
- Define conversion boundaries: input representation, working representation, output representation, resolution, tolerated error, and attribute transfer.
- Add invariants and tests for the representation, not just the final visual.
- Revisit the choice when the operation mix changes. A good rendering representation may be a poor editing or collision representation.
Representation Guide
- Use triangle meshes for rendering, GPU pipelines, LODs, static level geometry, and approximating smooth surfaces when attribute data matters.
- Use SDFs or implicit fields for Boolean composition, offsets, hollowing, organic procedural forms, cheap inside/outside tests, and robust repair steps.
- Use voxels or image masks for destructible terrain, coarse occupancy, erosion/dilation, denoising, flood fill, gap checks, and reliable Boolean-like operations on a shared grid.
- Use splines or Bezier curves for player paths, camera rails, projectile trails, roads, rivers, UI curves, and animation controls where continuity matters.
- Use parametric surfaces when procedural objects come from a small number of parameters, such as surfaces of revolution, terrain patches, tubes, or rails.
- Use vector fields or deformation fields for smooth warps, influence maps, wind/current effects, procedural variation, and nonrigid deformation.
- Use hybrids when one representation owns interaction and another owns rendering, such as voxel sculpting with mesh LOD output.
Decision Rules
- If the operation is Boolean or offset-like, prefer SDFs or voxels over triangle meshes unless exact mesh topology is required.
- If the operation needs exact texture, normal, skinning, or authoring data, preserve mesh attributes or plan how to regenerate them after conversion.
- If the system needs smooth paths, start with curves and parameterization, not with sampled points.
- If the game needs thousands of repeated spatial tests, choose a representation that supports indexing, locality, or precomputed coefficients.
- If memory dominates, prefer boundary data such as meshes or splines over full voxel volumes.
- If robustness dominates, prefer grid, SDF, or redundant fallback workflows over a single brittle mesh algorithm.
Output Checklist
Return a short representation brief:
- Chosen working representation:
- Existing input representation:
- Required output representation:
- Operations made simpler:
- Operations made harder:
- Conversion steps:
- Error/resolution budget:
- Attribute preservation plan:
- Degenerate or failure cases:
- Minimal tests or debug views:
Common Mistakes
- Rendering from meshes, then forcing every gameplay operation to run on the same mesh.
- Applying offsets or Booleans to arbitrary triangle meshes before considering SDF or voxel workflows.
- Converting representations without a plan for normals, UVs, materials, gameplay labels, collision layers, or LODs.
- Treating a sign-only implicit function as a true distance field after operations that destroyed distance meaning.
- Choosing a high-resolution grid without proving the memory and streaming model.
- Optimizing the algorithm implementation before choosing the representation that makes the algorithm unnecessary.
04 同仓库更多 Skills
migrate-to-e2e
Moves an existing Playwright, Cypress, Selenium, Appium, Detox, Maestro, or TesterArmy suite to e2e one slice at a time, with the old suite running beside the new one until each ported test is proven. Keeps a MIGRATION.md progress file so any later session resumes where the last stopped. Optionally plants a defect to show both suites catch it. Use for /migrate-to-e2e, "migrate our tests to e2e", "port these Maestro flows", "move our TesterArmy tests", or when a project has an e2e config and an older suite still running.
e2e
Writes, runs, and debugs end-to-end tests for web and mobile apps with e2e, the agentic test runner, which mixes agent.act goals with exact locator assertions on a Playwright browser or an iOS or Android device. Also drives a project's running app live over the e2e MCP server to look at a screen, check a UI change, take a screenshot or record a video, and try a locator; and runs bug bashes, parallel e2e explore runs with each bug proven by a repro test. Use when a project depends on e2e or has an e2e.config.ts, when asked for end-to-end, browser, mobile, or agentic UI tests, to check a change in the running app, to QA or bug bash an app or branch, or when an e2e run fails.
create-verification-skill
Generate a project-local verify-<app> skill on top of e2e, so any coding agent can launch the app, check it is worth driving, exercise a feature the way a user does, keep evidence, and bug bash it. Writes the skill, a feature map with one explore charter per feature, and proves it once. Use for /create-verification-skill, "make a verification skill for this repo", or when a project has no scripted way to prove UI behavior.
deja-search
deja-vu memory — search the user's past AI coding sessions with the deja CLI. Holds what they already settled and never wrote into the repo (naming rules, banned or already-tried tools, required checks before merge, preferred values, who owns what). Use before your first edit in a task, before you call a change done or ready to merge, before you recommend a tool, library, design or reviewer, before re-debugging an error that may already be solved, when they say 'didn't we fix this before', 'what did we decide about X' or 'I already have that', and before telling them something on this machine does not exist.
deja-reflect
End-of-session reflection and memory curation with deja-vu. Review what was decided, what commands broke and what repaired them, and record durable project rules or decisions with deja remember so the next session starts with them.
revid
Make, edit, export and post AI videos with Revid (revid.ai) through the Revid MCP server. Use whenever the user wants a short-form or long-form video made (from an idea, a script, a URL, an article, a PDF, a tweet, a product page, their own clips, or a song), wants to find what is going viral on TikTok, YouTube, Instagram or X before making something, wants to edit or re-export an existing Revid project, generate a standalone AI image or clip, make a series episode, or publish and schedule a finished video to connected social accounts. Covers setup (hosted MCP with OAuth, or an API key), the 36 tools, credits, polling and the rules for publishing. Routes to the more specific revid-* skills when one fits.