view doc/art.md @ 37:a88effe4831e default tip

Added tag 1.0.0 for changeset a464bd43b76c
author ark
date 2026-10-21 22:36 +0200
parents a464bd43b76c
children
line wrap: on
line source

Art and sound
-------------

All drawings and voice recordings come from the artist. Files in art/
stay as supplied, apart from the files the cutting scripts write there.
The build writes processed copies to www/ (architecture.md). Drawing tips
for new items: dark outline, white or coloured inside, on white paper with
space around each item.


Scans
-----

The directory art/art_sources/ holds the scans the drawings were cut from.

- source_sheet.jpg: the original sheet with all sprites, maps, and the
  first numbers for damage, coins and starting coins (history.md). Map
  numbers on the sheet start at 1: M1 to M4 are map0 to map3
- source_sheet_2.jpg: the same sheet with the sprite outlines inked in
  black, and monster hit points and tower costs added. The script
  tools/cut_sheet.py cuts the sprites from it
- game_won.jpg, help_info.jpg, icons.jpg, icons_and_numbers.jpg,
  more_buttons.jpg, splash.jpg, upgrade_popup.jpg: scans of the screens,
  icons and buttons

On both sheets the towers t0 and t1 are swapped: the tower row runs t1,
t0, t2, t3, and the projectile row p1, p0, p2, p3.


Sprites
-------

| File       | What                                   | Source |
|------------|----------------------------------------|--------|
| m0-m4      | Regular monsters                       | cut_sheet.py |
| b0-b3      | Bosses, one per map                    | cut_sheet.py |
| t0-t3      | Towers, level 1                        | cut_sheet.py |
| t0p-t3p    | Towers, levels 2 to 5 side by side     | cut_sheet.py |
| p0-p3      | Projectiles of t0 to t3                | cut_sheet.py |
| hpm, hpb   | HP bars of monsters and bosses         | cut_sheet.py |
| c0-c3      | Coins                                  | Cut by hand from the first sheet |
| freeze     | t2 freeze splash, drawn where p2 lands | Supplied |
| monster_death, boss_death | Death puffs             | Supplied |

- Sprites cut by cut_sheet.py keep the sheet's scale: black outlines,
  transparent outside, white paper inside, drawn colour kept (bosses, HP
  bars)
- The t*p strips are cut from the same sheet as level 1, so the sizes
  follow on. The build splits them and fills any inside left transparent
  with white
- Level 5 of t3 is a different design from levels 1 to 4: a square with a
  barrel, not a triangle
- Monsters and bosses face the viewer and are never rotated or mirrored


Maps and masks
--------------

The files map0 to map3 are the map scans, with paper edges. Each map*mask
is the mask of the same map and lines up with it pixel for pixel.

Masks have hard edges. Every pixel is fully transparent or opaque pure
red, blue or green; the build stops on any other pixel.

- Red: the centre line the monsters walk, about 11 pixels wide, not the
  whole road. The road's half width is set per map in the config
- Blue: monster entrances
- Green: exits

Where the route extraction gets a map wrong, the mask is redrawn.


Screens, buttons and icons
--------------------------

| File                     | Use |
|--------------------------|-----|
| splash                   | Splash screen with title, byline and play button; opaque with white paper |
| splash_play              | Play button of the splash screen |
| wobbly_logo              | Logo left of the play button, opens the game's web page |
| help_splash              | Question mark right of the play button, opens the help popup |
| help_info                | Help popup |
| map_won, map_won_button  | Map won screen and its next button |
| game_lost, game_lost_button | Game lost screen and its button |
| game_won, game_won_button | Game won screen and its restart button, cut from game_won.jpg |
| coin_icon, heart, monster_icon | Top bar counters |
| help_button              | Help button in the top bar |
| play_button, pause_button | Pause button: pause while running, play while paused |
| speed_x1, speed_x2, speed_x4 | Speed button |
| sound_on, sound_off      | Sound button; sound_on also on the splash screen's sound button |
| next_wave                | Early start button, the countdown drawn on its right part |
| shop_bubble              | Shop item |
| shop_bubble_dark, shop_bubble_dark2 | Chosen shop item, in turn |
| tower_popup              | Bubble of the tower menu |
| upgrade_button, sell_button | Buttons in the tower menu |
| digits                   | Sheet of digits and a slash, several variants each |

