Builder Manual Play
Builder Manual / Assets

ART / Assets

Assets

Sprite sheets, tilesets, fonts, folder rules, and visual resource notes.

Assets


All visual assets live in the assets/ directory, organized into categorized subdirectories. Sprites are PNG files (loaded via SDL2_image), sounds are WAV files in assets/sounds/, and fonts are in assets/fonts/.

assets/
├── fonts/                  ← TrueType fonts
├── sounds/                 ← Audio files (see Sounds page)
│   ├── collectibles/
│   ├── entities/
│   ├── hazards/
│   ├── levels/
│   ├── player/
│   ├── screens/
│   ├── surfaces/
│   └── unused/
└── sprites/                ← PNG sprite sheets and textures
    ├── backgrounds/        ← Parallax background layers
    ├── collectibles/       ← Coins, stars
    ├── entities/           ← Enemy sprites
    ├── foregrounds/        ← Fog, water, lava, clouds
    ├── hazards/            ← Spike, saw, flame sprites
    ├── levels/             ← Level tilesets and themes
    ├── player/             ← Player sprite sheet
    ├── screens/            ← HUD, menu assets
    ├── surfaces/           ← Platforms, bridges, vines, etc.
    └── unused/             ← Reserve assets for future use

Coordinate note: All game objects use logical space (400x300). SDL scales to the 800x600 OS window 2x. A 48x48 sprite appears as 96x96 physical pixels on screen.


Per-Level Asset Configuration

Several visual elements are configurable per TOML level file, allowing different themes without changing code:

Floor Tile

floor_tile_path = "assets/sprites/levels/grass_tileset.png"

Any 48×48 PNG tile can be substituted here. The engine 9-slice renders it across FLOOR_Y to form the ground.

Parallax Background Layers

[[background_layers]]
path  = "assets/sprites/backgrounds/sky_blue.png"
speed = 0.0

[[background_layers]]
path  = "assets/sprites/backgrounds/glacial_mountains.png"
speed = 0.2

Layers are TOML array-of-tables and are drawn in array order (first = furthest back). speed is the parallax scroll factor: 0.0 = static sky, 1.0 = locks to camera, 0.10.5 = typical mid-ground parallax. Up to 8 layers are supported. See Level Design for the full list of available background images and suggested speeds.

Foreground Strip and Fog Layers

foreground_layers currently select the level foreground strip texture used by the water/lava renderer; the active runtime takes the last valid configured path. Atmospheric overlays are configured separately with fog_layers and loaded into the fog system.

[[foreground_layers]]
path  = "assets/sprites/foregrounds/water.png"
speed = 0.0

[[fog_layers]]
path = "assets/sprites/foregrounds/fog_1.png"

[[fog_layers]]
path = "assets/sprites/foregrounds/fog_2.png"

Currently Used Assets

Backgrounds — assets/sprites/backgrounds/

FileUsed ByDescription
sky_blue.pnglevels/00_sandbox_01.tomlStatic sky gradient backdrop
clouds_bg.pnglevels/00_sandbox_01.tomlBackground cloud layer
glacial_mountains.pnglevels/00_sandbox_01.tomlDistant mountains
clouds_mg_3.pnglevels/00_sandbox_01.tomlMidground cloud layer 3
clouds_mg_2.pnglevels/00_sandbox_01.tomlMidground cloud layer 2
clouds_lonely.pnglevels/00_sandbox_01.tomlSingle cloud layer
clouds_mg_1.pnglevels/00_sandbox_01.tomlForeground cloud layer
sky_fire.pnglevels/01_lugio_01.toml, 02_lugio_02.tomlVolcanic sky backdrop
sky_fire_lightened.pnglevels/01_lugio_01.toml, 02_lugio_02.tomlLightened volcanic sky variant
volcanic_mountains.pnglevels/01_lugio_01.toml, 02_lugio_02.tomlVolcanic mountain layer
volcanic_mountains_lightened.pnglevels/01_lugio_01.toml, 02_lugio_02.tomlLightened volcanic mountains
smoke_bg.png, smoke_mg_1.png, smoke_mg_2.png, smoke_mg_3.png, smoke_lonely.pngVolcanic levelsSmoke parallax layers

