pixi-vector-arcade
Bootstrap browser-based games with PixiJS 8 and a modern retro/vector aesthetic (Geometry Wars, Asteroids, Tempest, Tron). Use when creating a new game, starting a browser game project, building an arcade game, prototyping a game, setting up PixiJS, or when the user mentions vector graphics, neon aesthetics, or arcade-style gameplay. Provides project scaffolding, ECS-lite architecture, performance patterns (pooling, spatial hashing, fixed timestep), and visual design system.
What this skill does
# PixiJS Vector Arcade Game Bootstrapping
**Purpose:** Scaffold browser-based games with PixiJS 8 and modern retro/vector aesthetics. Produces architecture that handles 500+ entities at 60fps with no memory growth over 30+ minute sessions.
---
## When to Use
Activate this skill when:
- Creating a new browser-based game with arcade/retro aesthetics
- Prototyping a game idea with solid architecture
- Building a PixiJS 8 project with proper performance patterns
- Setting up a TypeScript game project with ECS architecture
**Keywords:** game, arcade, retro, vector, pixijs, pixi, ecs, prototype, browser game, neon, glow
---
## Tech Stack
### Core Dependencies
```json
{
"dependencies": {
"pixi.js": "^8.6.6",
"@pixi/layout": "^2.0.0",
"stats.js": "^0.17.0"
},
"devDependencies": {
"typescript": "^5.7.3",
"typescript-eslint": "^8.21.0",
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
"eslint": "^9.18.0",
"vite": "^6.0.7",
"vitest": "^3.0.4",
"prettier": "^3.4.0",
"lint-staged": "^15.4.0"
}
}
```
### PixiJS 8 API (Critical Changes from v7)
```typescript
// Application init is now async
const app = new Application();
await app.init({
resizeTo: window,
backgroundColor: 0x000000,
preference: 'webgpu', // Falls back to WebGL
});
// Graphics API is chainable
const g = new Graphics()
.rect(0, 0, 100, 50)
.fill({ color: 0xff0000 })
.stroke({ width: 2, color: 0xffffff });
// ParticleContainer uses Particle objects, not Sprites
const particles = new ParticleContainer({
dynamicProperties: {
position: true,
scale: true,
rotation: false,
tint: false,
alpha: true,
},
});
const particle = new Particle({ texture, anchorX: 0.5, anchorY: 0.5 });
particles.addParticle(particle);
```
### Context7 Documentation
When querying up-to-date PixiJS docs, use library IDs:
- `/pixijs/pixijs/v8_12_0`
- `/llmstxt/pixijs_llms-full_txt`
---
## Project Structure
```
project/
├── src/
│ ├── index.ts # Entry point, app bootstrap
│ ├── game.ts # Game class - orchestrates everything
│ │
│ ├── core/ # Engine-level systems (game-agnostic)
│ │ ├── clock.ts # Adjustable game timer
│ │ ├── ecs.ts # Entity manager, component arrays
│ │ ├── pool.ts # Generic object pooling
│ │ ├── spatial-hash.ts # Collision broadphase
│ │ └── input.ts # Keyboard/mouse state
│ │
│ ├── components/ # Pure data (no logic)
│ │ ├── transform.ts # Position, rotation, scale
│ │ ├── velocity.ts # Linear + angular velocity
│ │ ├── collider.ts # Radius, collision mask/layer
│ │ ├── health.ts # HP, max HP, invincibility
│ │ ├── lifetime.ts # TTL for projectiles, particles
│ │ └── renderable.ts # Graphics reference, layer
│ │
│ ├── systems/ # Logic that operates on components
│ │ ├── physics.ts # Velocity → position, wrapping
│ │ ├── collision.ts # Spatial hash queries, response
│ │ ├── render.ts # Sync components → PIXI graphics
│ │ └── [game-specific] # Weapon, enemy AI, etc.
│ │
│ ├── data/ # Content definitions (pure data)
│ │ └── config.ts # Tuning constants
│ │
│ ├── rendering/ # PIXI-specific
│ │ ├── layers.ts # Container hierarchy
│ │ ├── viewport.ts # Full viewport scaling
│ │ ├── particles.ts # ParticleContainer system
│ │ ├── design-system.ts # Colors, visual constants
│ │ └── shaders/ # Custom GLSL effects
│ │
│ ├── ui/ # HUD, menus
│ │ └── hud.ts
│ │
│ ├── debug/ # Dev tools
│ │ └── stats.ts # Performance monitor
│ │
│ └── types/ # Type declarations
│ └── stats.js.d.ts
│
├── references/ # Specs, original designs
├── docs/plans/ # Architecture docs
├── history/ # Ephemeral scratch (gitignored)
└── [config files]
```
---
## Core Architecture Patterns
### 1. Adjustable Game Clock
Independent of framerate and wall clock. Supports pause, slow-mo, frame stepping.
```typescript
interface Clock {
elapsed: number; // Total game time (scaled)
delta: number; // Fixed tick duration (1/60)
scale: number; // 1.0 = normal, 0 = paused
wallDelta: number; // Real time (for UI animations)
wallElapsed: number;
}
interface ClockController extends Clock {
pause(): void;
resume(): void;
setScale(scale: number): void;
step(delta: number): void; // Advance one tick (debugging)
}
```
### 2. Fixed Timestep Game Loop
Physics at fixed 60Hz. Render interpolates for smooth visuals.
```typescript
const TICK_RATE = 60;
const TICK_DURATION = 1 / TICK_RATE;
let accumulator = 0;
app.ticker.add(() => {
const wallDelta = app.ticker.deltaMS / 1000;
accumulator += wallDelta * clock.scale;
// Cap to prevent spiral of death
accumulator = Math.min(accumulator, TICK_DURATION * 5);
while (accumulator >= TICK_DURATION) {
clock.delta = TICK_DURATION;
clock.elapsed += TICK_DURATION;
// Systems update in deterministic order
inputSystem.update();
physicsSystem.update();
collisionSystem.update();
// ... more systems
world.flush(); // Apply deferred destructions
accumulator -= TICK_DURATION;
}
// Render with interpolation
const alpha = accumulator / TICK_DURATION;
renderSystem.update(alpha);
});
```
### 3. ECS-Lite Architecture
Entities are numbers. Components are typed maps. Zero allocation in hot paths.
```typescript
type Entity = number;
class ComponentArray<T> {
private readonly data = new Map<Entity, T>();
set(entity: Entity, component: T): void { ... }
get(entity: Entity): T | undefined { ... }
has(entity: Entity): boolean { ... }
remove(entity: Entity): void { ... }
*entries(): IterableIterator<[Entity, T]> { yield* this.data.entries(); }
}
class World {
private nextId = 0;
private readonly alive = new Set<Entity>();
private readonly toDestroy: Entity[] = []; // Deferred
// Component arrays
readonly transform = new ComponentArray<Transform>();
readonly velocity = new ComponentArray<Velocity>();
// ...
// Type markers (for fast iteration)
readonly asteroids = new Set<Entity>();
readonly projectiles = new Set<Entity>();
// ...
spawn(): Entity { ... }
destroy(entity: Entity): void { this.toDestroy.push(entity); }
flush(): void { /* Actually remove */ }
}
```
### 4. Object Pooling
Critical for preventing GC during gameplay.
```typescript
interface Pool<T> {
acquire(): T;
release(item: T): void;
prewarm(count: number): void;
readonly activeCount: number;
readonly pooledCount: number;
}
class ObjectPool<T> implements Pool<T> {
constructor(
private factory: () => T,
private reset: (item: T) => void,
private dispose?: (item: T) => void
) {}
// ...
}
```
**Rules:**
- Never create objects during gameplay—acquire from pools
- `reset()` hides but doesn't destroy (for Graphics: set visible=false, move offscreen)
- `destroy()` only on full shutdown
- Prewarm at startup based on expected max counts
### 5. Spatial Hashing
O(n) collision instead of O(n²).
```typescript
interface SpatialHash {
cellSize: number;
clear(): void;
insert(entity: Entity, x: number, y: number, radius: number): void;
queryRadius(x: number, y: number, radius: number): readonly Entity[];
}
```
- Rebuild every frame (fast with pooled cell arrays)
- Cell size ≈ largest common entity radius
- Returns candidates; caller does fine collision (circle-circle)
### 6. Separation of Concerns
- **Components**: Pure data, no methods
- **Systems**: Logic that operates on components, no PIXI imports
- **Rendering**: Reads state, never modifies it
- **Data definitions**: Pure config objects for content
---
## Performance Rules
These rules prRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.