melonJS game performance
Speeds up melonJS games with pooling, batching, atlases and culling, so frame rates hold with many objects.
Claude's review
8/10 Concrete melonJS performance guidance covering batching, pooling and deferred removal bugs with code.
We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.
In detail
Use this skill when a melonJS game drops frames, allocates heavily, or needs to scale to many objects. Covers object pooling, draw-call batching, atlases, baking with CanvasRenderTarget, instancing, culling and alwaysUpdate, the debug plugin, and where the real costs are. Triggers on: performance, slow, frame rate, fps, lag, pool, pool.register, pool.pull, batching, draw calls, InstancedMesh, culling, alwaysUpdate, inViewport, CanvasRenderTarget, optimise, profiling, debug plugin, memory, render targets, hdr.
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: melonjs-performance
description: "Use this skill when a melonJS game drops frames, allocates heavily, or needs to scale to many objects. Covers object pooling, draw-call batching, atlases, baking with CanvasRenderTarget, instancing, culling and alwaysUpdate, the debug plugin, and where the real costs are. Triggers on: performance, slow, frame rate, fps, lag, pool, pool.register, pool.pull, batching, draw calls, InstancedMesh, culling, alwaysUpdate, inViewport, CanvasRenderTarget, optimise, profiling, debug plugin, memory, render targets, hdr."
license: MIT
---
# Performance
## Measure first
Register the debug plugin and read the numbers before changing anything:
```js
import { plugin } from "melonjs";
import { DebugPanelPlugin } from "@melonjs/debug-plugin";
await app.init();
plugin.register(DebugPanelPlugin, "debugPanel");
```
It reports update and draw time, FPS, heap and object counts, and can overlay
collision shapes, bounds, velocities and the quadtree. Its `#draws` is the
number of the world's direct children drawn this frame, **not** GPU draw
calls. Draw calls are usually the number that matters, and nothing in the
engine counts them: on WebGL, count them the way the `linkProgram` counter
below counts programs, by wrapping `drawElements` and `drawArrays` (and
their `Instanced` forms) on `WebGL2RenderingContext.prototype`.
## Batching: the biggest lever
Both GPU backends batch **across textures**, not just within one: the quad
batcher assigns each source image a texture unit and embeds the unit in the
vertex data, so several different images still flush as a single draw. The pool
is finite — the WebGL batcher gets `renderer.maxTextures` units (the
`maxTextures` application setting, `"auto"` = the device limit capped at 32), the
WebGPU batcher eight per segment. Overflow the pool and the batch flushes.
So the goal is not "one image" but "few state changes". What actually ends a
batch:
...From melonjs's repository, MIT licence.
Related skills
-
Checked
Godot game optimisation
Profiles a Godot game and fixes common slowdowns in draw calls, physics and memory so it runs more smoothly.
7/101 credit -
Checked
Game camera tuning
Builds and tunes follow, orbit and first person game cameras in Godot or Cinemachine so they stop jittering.
8/101 credit -
Checked
Game HUD and menus
Sets rules for game HUDs and menus, from scaling to safe areas and gamepad focus, so screens fit any display.
7/101 credit -
Checked
Game controller input
Sets up input actions, stick deadzones, buffered presses and rebinding in Godot, so controls feel reliable.
8/101 credit -
Checked
Blender asset optimisation
Cuts Blender assets down to each platform's budget with LODs, decimation and texture atlases before export.
7/101 credit -
Checked
Three.js game UI
Designs HUDs, menus, pause screens and touch controls for Three.js games that read well on any screen.
7/101 credit