performance

Apply optimization patterns to real-time game loops, rendering, and state updates.

2|Updated Nov 28, 2025
One-click install
npx skills add https://github.com/joshribakoff/surfsim --skill performance-joshribakoff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance
Source: https://github.com/joshribakoff/surfsim/tree/main/.claude/skills/performance
Command: npx skills add https://github.com/joshribakoff/surfsim --skill performance-joshribakoff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Real-time game performance tuning to achieve smooth 60fps by applying optimization patterns across the game loop, rendering, and state updates.

Core Features & Use Cases

  • Establish a performance budget for frame, physics, rendering, UI, and overhead.
  • Provide proven patterns for requestAnimationFrame loops, fixed time steps, object pooling, typed arrays, and batch rendering.
  • Include profiling guidance and common pitfalls to avoid frame drops in real-time simulations.

Quick Start

Review the real-time game loop and implement the provided patterns to maintain a consistent 60fps.

Frequently Asked Questions about performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize a real-time game loop to maintain a consistent 60fps?

To optimize a real-time game loop for 60fps, establish a structured performance budget covering frame, physics, rendering, and UI overhead, then apply deterministic timing using requestAnimationFrame and fixed time steps to prevent frame drops.

What is object pooling and how does it improve real-time rendering performance?

Object pooling improves real-time rendering performance by reusing allocated objects instead of constantly creating and destroying them, which prevents garbage collection spikes and maintains smooth memory usage during fast-paced physics and wave simulations.

How do I prevent frame drops in a physics simulation using a fixed time step?

Prevent frame drops in a physics simulation by decoupling rendering from state updates using a fixed time step loop, ensuring calculations remain deterministic and preventing unpredictable overhead from cascading across frames.

What's the best way to structure a performance budget for UI updates and rendering?

The best way to structure a performance budget is to allocate specific time slices for frame, physics, rendering, UI, and overhead, ensuring that batched drawing and UI update cycles stay within their limits to lock 60fps.

When should I use batched drawing and typed arrays for game optimization?

Use batched drawing and typed arrays for game optimization when processing performance-critical code paths like the rendering pipeline or physics simulation, as these patterns minimize draw calls and optimize memory layout for real-time execution.

Why does my requestAnimationFrame loop still experience frame drops during profiling?

A requestAnimationFrame loop might still experience frame drops during profiling if you fail to implement object pooling, exceed your rendering budget without batched drawing, or encounter common pitfalls in memory allocation during state updates.