Foregrounds — assets/sprites/foregrounds/

FileUsed ByDescription
fog_1.pngfog_layers / fog.c (fog->textures[0])Fog overlay layer, semi-transparent sliding effect
fog_2.pngfog_layers / fog.c (fog->textures[1])Fog overlay layer, semi-transparent sliding effect
water.pngforeground_layers / water->texture384x64 sprite sheet, 8 frames of 48x64 with 16x31 art crop
lava.pngforeground_layers / water->textureLava-themed foreground strip
clouds.pngforeground cloudsDecorative cloud layer
fog_fire_1.png, fog_fire_2.png, smoke.pngVolcanic levelsFire fog / smoke overlay layers

Player — assets/sprites/player/

FileUsed ByDescription
player.pngplayer->texture192x288 sprite sheet, 4 cols x 6 rows, 48x48 frames

Entities — assets/sprites/entities/

FileUsed ByDescription
spider.pnggs->textures.spiderSpider enemy sprite sheet (ground patrol)
jumping_spider.pnggs->textures.jumping_spiderJumping spider enemy sprite sheet
bird.pnggs->textures.birdSlow sine-wave bird enemy sprite sheet
faster_bird.pnggs->textures.faster_birdFast aggressive bird enemy sprite sheet
fish.pnggs->textures.fishJumping fish enemy sprite sheet
faster_fish.pnggs->textures.faster_fishFaster fish enemy sprite sheet

Collectibles — assets/sprites/collectibles/

FileUsed ByDescription
coin.pnggs->textures.coin16x16 coin collectible sprite
star_yellow.pnggs->textures.star_yellowYellow star collectible sprite
star_green.pnggs->textures.star_greenGreen star collectible sprite
star_red.pnggs->textures.star_redRed star collectible sprite
last_star.pnggs->textures.last_starLast star goal collectible sprite

Hazards — assets/sprites/hazards/

FileUsed ByDescription
spike.pnggs->textures.spikeFloor/ceiling spike hazard
spike_block.pnggs->textures.spike_blockRail-riding rotating hazard sprite
spike_platform.pnggs->textures.spike_platformSpiked platform hazard sprite
circular_saw.pnggs->textures.circular_sawRotating saw blade hazard
axe_trap.pnggs->textures.axe_trapSwinging axe trap hazard
blue_flame.pnggs->textures.blue_flameBlue flame hazard sprite
fire_flame.pnggs->textures.fire_flameFire flame hazard sprite

Surfaces — assets/sprites/surfaces/

FileUsed ByDescription
float_platform.pnggs->textures.float_platform48x16 sprite, 3-slice horizontal strip (left cap, centre fill, right cap)
bridge.pnggs->textures.bridge16x16 single-frame brick tile for crumble walkways
bouncepad_small.pnggs->textures.bouncepad_smallSmall bouncepad sprite (low launch)
bouncepad_medium.pnggs->textures.bouncepad_mediumMedium bouncepad sprite (standard launch)
bouncepad_high.pnggs->textures.bouncepad_highHigh bouncepad sprite (max launch)
rail.pnggs->textures.rail64x64 sprite sheet, 4x4 grid of 16x16 bitmask rail tiles
vine_green.pnggs->textures.vine_green16x48 green climbable vine sprite
vine_brown.pnggs->textures.vine_brown16x48 brown climbable vine sprite
ladder.pnggs->textures.ladderClimbable ladder sprite
rope.pnggs->textures.ropeClimbable rope sprite

Levels — assets/sprites/levels/

