Skip to content

Add game-creator-plus: skill + 3D template + proxy-aware scripts#21

Draft
rshtirmer wants to merge 6 commits into
mainfrom
feat/game-creator-plus
Draft

Add game-creator-plus: skill + 3D template + proxy-aware scripts#21
rshtirmer wants to merge 6 commits into
mainfrom
feat/game-creator-plus

Conversation

@rshtirmer
Copy link
Copy Markdown
Collaborator

Summary

Adds game-creator-plus, a premium-tier consumer for AI-generated 3D worlds (Marble Labs Gaussian splats) and characters (Meshy AI). Users buy credits via Stripe and get production-quality 3D content baked into playable browser games.

The proxy backend that bills credits + holds upstream API keys lives in a separate private repo (TBD). This PR ships only the public-facing pieces.

What's in this PR

Skill (skills/game-creator-plus/)

  • SKILL.md — when/how to use, decision tree, checklist
  • cathedral-pattern.md — empty-interior-with-image-reference prompting recipe
  • splat-techniques.md — fake-floor, lightness bake, splat fog
  • perf-playbook.md — frame budget, the 12.8ms setPixelRatio(1) win, etc.
  • credit-flow.md — pricing, topup UX, ledger semantics
  • proxy-protocol.md — wire format spec for client scripts ↔ backend

Template (templates/plus-template/)

A complete Three.js + SparkJS 2 + Rapier runtime for splat-based playable levels:

  • Kinematic capsule character controller, fake-floor physics, spring-arm camera
  • Lightness bake + splat fog for cohesive lighting
  • GLB and VRM character support, Mixamo retarget, mobile touch controls
  • Single-file Game.js is the gameplay surface; everything else is reusable infra
  • Ships with cathedral demo world out of box (~94MB: full + 500k + 100k splat tiers + collider + characters + animations)

Scripts (scripts/plus-*.mjs)

  • plus-auth.mjs — signup, balance, topup, dev-grant, rotate-token
  • plus-generate-world.mjs — Marble proxy with cathedral-pattern prompt augmentation
  • plus-prompt-templates.mjs — 5 scene-type prompt builders
  • meshy-generate.mjs and worldlabs-generate.mjs are now proxy-aware: route through GCPLUS_TOKEN (or ~/.gcplus/token) if present, else direct upstream

Docs

  • README.md — added "Premium Tier: game-creator-plus" section
  • CLAUDE.md — added repo-structure entries + an Operations section pointing at the (private) backend

What's NOT in this PR

  • The NestJS backend implementation (private repo: OpusGameLabs/plus-backend, TBD). It implements the contract documented in proxy-protocol.md and is hosted at gamecreator.dev.
  • The 78 backend tests (40 unit + 38 e2e) live with the backend.

Pricing

Verified against docs.worldlabs.ai/api/pricing and docs.meshy.ai/en/api/pricing on 2026-04-29. 17% markup over our upstream cost. Per-operation table in skills/game-creator-plus/credit-flow.md.

Test plan

  • Skill triggers on prompts mentioning "splat", "Marble", "playable 3D level", "cathedral"
  • cd templates/plus-template && npm install && npm run dev boots and walks the cathedral
  • ?slug=cathedral (default) loads the splat + collider + fake floor; player walks without falling through
  • ?character=robot|soldier|xbot|vrm swaps the player model
  • ?cam=first|third|topdown|side swaps the camera mode
  • node scripts/plus-auth.mjs --help works (no crash on missing token)
  • node scripts/plus-generate-world.mjs --help works
  • meshy-generate.mjs direct mode (with MESHY_API_KEY) still works for users who BYO keys
  • No site/plus-backend references anywhere in this branch (grep -r "site/plus-backend")

Note on file sizes

cathedral.spz is 64MB — past GitHub's 50MB recommendation but well below the 100MB hard limit. Future PRs may move large splat assets to LFS or external storage; for now keeping the demo world inline so the template works out of box.

🤖 Generated with Claude Code

Premium-tier consumer for AI-generated 3D worlds (Marble Labs splats)
and characters/props (Meshy AI). Routes through a hosted proxy at
gamecreator.dev that bills users via Stripe-funded credits. The
backend implementation lives in a separate private repo.

Three pieces in this PR:

1. Skill (skills/game-creator-plus/) — cathedral pattern, splat
   techniques, perf playbook, credit flow, proxy protocol. 6 docs.

2. Template (templates/plus-template/) — Three.js + SparkJS 2 +
   Rapier runtime. Kinematic capsule, fake-floor physics, lightness
   bake, splat fog, spring-arm camera, GLB + VRM character support,
   mobile controls. Ships with cathedral demo world out of box (94MB
   assets total — full splat + 500k/100k variants + collider).

3. Scripts (scripts/plus-*.mjs) — proxy-aware CLIs:
   - plus-auth.mjs (signup, balance, topup, dev-grant, rotate-token)
   - plus-generate-world.mjs (cathedral-pattern prompt augmentation)
   - meshy-generate.mjs and worldlabs-generate.mjs now route through
     GCPLUS_TOKEN if set (or ~/.gcplus/token), else direct upstream

