Assets & Media
Doodle Engine games can include images, audio, and video. The development server loads these files while you work, and production builds include them with the finished game.
This page covers the asset folders, browser-friendly formats, and custom paths. Studio users can let the app do the filing: Assets in Studio imports a file and fills in the field in one step.
Project Structure
Section titled “Project Structure”New projects include these asset directories:
assets/ images/ banners/ # Location and interlude banner images portraits/ # Character portrait images items/ # Item icon and detail images maps/ # Map background images audio/ music/ # Background music tracks sfx/ # Sound effects voice/ # Voice lines ui/ # UI sounds (clicks, menu sounds) video/ # Video files used by VIDEO effectsRecommended Formats
Section titled “Recommended Formats”The asset scanner recognizes common browser image, audio, and video extensions. These are good defaults for browser games.
Images
Section titled “Images”| Format | Use Case |
|---|---|
| PNG | Portraits, icons, UI elements (supports transparency) |
| JPG | Banners, backgrounds, photos |
| WebP | Modern alternative to PNG/JPG (smaller files, wide support) |
| Format | Use Case |
|---|---|
| OGG | Good compression and broad browser support |
| MP3 | Widely supported option for music and voice |
| Format | Use Case |
|---|---|
| MP4 (H.264) | Widely supported option for video playback |
| WebM (VP9) | Alternative with better compression (most modern browsers) |
Add Asset Filenames to Content
Section titled “Add Asset Filenames to Content”Place each file in the folder for its media type, then write only its filename in the matching content field. Doodle Engine uses the field to find the correct folder.
id: tavernbanner: tavern.pngmusic: tavern_ambience.oggHere, Doodle Engine loads tavern.png from assets/images/banners/ and tavern_ambience.ogg from assets/audio/music/.
Convention Table
Section titled “Convention Table”| Field | Resolves to |
|---|---|
location.banner |
assets/images/banners/{filename} |
location.music |
assets/audio/music/{filename} |
location.ambient |
assets/audio/sfx/{filename} |
character.portrait |
assets/images/portraits/{filename} |
player.portrait |
assets/images/portraits/{filename} |
item.icon, item.image |
assets/images/items/{filename} |
map.image |
assets/images/maps/{filename} |
interlude.background, interlude.banner |
assets/images/banners/{filename} |
interlude.music |
assets/audio/music/{filename} |
interlude.voice |
assets/audio/voice/{filename} |
interlude.sounds[] |
assets/audio/sfx/{filename} |
DSL MUSIC |
assets/audio/music/{filename} |
DSL SOUND |
assets/audio/sfx/{filename} |
DSL VOICE |
assets/audio/voice/{filename} |
DSL VIDEO |
assets/video/{filename} |
Custom Paths
Section titled “Custom Paths”If you need to reference a file outside the convention, write the path
yourself, starting with assets/:
banner: assets/images/special/custom_layout.pngThe engine uses that path as written. Paths can also begin with
/ or a full http(s):// address. A leading / works only when the game is
hosted at the root of a domain, so an assets/ path is usually more portable.
Shell Config Paths
Section titled “Shell Config Paths”Shell assets configured in game.yaml under shell: use project-relative paths beginning with assets/. They are not processed by the convention table above.
shell: splash: logo: assets/images/studio-logo.png background: assets/images/splash-bg.jpg sound: assets/audio/sfx/splash-sting.oggContent YAML files use bare filenames that the engine expands using the convention table. Shell settings name the complete path within the project instead.
Location Banners
Section titled “Location Banners”id: tavernname: The Salty Dogdescription: A warm tavern overlooking the harbor.banner: tavern.pngmusic: tavern_ambience.oggambient: fire_crackling.oggCharacter Portraits
Section titled “Character Portraits”id: bartendername: Marcus the Bartenderportrait: bartender.pnglocation: taverndialogue: bartender_greetingA fixed portrait in content/player.yaml uses the same portraits directory.
When it is omitted, the party list shows the player’s initial and the character
sheet shows a simple placeholder. Player-created profiles do not offer a
portrait upload. A custom renderer can display a different fallback.
Item Images
Section titled “Item Images”id: old_coinname: Old Coindescription: A salt-stained coin stamped with an unfamiliar crest.icon: old_coin_icon.pngimage: old_coin.pngicon: small image shown in inventory grids and listsimage: larger image shown in inspection or detail views
Map Images
Section titled “Map Images”id: townname: Harbor Townimage: town_map.pngAudio in Dialogues
Section titled “Audio in Dialogues”MUSIC tension_theme.oggSOUND door_slam.oggVOICE bartender_greeting.oggVideo in Dialogues
Section titled “Video in Dialogues”VIDEO intro_cinematic.mp4Compression Tips
Section titled “Compression Tips”- Compress media to keep downloads reasonable
- Resize images to the largest dimensions the game displays
- Trim silence from the beginning and end of audio files
- Prefer modern formats (WebP, OGG, WebM) when compatibility allows
Bundled Assets
Section titled “Bundled Assets”For most games, bundle all assets with your build. They are copied to dist/ and served alongside the game. This works with static hosting, desktop wrappers, and typical web deployments.
When you run npm run build, every referenced local asset under assets/ must exist. The CLI copies the project assets/ folder to dist/assets/ and fails the build if content or shell config points at a missing local file.
Loading Behavior
Section titled “Loading Behavior”GameShell and AssetProvider prepare assets before gameplay begins. They load referenced media during startup so images and playback are ready when needed.
Assets load in two stages:
- Shell assets (splash, loading, title, UI sounds) load first
- Game assets (portraits, banners, music, video, items) load during the loading screen
See Asset Loading for details on loading phases and configuration.