Optimization
AI Summary
A short gist of this page, generated for you.
Powered by AI. Summaries can miss nuance — when in doubt, read the page.
Funox players leave if your game takes too long to load or runs poorly. Treat performance as a feature.
#Loading
- Target a first interactive frame in under 10 seconds on broadband.
- Lazy-load anything that is not needed in the first 30 seconds of play.
- Show real progress during loading (downloaded bytes, not a spinner).
- Avoid decoding large assets synchronously — stream where possible.
#Asset budget
| Asset type | Target |
|---|---|
| Whole game folder | 100 MB or less (the upload limit) — the smaller the better |
| Textures | Compressed (WebP or AVIF, or engine-native ASTC / ETC) |
| Audio | OGG or MP3 at a reasonable bitrate (96–128 kbps for music) |
| Fonts | Subset to the characters you actually use |
#Code
- Remove unused dependencies (tree-shaking).
- Minify your JavaScript.
- Use
requestAnimationFramefor game loops, notsetInterval. - Avoid allocating in the hot path (
new,[],{}every frame). - Pause heavy work when the tab is hidden (
document.hidden).
#Rendering
- Batch draw calls — use atlases rather than individual sprites.
- Avoid full-screen post-processing on mobile.
- Cap shadow resolution and reflection quality on lower-end devices.
- Target 60 fps; drop to 30 only when you have exhausted other options.
#Memory
- Free unused assets between scenes.
- Do not leak event listeners — unregister them on teardown, including SDK listeners.
- Profile heap growth over a 30-minute session.
- On iOS especially, stay below 512 MB of peak memory.
#Network
- Do not load fonts or libraries from a CDN. Ship them inside your game folder.
- Use relative paths for everything in the folder.
- The Funox SDK is the exception: always load it from its official URL.
#Engine-specific
- Unity: Brotli compression, IL2CPP, code stripping, ASTC textures, Addressables.
- Godot: disable threads if you do not need them, preload critical scenes.
- Construct: avoid per-tick scripts on every object; use families.
- Cocos: use subpackages and keep the first scene small.