Pricing verified against docs.worldlabs.ai and docs.meshy.ai
(2026-04-29). Marble 1.1-Plus is variable-cost (preauth-max +
settle-actual on the backend); other models are flat. 17% markup
over our upstream cost.

Backend (NestJS proxy) lives in private OpusGameLabs/plus-backend
(TBD). 78 tests (40 unit + 38 e2e) cover credit ledger, reconciliation
poller, asset mirror, Stripe webhook (event idempotency, refund/
dispute claw-back), admin metrics. Test suite caught 2 production
bugs during development (Marble cost field path, top-spenders ORDER
BY string-sort).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9562014d-b831-4321-9751-67fc4457978d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/game-creator-plus

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

rshtirmer and others added 4 commits May 4, 2026 16:00
Resolves PR-21-AUDIT.md sections 1.1, 1.2, 1.3, 3.4, 3.6, 3.7, 3.9, 3.10.

§1.2 — meshy-generate.mjs proxy mode silently 404'd every /v1/* endpoint.
resolvePath stripped only ^/v2 so image-to-3d, rigging, animations,
retexture, remesh all resolved to /v1/meshy/v1/<endpoint>. Switch
strip pattern + Idempotency-Key predicate to /v[12]/.

§1.3 — Add LFS rules for *.spz and *.vrm. Drop the 67MB
cathedral.spz (full-res tier) from the demo — desktop default is
'low' (500k tier, 7.8MB) and mobile is 'mini' (100k tier, 1.3MB),
so the demo still works. SplatLoader's 'full' branch now falls
back to 500k with a warning if the file is missing, matching
'progressive' behavior. Users who want the full tier generate
their own world via plus-generate-world.mjs.

§1.1 — plus-bake-lightness.mjs script doesn't exist; was referenced
4× in skill docs + plus-generate-world.mjs:683. Replaced with
?bake=lightness URL flow which the in-browser BakeLightness.js
already handles.

§3.4 — plus-template render_game_to_text() now includes the
CLAUDE.md rule 6 fields (mode, score, coordinate-system note,
player velocity).

§3.6 — Pricing table in SKILL.md was numerically wrong (claimed
"150cr base + 30cr/cube" while credit-flow.md and the backend
implement 148-288cr Plus / 14-22cr draft / 7-70cr Meshy). Aligned
with credit-flow.md and the actual priceForMarbleRequest /
priceForMeshyRequest in the backend.

§3.7 — Soften "talk-to-Claude topup" framing. Claude can't charge a
card; what it can do is print a one-click Stripe Checkout URL.

§3.9 — Drop production-deployment checklist from CLAUDE.md (sk_live
rotation, WAF rules, SDK upgrade procedures). Belongs in the
private backend repo, not the public-facing plugin docs.

§3.10 — Drop "(TBD)" wording on the OpusGameLabs/plus-backend
reference; the repo exists.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…+ 3.2)

Resolves PR-21-AUDIT.md sections 2.3 (welcome_url), 3.1 (magic-link
login), 3.2 (account deletion).

The audit's recommendation for each was "implement OR strike from docs."
proxy-protocol.md and credit-flow.md described:

  - welcome_url returning a /welcome HTML page with the topup button
  - POST /v1/login for magic-link bearer-token recovery
  - DELETE /v1/account for GDPR-compliant deletion + Stripe refund

None are implemented. Implementing them properly is its own scope —
magic-link needs email infrastructure; GDPR deletion needs Stripe
customer deletion + refund flow + asset purge cron.

Updated the docs to reflect what actually ships:

  - signup response now shows welcome_url:null with a note that the
    /welcome page is roadmap; first_topup_url is the actionable Stripe
    Checkout URL the CLI surfaces (which IS implemented)
  - removed the POST /v1/login section; the 409 conflict-on-existing-email
    note now says token recovery is via support, not magic link
  - DELETE /v1/account marked with `*(roadmap — not yet implemented)*`
    and points users at support for refunds/deletion in the meantime
  - first-time-signup walkthrough in credit-flow.md updated to match
    the actual UX (CLI prints Stripe URL → /topup/success page)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resolves PR-21-AUDIT.md §3.8.

CLAUDE.md tech stack table promised three ^0.183.0 and vite ^7.3.1; the
plus-template package.json shipped with three ^0.180.0 and vite ^5.4.0.
Bumped both to match the documented versions.

Verified the template still builds clean via `npm run build` (vite 7.3.2,
52 modules, 7.8MB output — same shape as before). SparkJS warns about
the three peer-dep range (it pins ^0.180.0) but the API surface we use
is stable across the bump; no runtime change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resolves PR-21-AUDIT.md §3.5.

CLAUDE.md rule 5 lists `audio/` as a canonical game directory but the
plus-template shipped without it. Audit suggested either porting the
flappy-bird audio system or "documenting the omission with a 'see
add-audio skill' pointer."

Going with the pointer — most games built on this template (souls
battles, exploration, slow-paced 3D) want different audio
characteristics than flappy-bird's tight SFX/BGM, and porting
something they'll throw out is worse than scaffolding it on demand.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants