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.
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 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). 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:
{
"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" } }
]
}categoryisIMAGE,VIDEO,AUDIO,SPRITESHEET,MODEL_3DorCUSTOM;subcategoryandformatrefine it.filesmaps roles to paths. Audio needsprimary; spritesheets needatlasandmanifest.runtimeKeyis the name the game uses to find it at runtime.- Optional:
visibility,license,tags, andshopListedwithshopPriceCreditsto sell it.
Public assets and packs
Reference published assets by exact revision, and packs by version:
{
"uses": {
"assets": [{ "ref": "asset:someone/forest-tiles@r3", "runtimeKey": "tiles.forest" }],
"packs": ["pack:someone/ui-kit@1.2.0"]
}
}Browse them on PlayDrop 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
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. For formats PlayDrop does not know, see custom asset formats.