Assets & Media
Doodle Engine games can include images, audio, and video. Assets are served as static files by the dev server and included in production builds.
Project Structure
Section titled “Project Structure”The scaffolded project includes 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 effectsAsset paths referenced in content are resolved relative to the configured asset base path (by default, the assets/ directory).
Supported Formats
Section titled “Supported Formats”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 | Recommended for all audio (good compression, wide support) |
| MP3 | Alternative for music and voice (universal support) |
| Format | Use Case |
|---|---|
| MP4 (H.264) | Recommended for video playback (universal browser support) |
| WebM (VP9) | Alternative with better compression (most modern browsers) |
Referencing Assets in Content
Section titled “Referencing Assets in Content”Location Banners
Section titled “Location Banners”id: tavernname: '@location.tavern.name'description: '@location.tavern.description'banner: tavern.pngmusic: tavern_ambience.oggambient: fire_crackling.oggBanner images are referenced by filename. The renderer loads them using the configured asset paths.
Character Portraits
Section titled “Character Portraits”id: bartendername: '@character.bartender.name'portrait: bartender.pnglocation: taverndialogue: bartender_greetingItem Images
Section titled “Item Images”id: old_coinname: '@item.old_coin.name'description: '@item.old_coin.description'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: '@map.town.name'image: 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”- Use compressed formats to keep downloads reasonable
- Trim silence from the beginning and end of audio files
- Avoid unnecessarily large images or long uncompressed video
- 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.
Loading Behavior
Section titled “Loading Behavior”Doodle Engine prepares assets before the renderer depends on them. Portraits, banners, music, and other media are requested ahead of scene transitions so they are available when UI renders or playback begins.
Assets are divided into two loading tiers:
- Shell assets (logo, title screen, UI sounds) load before any screen renders
- Game assets (portraits, banners, music, items) load during the loading screen and are tracked by phase
See Asset Loading for details on loading phases and configuration.