Builder Manual Play
Builder Manual / Collectibles & Surfaces

ITEMS / Collectibles & Surfaces

Collectibles & Surfaces

Coins, stars, bouncepads, rails, float platforms, ropes, ladders, and vines.

Collectibles & Surfaces


Collectibles are items the player can pick up. Surfaces are interactive terrain the player can stand on, jump from, or climb. All positions are in logical pixels (400×300 space).


Collectibles

Coin

File: src/collectibles/coin.c / coin.h
Sprite: assets/sprites/collectibles/coin.png — 16×16 px display size
Pickup: AABB overlap with player. Plays gs->audio.coin on collection.

ConstantValueDescription
MAX_COINS64Coin slots in GameState
COIN_DISPLAY_W/H16Render size in logical px
COIN_SCORE100Points awarded per coin
SCORE_PER_LIFE1000Score threshold for a bonus life
[coins]
x = 46.0
y = 236.0   # top edge in logical pixels

Every 1000 points (10 coins) the player earns a bonus life. The score threshold is configurable via score_per_life in the level file.


Star Yellow

File: src/collectibles/star_yellow.c / star_yellow.h
Sprite: assets/sprites/collectibles/star_yellow.png — 16×16 px display size
Pickup: AABB overlap. Restores 1 heart (up to MAX_HEARTS). No score awarded.

ConstantValueDescription
MAX_STAR_YELLOWS16Slots in GameState
STAR_YELLOW_DISPLAY_W/H16Render size in logical px
[star_yellows]
x = 272.0
y = 108.0

Star Green

File: src/collectibles/star_green.h
Sprite: assets/sprites/collectibles/star_green.png — 16×16 px
Pickup: Same as star yellow — restores 1 heart.

[star_greens]
x = 500.0
y = 80.0

Star Red

File: src/collectibles/star_red.h
Sprite: assets/sprites/collectibles/star_red.png — 16×16 px
Pickup: Same as star yellow — restores 1 heart.

[star_reds]
x = 800.0
y = 100.0

Last Star

File: src/collectibles/last_star.c / last_star.h
Sprite: assets/sprites/collectibles/last_star.png
Display size: 24×24 px
Pickup: Collecting it sets collected = 1, snapshots the level-completion summary, and shows the completion overlay. If next_phase is configured, Enter/Space/Start loads that TOML level; otherwise confirmation exits. Esc/Back exits without advancing. Only one instance per level, defined with [last_star].

ConstantValueDescription
LAST_STAR_DISPLAY_W/H24Render size in logical px
[last_star]
x = 1492.0
y = 100.0

Surfaces

Platform (Ground Pillar)

File: src/surfaces/platform.c / platform.h
Sprite: assets/sprites/levels/grass_platform.png — 48×48 tile, 9-slice rendered
Behaviour: Static ground pillar. The player can land on the top surface. Pillars are positioned on the floor and extend upward. Rendered before the floor so the pillar base sinks into the ground naturally.

[platforms]
x           = 80.0   # left edge in logical pixels
tile_height = 2      # height in 48px tiles (1–3)
tile_width  = 1      # width in 48px tiles (usually 1)

Top surface Y for a pillar: FLOOR_Y − (tile_height × TILE_SIZE) = 252 − (h × 48).

tile_heightTop YTypical use
1204Step / obstacle
2156Standard platform — medium bouncepads clear this
3108Tall — only reachable via high bouncepad or vine

Float Platform

File: src/surfaces/float_platform.c / float_platform.h
Sprite: assets/sprites/surfaces/float_platform.png — 48×16 px, 3-slice (left cap | centre fill | right cap)
Behaviour: Hovering one-way surface. Player lands on the top face only (one-way collision — can jump through from below). Three modes:

ModeBehaviour
STATICFixed position, never moves
CRUMBLEBegins falling after player stands on it for 0.75 s
RAILTravels along a rail path at constant speed
ConstantValueDescription
MAX_FLOAT_PLATFORMS16Slots in GameState
FLOAT_PLATFORM_PIECE_W16Width of each 3-slice piece
FLOAT_PLATFORM_H16Platform height in px
CRUMBLE_STAND_LIMIT0.75 sTime before crumble fall starts
CRUMBLE_FALL_GRAVITY250 px/s²Downward acceleration during fall
[float_platforms]
mode       = "STATIC"   # "STATIC" | "CRUMBLE" | "RAIL"
x          = 172.0
y          = 200.0
tile_count = 4          # width in 16px pieces
rail_index = 0          # RAIL mode only: index into [rails]
t_offset   = 0.0        # RAIL mode only: starting position on rail
speed      = 0.0        # RAIL mode only: traversal speed in tiles/s

Bridge

File: src/surfaces/bridge.c / bridge.h
Sprite: assets/sprites/surfaces/bridge.png — 16×16 px brick tile
Behaviour: Tiled crumble walkway. Bricks fall individually when the player walks over them, creating a time-limited path. After falling they respawn when the player moves away.

