跳过主要内容
WEB
Skill免费GameSkill 出品GameSkill 原创

Procedural Low-Poly Buildings (kit, validator, views)

/procedural-lowpoly-building

A GameSkill original: build stylised low-poly buildings in code from a small spec, then prove them: plot and height limits, a triangle budget per tier, closed outward meshes, supported parts, level roofs and side-only taper measured from silhouettes, plus front, side, top and 3/4 renders checked against the geometry.

许可证
MIT
出品
GameSkill 出品
下载 ZIP

我们测过

在 three.js r186 (0.186.1) in Chrome 156 headless 上通过 34/34 项检查(2026-10-28):能触发、有可运行示例、有截图和自检清单、单一职责、中英文文档齐全。触发检查是把提示词和 skill 描述做匹配,不是真实 agent 运行。

测试报告

GameSkill 测过的版本

GameSkill 为 gameskill.dev 原创编写并测过。ZIP 里是完整的 skill:SKILL.md 及中文版、脚本、可运行示例、测试、自检清单和我们的测试报告。

下载测过的 ZIP(535 KB)路线图:美术资产

GameSkill 原创,协议 MIT。ZIP 保留 LICENSE 和 CREDITS.md,里面列出了流程灵感来源、CC0 测试素材和第三方库及其协议。

Procedural Low-Poly Buildings (kit, validator, views)

自检清单

  • 先只做体块并通过校验,再加窗户 / Masses pass validation before any window is added
  • 每个部件都封闭、法线朝外、有支撑 / Every part is closed, faces outward and is supported
  • 三角形数不超过本等级预算 / Triangles stay within the tier budget
  • 正面和侧面剪影符合意图(例如只在侧面收窄) / Front and side silhouettes match the intent (e.g. narrows on the side only)
  • 亲眼看过正、侧、顶、3/4 四张图 / The front, side, top and 3/4 renders were actually looked at
  • npm test 和 npm run test:browser 都通过 / npm test and npm run test:browser pass

中文指南

这个 skill 做什么

GameSkill 原创(MIT)。用代码而不是模型文件搭建风格化的低模建筑:一个小小的 ModelKit(盒子、宽深独立的 loft、人字屋顶、四坡屋顶、棱柱、成组的窗户),一份建筑规格,再加一个校验器:地块和限高、按等级的三角形预算、网格封闭且朝外、每个部件都有支撑、屋顶是否水平、只在侧面收窄这类意图(用正交剪影测量),最后渲染正、侧、顶和 3/4 视图,并要求渲染出的剪影和几何测量一致。

什么时候用

  • 在做城市建造、棋盘或经营类游戏,建筑用代码生成
  • 某栋建筑“从侧面看不对”
  • 想让很多建筑在小尺寸下仍然好认、而且便宜

怎么装

下载本页的 ZIP,把 procedural-lowpoly-building/ 文件夹放进 .claude/skills/(Claude Code)或 .agents/skills/(Codex、Cursor),重启 agent。建模和校验模块没有依赖,渲染用随附的 three.js r186。

最小示例

三栋原创建筑:街角面包店(1 级)、带钟楼的市场大厅(2 级)、港口办公塔楼(3 级,只在侧面收窄、平屋顶)。node test/serve.mjs 后打开 http://localhost:8770/ 看转台,/?sheet 看所有建筑的四视图对照。

我们怎么测的

npm test 跑 11 个 Node 测试:基础形体的体积和朝向、三栋建筑全部通过,还有一组故意做坏的例子必须被抓出来:超出地块、超高、超预算、网格开口、法线朝内、悬空细节、没有支撑的体块、抬高的屋顶角、直板楼和四面收分的塔楼。npm run test:browser 在无头 Chrome 里做 9 项检查,包括渲染出的正面和侧面剪影与几何测量的重合度(IoU > 0.9)。

致谢

工作流思路来自 Derek Wang 的 OpenCityMaker(MIT)里的 building-reference-modeling skill:多视角参考、先体量后立面、按等级分配细节、在正侧视图里检查平屋顶和单向收分。文字和代码都是我们自己写的,三栋建筑都是原创的通用设计,不是真实地标。

搭配

  • multiview-to-web-3d-asset:用 AI 图生 3D 做道具和角色
  • threejs-glb-scene-assembly:把模型放进 three.js 场景
  • procedural-gen:程序化生成城市布局

安装

告诉你的 AI

Install the skill from https://gameskill.dev/skills/procedural-lowpoly-building/install.md

GameSkill 测过的版本

