profile-fps

Instrument Mood's browser rendering loop to measure per-frame timings and identify bottlenecks.

1|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/bsolidgold/mood --skill profile-fps
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: profile-fps
Source: https://github.com/bsolidgold/mood/tree/main/.claude/skills/profile-fps
Command: npx skills add https://github.com/bsolidgold/mood --skill profile-fps

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Mood's browser-based raycasting engine can suffer from frame-time instability and render bottlenecks. This Skill helps identify where the main loop spends the most time, enabling targeted optimizations to restore smooth 60 FPS gameplay.

Core Features & Use Cases

  • Instrument the game loop to measure per-frame timing across raycasting, sprite handling, AI updates, and minimap rendering.
  • Generate bottleneck reports with actionable recommendations and potential FPS improvements.
  • Use case: a developer wants to reduce stutter in a 60fps run by pinpointing the bottlenecks in the render loop and prioritizing fixes.

Quick Start

Run the profiler on the Mood engine with the default focus (all) and review the generated bottleneck report to guide optimization.

Frequently Asked Questions about profile-fps

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

FAQPage Schema
How do I profile FPS and pinpoint frame bottlenecks in a JavaScript raycasting engine?

To profile frame timing in a JavaScript game loop, you instrument the main rendering loop to measure per-frame timings across raycasting, sprite handling, AI updates, and minimap rendering. This identifies exactly where the loop spends the most time.

Why does my JavaScript raycaster suffer from frame-time instability and stuttering?

Frame-time instability in a JavaScript raycaster occurs when the main loop spends inconsistent time on rendering tasks. Instrumenting per-frame timings across raycasting and sprite handling isolates the specific bottleneck causing the stutter.

How do I measure per-frame timings across raycaster, sprite, and AI modules?

You measure per-frame timings by instrumenting the main loop to track execution time in specific files like js/raycaster.js, js/sprites.js, js/horde.js, and js/minimap.js. This setup collects targeted metrics for each subsystem.

What's the best way to optimize a sprite-dense browser game to restore smooth 60 FPS?

The best way to optimize for 60 FPS is generating a bottleneck report after instrumenting the frame loop. This report provides actionable recommendations and potential FPS improvements by analyzing sprite-dense and AI-heavy scenarios.

Do I need specific JavaScript files to set up the environment for frame timing analysis?

Yes, you need to specify the required files and environment setup to collect metrics effectively. The analysis targets specific modules including js/raycaster.js, js/sprites.js, js/main.js, js/horde.js, and js/minimap.js.

Can I use frame timing instrumentation to guide optimizations for AI-heavy scenarios?

Yes, you can use frame timing instrumentation to guide optimizations for AI-heavy scenarios. The profiler applies its analysis to AI updates alongside raycasting and minimap rendering to recommend targeted fixes.