ConstantValueDescription
MAX_BRIDGES16Bridge slots in GameState
MAX_BRIDGE_BRICKS16Maximum bricks in one bridge
BRIDGE_FALL_DELAY0.2 sDelay before first touched brick falls
BRIDGE_CASCADE_DELAY0.06 sExtra delay per neighbouring brick
[bridges]
x           = 1350.0
y           = 172.0
brick_count = 8   # number of 16×16 brick tiles

Bouncepad

File: src/surfaces/bouncepad.c / bouncepad.h
Sprites: bouncepad_small.png, bouncepad_medium.png (wood), bouncepad_high.png
Sheet: 144×48 px, 3 columns × 1 row — Frame 0: extended, Frame 1: mid-compress, Frame 2: compressed (default idle state)
Behaviour: Spring pad that launches the player upward on landing. Plays a 3-frame squash/release animation (2→1→0, 80 ms/frame) then resets to idle.

ConstantValueDescription
BOUNCEPAD_W/H48Display size in logical px
BOUNCEPAD_VY_SMALL−380.0Launch impulse for green pad
BOUNCEPAD_VY_MEDIUM−536.25Launch impulse for wood pad
BOUNCEPAD_VY_HIGH−700.0Launch impulse for red pad
BOUNCEPAD_FRAME_MS80ms per animation frame during release
BOUNCEPAD_SRC_Y14Art starts at row 14 (transparent above)
BOUNCEPAD_SRC_H18Art height = rows 14–31
BOUNCEPAD_ART_X16Art starts at col 16 (transparent outside)
BOUNCEPAD_ART_W16Hitbox width = cols 16–31
MAX_BOUNCEPADS_SMALL16Small bouncepad slots
MAX_BOUNCEPADS_MEDIUM16Medium bouncepad slots
MAX_BOUNCEPADS_HIGH16High bouncepad slots
[bouncepads_small]
x         = 734.0
launch_vy = -380.0
pad_type  = "GREEN"

[bouncepads_medium]
x         = 310.0
launch_vy = -536.2
pad_type  = "WOOD"

[bouncepads_high]
x         = 1420.0
launch_vy = -700.0
pad_type  = "RED"

Rail

File: src/surfaces/rail.c / rail.h
Sprite: assets/sprites/surfaces/rail.png — 64×64 px, 4×4 grid of 16×16 bitmask tiles
Behaviour: A path of interconnected tiles that spike blocks and float platforms ride along. Each tile has a bitmask of connection directions (N/E/S/W) that drives the correct sprite selection. Objects riding a rail store a float t ∈ [0, tile_count) and call rail_get_world_pos() each frame.

ConstantValueDescription
RAIL_N/E/S/W1/2/4/8Connection bitmask flags
RAIL_TILE_W/H16Tile size in the sprite sheet
MAX_RAIL_TILES128Max tiles per Rail instance
MAX_RAILS16Rail instances in GameState
[rails]
layout  = "RECT"   # "RECT" = closed rectangle | "HORIZ" = open horizontal line
x       = 444      # top-left tile x
y       = 35       # top-left tile y
w       = 10       # width in tiles
h       = 6        # height in tiles
end_cap = 0        # 0 = open end (rider detaches), 1 = bouncing end

Vine

File: src/surfaces/vine.c / vine.h
Sprites: assets/sprites/surfaces/vine_green.png, assets/sprites/surfaces/vine_brown.png — 16×48 px per tile
Behaviour: Climbable vertical surface. The player enters by touching the vine and pressing Up or Down. Press Left/Right to detach and jump away.

[vines]
x          = 88.0
y          = 172.0   # top tile y in logical pixels
tile_count = 2       # height in tiles (each tile = 16 px wide × 48 px tall)

Ladder

File: src/surfaces/ladder.c / ladder.h
Sprite: assets/sprites/surfaces/ladder.png
Behaviour: Climbable ladder. The player enters by pressing Up at the base. Climbing is done with Up/Down. Jump or move left/right to exit.

ConstantValueDescription
MAX_LADDERS16Ladder slots in GameState
LADDER_W/H16×22Cropped climbable art size
LADDER_STEP8Vertical overlap when tiling
[ladders]
x          = 1552.0
y          = 0.0       # top tile y
tile_count = 30        # height in tiles

Rope

File: src/surfaces/rope.c / rope.h
Sprite: assets/sprites/surfaces/rope.png
Behaviour: Climbable rope. Same interaction model as the vine — touch and press Up to grab, Up/Down to climb, Left/Right to swing off.

ConstantValueDescription
MAX_ROPES16Rope slots in GameState
ROPE_W/H16×36Cropped climbable art size
ROPE_SRC_X/Y/W/H0 / 6 / 16 / 36Source crop from the 16×48 sprite
ROPE_STEP23Vertical spacing for stacked rope tiles
[ropes]
x          = 460.0
y          = 172.0
tile_count = 1