FileUsed ByDescription
grass_tileset.pnggs->textures.floor_tile48x48 tile, 9-slice rendered across FLOOR_Y to form the floor
grass_platform.pnggs->textures.platform48x48 tile, 9-slice rendered as one-way platform pillars
stone_tileset.pngVolcanic levels48x48 stone floor tileset
stone_platform.pngVolcanic levelsStone platform pillar tile
grass_rock_tileset.png, grass_rock_platform.pngReserve / level themingGrass-rock floor/platform variants
brick_tileset.png, brick_platform.pngReserve / level themingBrick floor/platform variants
leaf_tileset.png, leaf_platform.pngReserve / level themingForest leaf floor/platform variants
cloud_tileset.pngReserve / level themingCloud tileset

Screens — assets/sprites/screens/

FileUsed ByDescription
hud_coins.pnghud.cCoin count UI icon used in the HUD
start_menu_logo.pngstart_menu.cGame logo displayed on the start menu screen

Fonts — assets/fonts/

FileUsed ByDescription
round9x13.ttfhud.c (hud->font)Bitmap font for score and lives text in the HUD

Player Sprite Sheet — player.png

Sheet dimensions: 192 x 288 px Grid: 4 columns x 6 rows Frame size: 48 x 48 px

Animation Row Map

RowAnimStateFrame CountFrame DurationNotes
0ANIM_IDLE4150 ms/frameSubtle breathing cycle
1ANIM_WALK4100 ms/frameLooping run cycle
2ANIM_JUMP2150 ms/frameRising phase poses
3ANIM_FALL1200 ms/frameDescent pose
4ANIM_CLIMB2100 ms/frameVine climbing cycle
5(unused)Available for future states

Frame Source Rect Formula

frame.x = anim_frame_index * FRAME_W;   // column x 48
frame.y = ANIM_ROW[anim_state] * FRAME_H; // row x 48

Horizontal Flipping

When player->facing_left == 1, the sprite is drawn with SDL_FLIP_HORIZONTAL via SDL_RenderCopyEx. This means the same right-facing animation frames are used for both directions — no duplicate assets needed.


Unused Assets

The following asset is stored in assets/sprites/unused/ and is not loaded by the game. It is available as a reserve for future use.

FileDescription
sky_background_0.pngSky gradient background

Additional background variants are stored alongside used backgrounds in assets/sprites/backgrounds/:

FileDescription
castle_pillars.pngCastle/dungeon pillar background
clouds_mg_1_lightened.pngLightened midground cloud variant
forest_leafs.pngForest leaf layer
glacial_mountains_lightened.pngLightened mountain variant
sky_blue_lightened.pngLightened sky variant

Additional tilesets are stored in assets/sprites/levels/:

FileDescription
brick_platform.pngBrick platform tile
brick_tileset.pngBrick wall / platform tile
cloud_tileset.pngCloud platform tile
grass_rock_platform.pngGrass + rock platform tile
grass_rock_tileset.pngGrass + rock mixed tileset
leaf_platform.pngLeaf / foliage platform tile
leaf_tileset.pngLeaf / foliage platform tile
stone_platform.pngStone platform tile
stone_tileset.pngStone floor / wall tile

Sprite Sheet Analysis

To inspect any sprite sheet’s exact dimensions and pixel layout:

python3 .agents/scripts/analyze_sprite.py assets/sprites/<category>/<sprite>.png

Frame Math Reference

Sheet width  = cols x frame_w
Sheet height = rows x frame_h

source_x = (frame_index % cols) * frame_w
source_y = (frame_index / cols) * frame_h

Loading an Asset

// In game_init or an entity's init function:
SDL_Texture *tex = IMG_LoadTexture(gs->renderer, "assets/sprites/collectibles/coin.png");
if (!tex) {
    fprintf(stderr, "Failed to load coin.png: %s\n", IMG_GetError());
    return -1;
}

// At cleanup (reverse init order):
if (tex) { SDL_DestroyTexture(tex); tex = NULL; }