测过的版本装到 .claude/skills/
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/procedural-lowpoly-building.zip -o /tmp/gameskill-procedural-lowpoly-building.zip
unzip -oq /tmp/gameskill-procedural-lowpoly-building.zip -d .claude/skills
rm /tmp/gameskill-procedural-lowpoly-building.zip

包含内容

  • src/kit.js: closed, outward-wound box, loft (independent width and depth), gable, pyramid, prism and grouped window grids
  • src/buildings.js: three original buildings as specs (tier 1 bakery, tier 2 clock hall, tier 3 harbour tower)
  • src/validate.js: plot, height, tier budget, closure, winding, support, level roof, taper intent from orthographic silhouettes
  • A turntable and a front / side / top / 3/4 contact sheet where rendered silhouettes must match the measured ones
  • 11 Node tests and a 9-check headless Chrome test

适合

  • City builders, board and tycoon games with code-built buildings
  • Fixing buildings that look wrong from the front or side
  • Keeping many buildings readable and cheap at small sizes

不适合

  • Photogrammetry or AI image-to-3D (see multiview-to-web-3d-asset)
  • Realistic architectural visualisation

试试这条提示词

提示词
Make three low-poly buildings in code for my city builder, check they fit their plots and triangle budgets, and show me front and side views.

关于这个 Skill

A GameSkill original, written and tested for gameskill.dev under MIT. Three original buildings are written as specs on a tiny ModelKit and checked by a validator; a contact sheet shows each one from the 3/4, front, side and top.

Agent steps

  1. Write the intent first: plot, height, tier, roof type, which elevation narrows.
  2. Massing first: masses and roofs only, validate, look at front and side silhouettes.
  3. Loft, not shrinking boxes, for continuous taper with independent width and depth.
  4. Group details for the display size; details must touch a mass.
  5. Spend detail by tier; the budget is a cap, not a target.
  6. Validate in numbers, then look at all four views.
  7. Real buildings: front, side and aerial references from the source page; mark inferred forms; keep the identity.

Common errors it fixes

  • Stepped tapers from stacked boxes.
  • Buildings that look right in 3/4 but wrong from the side.
  • Floating details, open meshes and inward faces.

Credits

Workflow ideas from the building-reference-modeling skill in OpenCityMaker by Derek Wang (MIT). Text and code are ours.

环境要求

  • Any engine: the kit outputs plain position and index arrays
  • Node.js 20+ to run the tests; Chrome for the render check

相关主题

常见问题

基于 OpenCityMaker (building-reference-modeling skill, ideas only) (作者 Derek Wang,MIT)的思路。代码和文字由 GameSkill 编写,ZIP 里的 CREDITS.md 列出所有来源。

搭配使用

作者标注的相关 Skills,或更适合相邻任务的 Skills。

相似 skills

open-game-skills
GDT
Starter Kit
6

open-game-skills

An MIT pack of about 190 SKILL.md agent skills for game design: combat feel, camera, traversal, world, validation, 2D/Spine and art pipeline, with a dispatcher and adapters for Three.js, PixiJS, Phaser, Cocos, Godot, Unity and Unreal.

Engine-agnosticGodotUnityClaude Code · Codex +1
Kart Drift Boost
WEB
Skill
GameSkill 出品

Kart Drift Boost (tiers, windows, ramps)

A GameSkill original: arcade kart drift-boost rules that reward skill. Drifts charge three tiers, release opens a 0.85 s window you must press in, counter-steer adds a CUT bonus, ramps give one air and one landing boost, boosts take the maximum instead of stacking, and walls cancel everything pending.

Web (Phaser / Three.js)Engine-agnosticClaude Code · Codex +2
One-button Flight
WEB
Skill
GameSkill 出品

One-button Flight (fair tap-to-flap)

A GameSkill original: the rules of a one-button flight game that is never unfair. Flaps set speed instead of adding it, a fixed-step simulation plays the same at 30 and 144 fps, the hitbox forgives grazes, and a seeded gap generator stays inside the reachable band, checked by an autopilot.

Web (Phaser / Three.js)Engine-agnosticClaude Code · Codex +2
Three.js FPS Weapon Feel
WEB
Skill
GameSkill 出品

Three.js FPS Weapon Feel (recoil, ADS, touch aim)

A GameSkill original: a learnable recoil pattern whose recovery never undoes the player's own compensation, aim-down-sights with matched sensitivity, spread you can draw as a crosshair, viewmodel bob, sway, kick and flash, and a phone chapter with a move stick, precision look zone and a fire button that aims.

Web (Phaser / Three.js)Engine-agnosticClaude Code · Codex +2