melonJS on game portals
Ports a melonJS game to Poki, YouTube Playables and app wrappers so pausing, saves and ads all work.
Claude's review
8/10 Specific platform integration patterns for portals and native wrappers in melonJS covering pause, saves, ads and sizing traps.
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 runs somewhere other than a plain browser tab: a game portal (YouTube Playables, Facebook Instant Games, Poki, CrazyGames), a mini-game runtime (WeChat Mini Games), a native app wrapper (Capacitor, Cordova), or a runtime with no DOM (nx.js on the Nintendo Switch, a Web Worker). Covers a portal's SDK, handing pausing to the platform (device.setFocusEvents versus the pauseOnBlur / stopOnBlur flags), saving to its cloud (save.createCloudStorage, save.setStorage), following its mute, pausing for its ads, its loading and ready signals, a frame with no size yet, and the canvas setting with no page. Triggers on: YouTube Playables, ytgame, firstFrameReady, gameReady, Facebook Instant Games, FBInstant, Messenger, startGameAsync, Poki, PokiSDK, commercialBreak, CrazyGames, requestAd, WeChat mini game, wx, weapp-adapter, Capacitor, Cordova, iOS, Android, nx.js, Nintendo Switch, Web Worker, OffscreenCanvas, no DOM, game portal, cloud save, setFocusEvents, createCloudStorage.
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-platforms
description: "Use this skill when a melonJS game runs somewhere other than a plain browser tab: a game portal (YouTube Playables, Facebook Instant Games, Poki, CrazyGames), a mini-game runtime (WeChat Mini Games), a native app wrapper (Capacitor, Cordova), or a runtime with no DOM (nx.js on the Nintendo Switch, a Web Worker). Covers a portal's SDK, handing pausing to the platform (device.setFocusEvents versus the pauseOnBlur / stopOnBlur flags), saving to its cloud (save.createCloudStorage, save.setStorage), following its mute, pausing for its ads, its loading and ready signals, a frame with no size yet, and the canvas setting with no page. Triggers on: YouTube Playables, ytgame, firstFrameReady, gameReady, Facebook Instant Games, FBInstant, Messenger, startGameAsync, Poki, PokiSDK, commercialBreak, CrazyGames, requestAd, WeChat mini game, wx, weapp-adapter, Capacitor, Cordova, iOS, Android, nx.js, Nintendo Switch, Web Worker, OffscreenCanvas, no DOM, game portal, cloud save, setFocusEvents, createCloudStorage."
license: MIT
---
# Platforms: portals, mini-games, native apps, no-DOM runtimes
A melonJS game is a web page, so it runs anywhere a browser does. Beyond that:
| platform | kind | melonJS | section |
|---|---|---|---|
| YouTube Playables | game portal (SDK) | 20.15+ for the integration below | [YouTube Playables](#youtube-playables) |
| Facebook Instant Games | game portal (SDK), also reached from Messenger | 20.15+ for the integration below | [Facebook Instant Games](#facebook-instant-games) |
| Poki | game portal (SDK) | 20.15+ | [Poki](#poki) |
| CrazyGames | game portal (SDK) | 20.15+ for `save.setStorage()` | [CrazyGames](#crazygames) |
| WeChat Mini Games | mini-game runtime; WeChat's adapter stands in for the DOM | 20.15+ | [WeChat Mini Games](#wechat-mini-games) |
| Capacitor, Cordova | native app wrapper (WebView) | any 20.x | [Native apps](#native-apps-capacitor-and-cordova) |
| nx.js (Nintendo Switch), Web Workers | runtime with no DOM | 20.14+, experimental | [Runtimes with no DOM](#runtimes-with-no-dom-nxjs-web-workers) |
The wiki has a page per platform: <https://github.com/melonjs/melonJS/wiki/Platforms>.
## The pattern when a platform is in charge
A portal or a native wrapper decides what a browser tab leaves to the game:
when the game is paused, where progress is saved, whether sound is on. Each is
handed over the same way on every platform.
### The SDK
A portal's SDK is a script it hosts. Load it in `index.html` **before** the
game, from the portal's URL. Never bundle it: portals reject bundles that do.
### Pausing: who reports it, and what the game does
Two separate settings:
| setting | decides | default |
|---|---|---|
| `device.setFocusEvents()` | **who** reports that the player left: the browser window (`blur`, `focus`, `visibilitychange`), or nobody, leaving it to the platform | the window |
...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