← 返回
数据分析 中文

Universal Game Primitives

Universal game architecture DSL with six primitives (LOOP, TILEGRID, CONTROLBLOCK, POOL, EVENT, DISPATCHER). Use when: (1) designing portable game/sim loops, (2) translating between architectures (68K ↔ Cell ↔ CUDA ↔ ECS), (3) explaining engine structure to AI agents, (4) refactoring chaos into explicit state + flow. Invocation produces: Primitive Map, Dataflow Sketch, Worked Example, Portability Notes.
通用游戏架构DSL,含六种原语(LOOP、TILEGRID、CONTROLBLOCK、POOL、EVENT、DISPATCHER)。适用场景:(1) 设计可移植游戏/模拟循环;(2) 架构间转换(68K ↔ Cell ↔ CUDA ↔ ECS);(3) 向AI代理解释引擎结构;(4) 将混乱代码重构为显式状态与流程。输出包含:原语映射、数据流草图、实例详解及移植说明。
stusatwork-oss
数据分析 clawhub v1.0.0 1 版本 99814.6 Key: 无需
★ 0
Stars
📥 1,077
下载
💾 34
安装
1
版本
#latest

概述

primitives-dsl — Universal Game Architecture Patterns

What this skill does

Provides a small, portable DSL of six universal primitives that appear across 68K-era loops, Cell/PPU+SPU orchestration, CUDA/GPU kernels, and modern ECS engines.

Primitives: LOOP · TILEGRID · CONTROLBLOCK · POOL · EVENT · DISPATCHER

Use this skill to:

  • Design a game/sim loop that ports cleanly across platforms
  • Translate between architectures (68K ↔ Cell ↔ CUDA ↔ ECS)
  • Explain engine structure to AI agents with minimal ambiguity
  • Produce "worked examples" using the same primitive vocabulary every time

When to use it

  • Starting a new subsystem and want a portable mental model
  • Refactoring chaos into explicit state + flow
  • Mapping legacy code to modern patterns
  • Designing constrained-device / edge / "shareware for the future" loops

When NOT to use it

  • Don't invent new primitives (keep the vocabulary stable)
  • Don't debate engine religion (Unity vs Unreal vs custom). Translate, don't preach.
  • Don't skip the concrete artifact: every use must end in a diagram, table, or pseudocode

The DSL (definitions)

LOOP

A repeated update cycle with explicit phases. Owns time slicing and ordering.

TILEGRID

A spatial index with stable adjacency rules (2D/3D grids, nav tiles, zone cells, chunk maps).

CONTROLBLOCK

A compact, authoritative state record (flags, counters, handles, timers) used to coordinate behavior and enforce constraints.

POOL

A bounded allocator for frequently-created things (entities, bullets, particles, jobs). No unbounded new in hot paths.

EVENT

A structured message representing "something happened" with minimal payload and explicit routing metadata.

DISPATCHER

Routes work and events to handlers (CPU threads, SPUs, GPU kernels, ECS systems). Also where scheduling policy lives.

Output contract (what you must produce)

When invoked, produce:

  1. Primitive Map — Identify which parts of the system correspond to each primitive
  2. Dataflow Sketch — Text diagram or table describing movement of state/events
  3. One Worked Example — Or cite an existing example file
  4. Portability Notes — How this maps to 68K / Cell / CUDA / ECS

Invocation patterns (copy/paste prompts)

"Apply primitives-dsl to design a loop for ___ . Provide a Primitive Map + Dataflow + Portability."

"Translate this architecture into LOOP/TILEGRID/CONTROLBLOCK/POOL/EVENT/DISPATCHER."

"Given these constraints (___), propose a primitives-dsl design and a worked example."

Guardrails / style rules

  • Use primitive names in ALL CAPS
  • Prefer tables over paragraphs for mappings
  • Use tight pseudocode (no full implementations)
  • Always name the CONTROLBLOCK fields explicitly
  • Always specify POOL bounds (even if guessed)
  • EVENTS must have a routing key or channel
  • DISPATCHER must declare policy: FIFO, priority, fixed-step, budgeted, etc.

References

External Resources

  • Anthropic Skills Repository — Skill creation patterns
  • Alien Bash II — 68K source extraction (Glenn Cumming, open domain)
  • NVIDIA CUDA Programming Guide — Modern GPU primitive patterns
  • Cell Broadband Engine Programming Handbook — SPE work distribution

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 04:02 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Stock Analysis

udiedrichsen
{"answer":"基于雅虎财经数据,分析股票与加密货币。支持投资组合管理、自选股预警、股息分析、8维评分、热门趋势扫描及传闻/早期信号探测。适用于股票分析、持仓追踪、财报异动、加密监控、热门股追踪或提前发掘非主流传闻。"}
★ 270 📥 56,958
data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 368 📥 140,429
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 198 📥 65,098