# Game assets on PlayDrop: bundled files, owned assets and shared packs

Ship images, sound, video and 3D with a PlayDrop game: bundled files, game-owned assets, public assets and packs, and runtime lookup with sdk.assets.

Source: https://www.playdrop.ai/create/learn/game-assets

A game can carry its art and sound in three ways. Pick the simplest one that does what you need.

| Way | Good for | How |
|---|---|---|
| Bundled files | Everything the game alone uses | Ship them in the package and load them by relative path |
| Game-owned assets | Assets you want listed on PlayDrop, reusable or sellable | Declare them in `ownedAssets` |
| Public assets and packs | Reusing assets other creators published | Reference them in `uses` |

## Bundled files

Put files next to the game and load them with relative paths, such as `assets/music.mp3`. They are uploaded with the [package](https://www.playdrop.ai/create/learn/packaging) and cached by the browser and the apps. List the ones needed to start in `prefetch.required` so the apps can download them early ([lifecycle](https://www.playdrop.ai/create/learn/lifecycle)). A simple HTML game must inline its assets instead.

## Game-owned assets

Declare assets the game owns in its catalogue entry. Each one becomes a PlayDrop asset with its own page, attached to this game:

```json
{
  "ownedAssets": [
    { "name": "moon-theme", "runtimeKey": "music.main", "displayName": "Moon theme",
      "category": "AUDIO", "files": { "primary": "assets/moon-theme.mp3" } },
    { "name": "astronaut", "runtimeKey": "sprites.player", "displayName": "Astronaut",
      "category": "SPRITESHEET", "files": { "atlas": "assets/astronaut.png", "manifest": "assets/astronaut.json" } }
  ]
}
```

- `category` is `IMAGE`, `VIDEO`, `AUDIO`, `SPRITESHEET`, `MODEL_3D` or `CUSTOM`; `subcategory` and `format` refine it.
- `files` maps roles to paths. Audio needs `primary`; spritesheets need `atlas` and `manifest`.
- `runtimeKey` is the name the game uses to find it at runtime.
- Optional: `visibility`, `license`, `tags`, and `shopListed` with `shopPriceCredits` to sell it.

## Public assets and packs

Reference published assets by exact revision, and packs by version:

```json
{
  "uses": {
    "assets": [{ "ref": "asset:someone/forest-tiles@r3", "runtimeKey": "tiles.forest" }],
    "packs": ["pack:someone/ui-kit@1.2.0"]
  }
}
```

Browse them on [PlayDrop assets](https://www.playdrop.ai/assets) or with `sdk.assets.catalog.listPublic()`, `sdk.assets.packs.listPublic()` and `sdk.search.query()`. A public game can only use public assets and packs; respect each asset's license.

## Find assets at runtime

```js
const music = sdk.assets.resolveAppAsset("music.main");
const file = music.files.find((entry) => entry.role === "primary");
audioElement.src = file.url;

for (const asset of sdk.assets.listAppAssets()) console.log(asset.runtimeKey, asset.sourceType);
```

Each result has `assetRef`, `runtimeKey`, `sourceType` (`OWNED`, `DIRECT` or `PACK`) and `files` with `role`, `url`, `contentType` and `sizeBytes`.

## What the connector accepts

Your AI app can upload images, video, audio, spritesheets and baked 3D models, including baked procedural images and spritesheets. Executable 3D models (`MODEL_3D` with the `procedural` subcategory or the `CUSTOM` format) run in PlayDrop's own tools but are refused by the connector, because the API does not run creator code to validate them. Bake them to a standard format such as GLB, or reference a version already published on PlayDrop.

Make new art and sound with [AI asset generation](https://www.playdrop.ai/create/learn/ai-assets). For formats PlayDrop does not know, see [custom asset formats](https://www.playdrop.ai/create/learn/custom-assets).

## Related guides

- [AI asset generation](https://www.playdrop.ai/create/learn/ai-assets): Generate images, music, sound, speech, video and 3D for a game in PlayDrop, from the browser with player confirmation or from a server paid by the creator.
- [Custom formats and player creations](https://www.playdrop.ai/create/learn/custom-assets): Define your own asset format with an asset spec, declare the formats a game reads or writes, and let players save and publish creations with sdk.assets.custom.
- [Packaging and .play](https://www.playdrop.ai/create/learn/packaging): Lay out a built game folder, ZIP or .play with catalogue.json at its root, declare listing media and servers, and upload it with prepare_catalogue_upload.
