# Performance & Optimization

Performance work starts with the first playable moment: the game should load quickly, stay responsive, and avoid unnecessary downloads before the player can interact.

Focus on these areas first:

* **Initial download size:** Keep the first package as small as possible. Move non-critical content out of the initial load.
* **Loading flow:** Show progress clearly, avoid long blank screens, and enter gameplay as soon as the core assets are ready.
* **Runtime stability:** Avoid freezes, memory spikes, and layout shifts during gameplay, ads, orientation changes, and tab switching.
* **Asset delivery:** Compress assets, split large content, and load heavy resources only when needed.
* **Platform limits:** Check target platform requirements before submission. Some platforms set strict limits for initial download size, total package size, and loading time.

Engine-specific implementation details are listed in child pages.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.playgama.com/playgama/guides/performance-and-optimization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
