Repository navigation
Plugin Debug Overlay
Arnel Robles edited this page Oct 1, 2026
·
1 revision
dopaminejs-plugin-debug-overlay 1.0.1.
npm install dopaminejs-plugin-debug-overlayA small box in the top right corner that shows what the kernel is doing.
import { Game } from 'dopaminejs';
import { DebugOverlayPlugin } from 'dopaminejs-plugin-debug-overlay';
const game = new Game();
if (import.meta.env.DEV) {
game.kernel.plugins.use(DebugOverlayPlugin);
}
game.start();import.meta.env.DEV is a Vite flag. With another bundler, use whatever marks a development build.
| Line | Source |
|---|---|
| FPS |
1 / dt of the last frame, rounded |
| Frame Time |
dt in milliseconds |
| Systems | number of registered systems |
| Plugins | number of loaded plugins |
It updates on every tick, so the numbers only move while the loop runs.
- The element is
#dopamine-debug-overlay, fixed, withz-index: 10000. It ignores pointer events. - FPS is the instant rate of one frame, not an average. It jumps around.
-
dtis capped at 0.1 seconds, so the box never reports under 10 FPS.
game.kernel.plugins.remove('debug-overlay');Removes the element and the tick listener.
Start
Progression
Engine
Packages
Reference