- All are transparent outside, apart from splash
- The separate screen buttons are exact crops of the buttons in their
  screen drawings
- The script tools/cut_digits.py cuts digits.png into art/digits/: every
  drawing is one variant, named after the character and a number (0_1,
  0_2, ..., slash_1), scaled to the median height, paper transparent. The
  10, 11 and 12 on the sheet give single digits


Drawing direction
-----------------

Turning towers and projectiles are rotated to face their target. The
drawings are not consistent, even between levels of the same tower, so
each sprite's direction as drawn is set by hand in [art.angle]: 0 is right,
-90 is up. Sprites not listed there do not turn: t0, and p2, which is
round. The spike p0 is listed because each t0 spike is turned to point
outwards.

The whole tower sprite turns, base included. It turns around the centre of
the trimmed image, or around the point set in [art.pivot]; the turning
towers turn around the middle of their body.

The preview temp/preview/towers.png, written by the build, shows every
turning tower turned to face up, with its pivot. A wrong angle shows as a
barrel off the vertical guide line.


HP bars
-------

The bar is drawn cut to the share of hit points left, over a darkened copy
for the empty part. The bar hpm sits above every monster, hpb above the
boss. While t2 slows a monster its bar is blue: the build makes blue
copies of both bars by changing the colour of the green inside; the
outline stays as drawn.


Sound
-----

The voice recordings in art/sound_sources/ were made on a phone and are
named after their event. The script tools/cut_sounds.py turns them into
game sounds in art/sounds/; a recording with variants is split into
NAME_1, NAME_2 and so on, and the game picks one at random. The output is
mono MP3, which desktop and mobile browsers play. The intro recording
loses its first 3 s, which hold a burp, and gets a short pause at its end
for the loop.

The event name is the name of its recordings and its entry in
[sound.event], which sets its volume, an optional minimum time between two
plays, and the placeholder beep. Events without a recording play the beep.

| Event                | Name              | Sound |
|----------------------|-------------------|-------|
| t0 attack            | t0_attack         | Recorded, 4 variants |
| t1 shot              | t1_shot           | Recorded, 6 variants |
| t2 shot              | t2_shot           | Recorded, 4 variants |
| t3 shot              | t3_shot           | Recorded, 7 variants |
| Monster enters map   | monster_enter     | Recorded, 3 variants |
| Monster dies         | monster_die       | Recorded, 4 variants |
| Monster reaches exit | monster_exit      | Recorded |
| Boss enters map      | boss_enter        | Recorded |
| Boss reaches exit    | boss_exit         | Recorded |
| Boss dies            | boss_die          | Recorded |
| Map won              | map_won           | Recorded |
| Map lost             | map_lost          | Recorded |
| Splash screen music  | intro             | Recorded, loops |
| Monster hit          | monster_hit       | Beep |
| Coins arrive         | coins_arrive      | Beep |
| Wave starts          | wave_start        | Beep |
| Early start bonus    | early_bonus       | Beep |
| Tower built          | tower_built       | Beep |
| Tower upgraded       | tower_upgraded    | Beep |
| Tower sold           | tower_sold        | Beep |
| Placement refused    | placement_refused | Beep |
| Button tap           | button_tap        | Beep |

The beeps are accepted as they are.


Optional art
------------

Not needed for the game, possible additions:

- A t0 spike burst, if p0 alone does not read well as an attack
- Hit puffs
- A mark for a refused placement, in place of the red cross