PLATFORM-SHOOTER FOR PSP - MODDING GUIDE
========================================

  1. ENGLISH
  2. ESPAÑOL (más abajo)


===========================================================================
1. ENGLISH
===========================================================================

Everything here is changed with files next to EBOOT.PBP, without touching
the game itself: pictures, sounds, levels, the rules, languages, the title
screen phrases and the font.


PACKS (resource packs)
----------------------
A pack is a folder inside resourcepacks/ with:

    pack.txt      its name, description and options (see below)
    pack.png      its icon in the menu (64x64 looks best)
    rules.txt     how the game plays: life, jump, speeds... (see RULES)
    textures/     the PNG pictures it changes, in folders (see THE PICTURES)
    texts/        its texts; texts/splashes.txt are the title screen
                  phrases (see TITLE SCREEN PHRASES)
    sounds/       the WAV sounds it changes, and in sounds/music/ its
                  music (see MUSIC)
    levels/       the levels it changes or adds
    blocks/       materials for the solid squares (see MATERIALS)

Choose them in OPTIONS > TEXTURE PACKS:
    ✕     turn the selected pack on/off
    L/R   raise/lower its priority
    △     details: what the pack changes and what is wrong in it
    ○     go back (the pictures and sounds load then)
The game lists up to 16 packs in resourcepacks/. With more, it keeps the
active ones and "original", then the rest by folder name, and the help
line says how many are left out: remove the ones you don't use.
The "original" pack is the TEMPLATE: it has the game's own files, to copy
and change (see below), so it can't be turned on.
From the pause menu, the packs that change how the game plays (levels,
enemies or rules) can't be turned on or off: do it from the main menu.
The ones that only change pictures, sounds or phrases can. The game sees
it by itself: levels and rules left as in the template (the game's own)
don't count.
Up to 8 packs can be on at once. If two of them change the same file, the
one higher in the list wins. A pack does not need every file: the missing
ones come from the packs below it or from the game itself. The game checks
the packs in the background the first time the screen opens: while it does,
a pack says "Checking..." instead of its warnings. It remembers the results
on the memory stick, so a pack is only checked again when one of its files
changes or with a new version of the game; meanwhile the screen shows the
last results.

EXAMPLES
  Each version of the game brings finished packs that show what it
  added, to look at and copy from. This one (0.6.0):
  resourcepacks/sample_temple (switches, colour blocks, keys and doors)
  and sample_fortress (coins, extra lives, a health bar with phases). Both
  have their own material (blocks/), music (sounds/music/), enemies, an
  NPC that talks and texts in every language, and are played with their
  own levels. They are made with AI, only as examples: they are not part of
  the original game.

TO MAKE YOUR OWN PACK
  1. Inside the resourcepacks folder, copy the "original" folder and paste
     it in the same place (inside resourcepacks), with another name: for
     example resourcepacks/mypack. Don't copy the resourcepacks folder
     itself.
  2. Edit pack.txt (name, description, author and version) and pack.png
     (icon). In texts/splashes.txt, write your title screen phrases.
  3. Edit, in textures/, sounds/ and levels/, the files you want to change
     and delete the others (or keep them, they are the original ones). In
     rules.txt, change the rules you want.
  4. In the game, turn the pack on in OPTIONS > TEXTURE PACKS. If it shows
     WARNINGS, press △ to see them.

pack.txt (UTF-8 text; Notepad is fine)
  One name and one description, the same in every language of the game:
  name = My pack                     the name
  description = A short line         the description
  author = Your name                 who made the pack
  version = 1.0                      the version of your pack: raise it
                                     each time you update it (1.1, 2.0...)
  game_version = 0.6.0-alpha         the version of the game you made it
                                     with (it is in the title of the game
                                     in the PSP menu). An older version
                                     of the game shows the pack as
                                     INCOMPATIBLE and can't turn it on.
                                     What the pack uses decides how new
                                     it must be: enemies and maps need
                                     0.3.0, NPCs 0.4.0, big levels and
                                     texts/ 0.5.0 (the packs screen
                                     tells you).
  pixelated = yes                    yes: sharp pixels (pixel art)
                                     no: smooth, like the original game
  own_levels = yes                   yes: only the packs' levels are
                                     played (from its level1.txt), not
                                     the game's 1-6. Without it, a pack's
                                     levels replace or follow the game's.
  type = mod                         mod: the pack changes the game, so
                                     it can only be turned on or off from
                                     the main menu, not from the pause
                                     (even if it only has pictures).
                                     textures: a texture pack. Without
                                     it, the game decides by what the
                                     pack has (levels, enemies or rules
                                     make it a mod).
  Lines starting with # are comments. Without pack.txt, or without a name,
  the folder name is used. The Spanish keys also work (nombre,
  descripcion, autor, version, version_juego, pixelado = si,
  tipo = texturas / mod, niveles_propios = si). The packs made before
  0.5.0 said format = 1 to 4 instead: it still works.
  OPTIONS > TEXTURE PACKS shows the version next to the name, and △ shows
  the version, the author and the game version under the name.

PACKS FOR SEVERAL CONSOLES
  The same pack works in every version of platform-shooter (PSP and future
  ports). To change something only on the PSP, put it in textures_psp/,
  sounds_psp/ or levels_psp/ inside the pack: it wins over textures/,
  sounds/ and levels/ of that pack. Folders of other consoles
  (textures_3ds/...) are ignored.


THE PICTURES (folder textures/)
-------------------------------
  Since 0.5.1 the pictures are in folders. The names of before
  (enemy.png, background_level1.png... loose in textures/) still work; if
  a pack has both, the folder one wins.

  File (in textures/)              Is                   Original  PSP 1:1  HD
  entity/player/left.png           player, looking left 60x53*    60x53    120x106
  entity/player/right.png          player, looking right 60x53*   60x53    120x106
  entity/player/shooting_right.png player shooting right 96x85*   96x85    192x170
  entity/player/shooting_left.png  player shooting left 96x85*    96x85    192x170
  entity/enemy.png                 walking enemy        32x32     24x18    48x37
  entity/shooter.png               shooting enemy       32x32     72x54    144x109
  entity/projectiles/bullet.png    bullets              32x32     24x18    48x37
  entity/wheel.png                 spinning wheel (kills) 32x32   60x45    120x91
  entity/flag.png                  level exit flag      28x60     72x97    145x194
  entity/items/switch.png          switches: off | on   32x16 (5) 48x18    96x37
  entity/items/block.png           colour blocks        16x16 (5) 24x18    48x37
  entity/items/key.png             keys                 16x16 (5) 24x18    48x37
  entity/items/door.png            doors                16x16 (5) 24x18    48x37
  entity/items/coin.png            coins                16x16     24x18    48x37
  entity/items/life.png            extra lives          16x16     24x18    48x37
  block/floor_top.png              top row of the ground 32x32    24x18    48x37 (**)
  block/floor.png                  the ground, below it 32x32     24x18    48x37 (**)
  block/platform.png               floating platforms   32x32     24x18    48x37 (**)
  block/wall.png                   walls (vertical)     32x32     24x18    48x37 (**)
  environment/level1.png ... environment/level6.png
                                   level backgrounds    640x480   480x272  480x272
  gui/menu_background.png          every menu           640x480   480x272  480x272
  gui/title/background.png ...     one menu only (***)  640x480   480x272  480x272
  gui/sprites/widget/button.png    the menus' buttons   48x48     -        48x48
  gui/sprites/widget/button_highlighted.png
                                   the chosen button (****) 48x48 -        48x48
  gui/sprites/icon/gear.png        the gear of the pause 64x64    -        64x64
  gui/dialog.png                   the NPCs' text box   48x48     -        48x48
  font/triangle.png                △ in the texts       64x64     -        64x64
  font/circle.png                  ○ in the texts       64x64     -        64x64
  font/square.png                  □ in the texts       64x64     -        64x64
  font/cross.png                   ✕ in the texts       64x64     -        64x64
  (*  since 0.6.0 the player is pixel art, shown pixel by pixel; before,
      it was a drawing of 558x658 and 116x137. The shooting picture is
      the standing one with the arm raised: the same body, pixel by pixel,
      13 pixels from the left and 37 from the top, so nothing but the arm
      changes when it shoots)
  (*** gui/title/background.png, gui/options/background.png,
       gui/packs/background.png, gui/controls/background.png and
       gui/inworld_menu_background.png (the pause): optional, for a menu
       that needs a picture of its own. In a pack it wins over its
       gui/menu_background.png; a higher pack's gui/menu_background.png
       wins over it. The CREDITS use the CONTROLS one)
  (**** optional: without it, the chosen button gets a yellow frame)
  (5 0.6.0: white and grey; the game paints them red, blue, green or
      yellow. The switch is two pictures side by side: off and on. See
      SWITCHES, KEYS AND COINS)
  (** one square, repeated over each solid block like tiles. The game
      tells them apart: a block taller than wide is a wall; the lowest
      layer of the level, and what stands on it (steps), is the ground;
      the other blocks, floating, are platforms. The top row of the
      ground (grass, for example) is floor_top.png and the rest of it
      floor.png (dirt). Without floor_top.png or platform.png, floor.png
      is used; without floor.png, wall.png)

  OLD NAMES (before 0.5.1, loose in textures/)
    player_left.png, player_right.png, player_shooting_left.png,
    player_shooting_right.png, enemy.png, shooter.png, bullet.png,
    wheel.png, flag.png, floor_top.png, floor.png, platform.png,
    wall.png, background_level1.png ... background_level6.png,
    background_menu.png, background_title.png, background_options.png,
    background_packs.png, background_controls.png, background_pause.png,
    button.png, gear.png, dialog.png, button_triangle.png,
    button_circle.png, button_square.png, button_cross.png

  WHICH SIZE TO DRAW
  - "PSP 1:1" is the exact size of each picture on the PSP screen (at the
    biggest it is shown in the levels). A picture of that size is shown
    pixel by pixel, without resizing: the best for pixel art (with
    pixelated = yes in pack.txt).
  - "HD" is twice that, and the size that looks best: the game only
    reduces it to half, never enlarges it, so the edges come out smooth
    and the small details clean.
  - Smaller than 1:1 works, but the game enlarges it and it looks blurry.
    Bigger than HD is reduced to HD when loading: it only takes memory.
  - The PSP screen is wider than the original game (640x480 is shown in
    480x272), so everything is a bit flatter: a square of the original is
    24x18 on the PSP. The sizes of the table already count it: draw on a
    canvas of that size and the result is exactly what is seen.
  - Inside its picture the drawing is free: style, colours, details,
    outlines, transparency. Only keep each character about the same size
    and in the same place of its picture as the original (where its feet,
    body and hand are), so it stands on the floor and holds the gun where
    the game expects. The pictures never change the collisions.

  - Any size works: each picture is stretched to the place of the original
    one. Keep the same proportions and the drawing in the same place of the
    image, or it will look moved or squashed.
  - Limit: 480,000 pixels per picture (800x600, for example), and 2048 on
    each side. Bigger pictures are not loaded, so the PSP-1000 doesn't run
    out of memory.
  - Transparent parts of the PNG are transparent in the game.
  - Changing a picture NEVER changes the collisions: the game plays the same.
  - What collides is a rectangle: the place of the original drawing
    inside each picture. Draw your character filling it, and what is seen
    is what collides. In percent of the picture (from the left and
    from the top), so it works at any size:
      player_right.png           x 38% to 70%, y 0% to 92%
      player_left.png            x 30% to 62%, y 0% to 92%
      player_shooting_*.png      the feet at the bottom and the body in the
                                 middle (50%); the gun at 79% (right) or
                                 21% (left) across and 61% down
      shooter.png                x 25% to 59%, y 34% to 100%
      bullet.png                 x 3% to 25%, y 78% to 100%
      enemy, wall, wheel, flag   the whole picture
    The rectangle doesn't turn with the picture (the wheel), and the
    transparent parts inside it also collide.
  - The player of a pack made before 0.6.0 (game_version older, or none)
    keeps the boxes of before: player_right.png x 20% to 92%, y 4% to 91%;
    player_left.png x 8% to 80%, y 4% to 91%; and the gun of the shooting
    pictures at 85% (right) or 15% (left) across and 70% down.
  - The button symbols (button_*.png) are drawn as tall as the letters of
    the text they are in, keeping their proportions: square is best.
  - The menu buttons have no text in their pictures: the game writes it in
    the chosen language.
  - Since 0.5.1 the menus' backgrounds are only the background: the game
    draws every button with button.png and writes its word on it.
    button.png is drawn in 9 parts: its corners as they are and its edges
    and middle stretched to each button (48x48 is best, 192x192 at most).
    gear.png is the white gear of the pause, drawn on its button.
  - A pack made before 0.5.1 (an older game_version, or none) without its
    own button.png has the buttons painted on its menus: the game draws
    no buttons over its title and pause backgrounds, so they look as
    before. Its options background isn't used: the options have other
    buttons since 0.5.1.


THE SOUNDS (folder sounds/)
---------------------------
  File           Is
  click.wav      menu buttons
  death.wav      the player dies

  - Format: WAV, uncompressed PCM, 8 or 16 bit, mono or stereo, from 8000
    to 48000 Hz. The game converts it to 16-bit mono at 44100 Hz.
    (Audacity: File > Export > WAV, "Signed 16-bit PCM".)
  - Shorter than 10 seconds.
  - MP3, OGG and compressed or floating point WAV files are not read.


MUSIC (folder sounds/music/, game 0.6.0)
----------------------------------------
  The game itself has no music: a pack brings it.

  File                      Plays
  sounds/music/menu.ogg     in the menus (title screen, options, packs,
                            controls)
  sounds/music/game.ogg     in the levels
  sounds/music/<any>.ogg    in a level that says music = <any>.ogg

  - Format: OGG Vorbis, mono or stereo, from 8000 to 48000 Hz (44100 Hz
    is best: it isn't converted). Any length: it is read little by
    little and starts again at the end. (Audacity: File > Export > OGG.)
  - The pause stops it, and it goes on where it was.
  - Its volume is OPTIONS > MUSIC.
  - Like the other files, the highest active pack that has it wins.
  - Packs made with game 0.6.0: game_version = 0.6.0-alpha in pack.txt.


LEVELS (folder levels/)
-----------------------
A pack can change the levels and add new ones. Each level is a text file:
levels/level1.txt ... level6.txt replace the game's levels, and level7.txt,
level8.txt... are played after the 6th (up to level99.txt, without gaps:
level8.txt is only played if there is a level7.txt). The template
(resourcepacks/original/levels/) has the 6 levels of the game written this
way: copy one and change it.
A level can be written in two ways, even both in the same file: drawn as a
map (the easy one) or one line per object (to place things exactly).

THE EASY WAY: DRAW IT
  Write "map:" and, under it, draw the level with letters, one per square.
  A screen is 20 squares wide and 15 tall (each square is 32x32 pixels).
  A level can be bigger: up to 100 squares wide and 60 tall (see BIG
  LEVELS below). This one is one screen:

    background = environment/level2.png
    text = Jump to the flag!

    map:
    ....................
    ....................
    ....................
    ....................
    ....................
    ...........###......
    ...........###......
    ....................
    ....................
    ....................
    ..P...............F.
    ####################
    ####################

    #   solid: ground, platforms and walls (the game draws each one with
        its picture: floor_top.png and floor.png, platform.png or wall.png)
    1-9 solid, of a material: 1 is the game's grass (see MATERIALS)
    P   where the player starts (only one)
    F   the flag: the exit (at least one)
    E   walking enemy (kills)
    S   shooting enemy (3 squares wide and tall: leave room above it)
    W   spinning wheel (kills)
    ! % ~ & | * +   switch, blocks, key, door, coin and extra life (see
        SWITCHES, KEYS AND COINS)
    .   empty (a space too)

  - Under "map:" every line is a row, from the top: there "#" is a wall,
    not a comment. Put the options (background, text...) above "map:".
  - Missing rows at the bottom and missing squares at the end of a row are
    empty. Falling below the bottom row kills; the left, the top and the
    right are closed.
  - Any other letter is an enemy of the active packs (see ENEMIES).
  - The player is about 1 square wide and 3 tall: leave room above P.
  - Jumping, the player goes up about 3 squares and across about 4:
    steps of 2 squares and gaps of 3 are comfortable.
  - Where the player jumps from, nothing solid may be just above it: in a
    climb that zigzags, leave 1 free square between the platforms.
  - The player shoots at the height of its hand: an enemy that must be
    defeated (lock_exit, or S) has to be somewhere the player can stand
    at its height and see it. On the ground, an enemy of the packs that
    is to be shot needs size = 1.8 or more (the gun is about 1.9 squares
    high; with the player of a pack made before 0.6.0, 1.3: size = 1.5).
  - To add a level: copy a level file with the next number (level7.txt,
    level8.txt...) and draw it.

BIG LEVELS (game 0.5.0)
  Draw longer rows or more rows: the level is as wide as its longest row
  and as tall as its rows (at least one screen, 20x15; at most 100x60).
  - The view is the same as always (20x15 squares) and follows the
    player: a bit ahead of where it looks, and up or down when it lands
    on another height. It never shows outside the level.
  - The background is drawn screen after screen and moves slower than the
    level (parallax).
  - Falling below the last row kills; the left, the top and the right are
    closed, as in a level of one screen.
  - What is outside the view isn't drawn, so long levels don't slow the
    game down. Enemies, wheels and characters that are far from the view
    sleep (from 0.6.1): they don't move or shoot until the view comes near
    again. "Far" is at least half a screen away from the view, and as far as
    the longest sight (sight =) of the enemies in the level, so an enemy that
    could see the player is always awake. They still exist: an enemy with
    lock_exit = yes that is asleep keeps the exit shut. A level of one screen
    (the original ones too) is not affected.
  - A pack with a big level needs game_version = 0.5.0 or newer in its
    pack.txt (the template's already says it).

THE EXACT WAY: ONE LINE PER OBJECT
One line per object, with its place in the level (640x480 pixels, x to the
right, y downwards; in a big level drawn as a map, the whole map):

    name  x  y  [scale_x  scale_y  [angle]]

  Object      Is                           Normal size
  player      where the player starts      71x84 (only one)
  wall        floor, platforms and walls   32x32
  enemy       walking enemy (kills)        32x32
  shooter     shooting enemy               32x32
  wheel       spinning wheel (kills)       32x32
  flag        the exit (at least one)      28x60

  - x and y are the top left corner (the wheel: its centre).
  - After the numbers, options of that object (game 0.4.0):
      flag 529 209 2 2 hide        the flag hides (and the exit stays
                                   closed) until the shooting enemies are
                                   defeated, like in the original level 6
      shooter 288 224 3 3 no_shoot this shooting enemy doesn't shoot (also
                                   for the pack's enemies that shoot)
    In Spanish: esconder, no_dispara. Without hide, a flag is always there
    (in a pack made for 0.3.0 or before, the flags of
    its shooting levels still wait, as they did then).
  - Scale 1 is the normal size: a wall 640 wide and 64 tall at the bottom
    is "wall 0 416 20 2". A negative scale grows to the left or upwards.
  - Numbers with a dot: 1.5, not 1,5. Lines starting with # are comments.
  - Up to 1000 objects. The player dies falling below the level (y 480
    in a level of one screen).

Options (lines with =):
  background = environment/level3.png
                             the background: one of the game's
                             (environment/level1.png ... level6.png) or a
                             PNG of the pack's textures/ (640x480 or with
                             that shape).
                             Without it, the level's own (after the 6th,
                             level 6's).
  music = forest.ogg         (0.6.0) its music, in sounds/music/ of the
                             packs. Without it, or if no pack has it:
                             game.ogg.
  blocks = grass             (0.6.0) the material of its # and walls
                             (see MATERIALS). Without it, their pictures
                             (floor.png...); the game's levels are grass.
  shooting = yes             yes or no: R shoots. Without it: yes from
                             level 6 on. (The exit only waits for the
                             shooting enemies if its flag has hide.)
  switch = talk              (0.6.0) how its switches are used, and
  switch_mode, switch_time,  what they do (see SWITCHES, KEYS AND COINS)
  exit_switch
  text = Hello\nhow are you  a text panel (\n: new line); the same in
                             every language, or "@KEY" to translate it
  text_exit = ...            the text once the exit opens
  text_y = 6                 height of the panel (0: at the top)
  "@KEY" as a text is the text of that key in the pack's texts/ files,
  in the language of the game (see THE TEXT FILES): text = @WELCOME and,
  in texts/en.txt, WELCOME = Welcome!. The original levels do it too
  (@TUTORIAL in level1.txt, in resourcepacks/original/texts/).
  The Spanish words also work (jugador, pared, enemigo,
  enemigo_que_dispara, rueda, bandera, fondo, disparo = si, texto,
  texto_salida, texto_y, bloques).

  A level without a player or a flag isn't played (the pack below's, or
  the game's, is used). The WARNINGS (△) say what is wrong and in which
  line.


SWITCHES, KEYS AND COINS (game 0.6.0)
--------------------------------------
Pieces that open the way, drawn in the map with their symbol:

    !   switch: △ (the talk button) next to it turns on its colour
    %   block that appears while its colour is on (solid then)
    ~   block that disappears while its colour is on
    &   key: the player takes it...
    |   ...and a door of its colour opens with △ when the player stands
        against it with one (a key opens one door: all the | joined
        together). A hint with △ shows over what it would use
    *   coin: the game counts them, level after level (top left of the
        screen, once there are any)
    +   extra life: the next thing that would kill the player (not a
        fall) doesn't; it blinks for 1.5 s. Up to 3

  There are 4 colours: red, blue, green and yellow. A piece is red unless
  "colors:" says otherwise: under the map, write "colors:" and then the
  same rows again, with a colour's letter over each piece that isn't red
  (r red, b blue, g green, y yellow; in Spanish also a azul, v verde, m
  amarillo). The other squares can have anything (a dot, for example):

    map:
    ..........|.......
    P.!...%...|...&..F
    ##################
    colors:
    ..........y.......
    ..b...b...y...y...

  The blue switch makes the blue % appear; the yellow key opens the
  yellow door. The level's options say how its switches work:

  switch = talk              talk: △ next to it (without the line);
                             touch: the player touches it; shoot: a shot
                             hits it
  switch_mode = toggle       toggle: on and off each time; once: it
                             stays on; timer: on for switch_time seconds
  switch_time = 5            the seconds of a timer switch (0.5 to 600)
  exit_switch = red          the exit (the flags) waits for the switch of
                             that colour

  - A block that has to appear waits while the player or an enemy is in
    its square.
  - Dying starts the level again: switches off, keys and coins back.
    The coins and extra lives of the levels finished before are kept: the
    next level starts with them. A new game starts with none.
  - The pause keeps everything as it was: switches, timers, keys, coins.
  - Their pictures are entity/items/ (see the table of pictures): the
    switch, the block, the key and the door are white and grey, and the
    game paints them in each colour.
  - In object lines: "switch 64 96 blue" (switch, block_on, block_off,
    key, door, coin, life; x and y are the top left of its square).
  - The Spanish words also work (interruptor = tocar / disparar / hablar,
    modo_interruptor = una_vez / alternar / tiempo, tiempo_interruptor,
    salida_interruptor = rojo / azul / verde / amarillo; interruptor,
    bloque_aparece, bloque_desaparece, llave, puerta, moneda, vida).
  - A pack that uses them needs game_version = 0.6.0.


MATERIALS (folder blocks/, game 0.6.0)
--------------------------------------
The solid squares of a map can be of a material: grass, stone, ice... Each
material is ONE picture with all its pieces, and the game chooses, square
by square, the piece that fits the squares around it (an edge, a corner,
the inside...). The game has its own: grass, symbol 1.

TO MAKE A MATERIAL
  1. In your pack, make the folder blocks/, and in it one folder for the
     material, with its name: blocks/stone/.
  2. Draw its picture, tiles.png: 5 columns and 3 rows of pieces, each
     one a square of the map. Best at 240x111 (pieces of 48x37, the HD
     size), or 120x55 (24x18, the PSP's pixels). Copy the game's,
     resourcepacks/original/blocks/grass/tiles.png, and paint over it:

       top-left      top           top-right     platform      inner
       corner        edge          corner        left end      corner left
       left side     inside        right side    platform      inner
                                                 middle        corner right
       bottom-left   bottom edge   bottom-right  platform      inner
       corner                      corner        right end     corners both

     Columns 1-3: a block 2 or more squares tall. Column 4: a platform 1
     square tall. Column 5: where the block goes on up beside a taller one
     (solid above and to both sides, air on the diagonal above): the
     grass of the top meets the wall there.
     Each piece must look right on its own, next to any other.
  3. Write blocks/stone/block.txt:

       symbol = 2
       picture = tiles.png

     symbol is its number in the maps, from 1 to 9 (1 is the game's
     grass: a pack's material with 1 takes its place). picture is
     tiles.png if it doesn't say.
  4. Draw it in a map with its number (2), or make it the material of the
     level's # and walls with "blocks = stone".
  - Squares of different materials touching each other fit as one block.
    Below the bottom row and past the sides of the level count as solid.
  - A pack's blocks/grass/ replaces the game's grass, also in its levels.
  - If an enemy of the packs uses the same letter (2), the enemy wins: the
    material can still be used with blocks =.
  - A pack whose maps use materials needs game_version = 0.6.0 or newer.


ENEMIES (folder enemies/)
-------------------------
A pack can bring its own enemies, built from pieces: how they move, how
they shoot, their life... Nothing to program: a text file and a picture.
A pack with enemies (or levels drawn as a map) needs game_version 0.3.0 or
newer in its pack.txt.

TO MAKE AN ENEMY
  1. In your pack, make the folder enemies/, and in it one folder for the
     enemy with its name (letters, numbers and _): enemies/slime/
  2. Draw it in a PNG in that folder, slime.png, looking to the right (the
     game turns it when it goes left). For an animation, put the pictures
     (frames) one after the other from left to right, all the same size.
     Best size: 48x37 pixels per frame for an enemy of 1 square, 96x74 for
     one of 2 squares...
  3. Write enemies/slime/enemy.txt:

       name = Slime
       letter = M
       picture = slime.png
       frames = 2
       move = patrol
       speed = 1.5
       life = 2
       stomp = yes

  4. Put its letter (M) in the map of a level, where it starts.
  5. Turn the pack on. △ says if something is wrong, line by line, and how
     many enemies the pack has.

THE PIECES (enemy.txt)
  name = Slime         its name (only for you)
  letter = M           its letter in the maps: a letter or a number that
                       isn't P, E, S, W or F (M and m are different)
  picture = slime.png  its picture, in its folder
  frames = 1           pictures of its animation in the PNG (1 to 16)
  size = 1             its size in squares, 0.5 to 4 (it stands on its
                       square of the map, centred)
  move = walk          how it moves:
                         still    it doesn't move
                         walk     walks, turns at walls, falls off edges
                         patrol   walks without falling off the edges
                         fly      flies up and down (2 squares each way)
                         follow   goes to the player when it sees it
                         jump     patrols, and jumps every 1.5 seconds
                         charge   patrols; when it sees the player ahead,
                                  it runs at it, then rests a moment
                         drop     hangs from the ceiling until the player
                                  passes below it, then falls
  speed = 3            its speed, 0.5 to 10 (the player walks at 5)
  sight = 6            how far it sees the player, in squares, 1 to 20
                       (follow, charge and drop)
  charge_speed = 7     its speed when it charges, 1 to 15
  after_drop = still   what it does once it has dropped (any move)
  shoot = no           how it shoots: no, forward, at_player (aims at
                       the player) or around (8 directions at once)
  fire_rate = 1        shots per second, 0.2 to 5
  bullets = 8          bullets of a shot around, 2 to 16, evenly spread
                       from the right (game 0.4.0)
  life = 1             shots it takes, 1 to 99
  damage = 1           life it takes from the player who touches it (the
                       player has 1, unless rules.txt gives it more)
  stomp = no           yes: jumping on it takes 1 life from it, and the
                       player bounces
  gravity = yes        no: it doesn't fall (and follow flies after the
                       player)
  split = 0            when it dies it splits into this many, 0 to 8...
  split_into = mini    ...of this other enemy of the pack (its folder).
                       Without it: copies of itself, half as big, that
                       don't split again.
  lock_exit = no       yes: the flag doesn't appear until it is defeated
  health_bar = no      (0.6.0) yes: once it comes near the player (8
                       squares), its name and the life it has left, at
                       the bottom, while it is on the screen
  Without a line, the value written here is used. Lines starting with #
  are comments. The Spanish names also work (nombre, letra, dibujo,
  fotogramas, tamaño, movimiento, velocidad, vista, velocidad_carga,
  al_caer, disparo, cadencia, balas, vida, daño, pisoton, gravedad,
  dividir, dividir_en, cierra_salida, barra_vida, con_vida; quieto, andar,
  patrullar, volar, seguir, saltar, embestir, caer, delante, al_jugador,
  alrededor; si).

PHASES (for bosses)
  An enemy can change when its life goes down. After its lines, write
  [phase 2], when_life (the life left when it starts) and what changes:

       name = Slime King
       letter = K
       picture = king.png
       size = 3
       move = walk
       life = 20
       shoot = forward
       lock_exit = yes

       [phase 2]
       when_life = 12
       picture = king_angry.png
       move = charge
       shoot = at_player

       [phase 3]
       when_life = 5
       move = jump
       shoot = around
       fire_rate = 3
       split = 3
       split_into = slime

  - Up to 3 phases ([phase 2], [phase 3] and [phase 4]), each one with
    less when_life than the one before.
  - In a phase only what changes is written: the rest stays as before.
    name, letter, frames, size, life and lock_exit don't change.

  - Up to 24 different enemies and NPCs among the active packs. If two
    packs have an enemy folder with the same name, the one higher in the
    list wins.
  - In a level written line by line, an enemy is its folder name:
    "slime 320 352".


NPCS AND DIALOGS (game 0.4.0)
---------------------------
NPCs are characters the player can talk to. They are harmless: they
don't hurt, the bullets go through them and they don't close the exit.

TO MAKE AN NPC
  1. In your pack, make the folder npcs/, and in it one folder for the
     NPC with its name: npcs/guard/
  2. Its picture, guard.png, as an enemy's (looking to the right, frames
     from left to right).
  3. Write npcs/guard/npc.txt:

       name = Guard
       letter = G
       picture = guard.png
       move = still

  4. Write what it says in texts/en.txt (see THE TEXT FILES below).
  5. Put its letter (G) in the map of a level. Its pack.txt needs
     game_version = 0.5.0 or newer for texts/ (0.4.0 is enough with the
     dialog_en.txt files of 0.4.0).

THE PIECES (npc.txt)
  The same as an enemy's that fit something harmless: name, letter,
  picture, frames, size, move (still, walk, patrol, fly, follow or jump),
  speed, sight and gravity. And:
  talk = button        button: the player talks to it with Triangle next
                       to it (a △ appears over it); touch: it talks when
                       the player touches it (signs, a warning...)
  dialog = guard       its conversation in the text files (without it,
                       its folder's name)
  Without a line, the value written here is used; move = still. The
  Spanish names also work (hablar = boton / tocar, dialogo).
  An NPC and an enemy can't have the same letter.

THE TEXT FILES (folder texts/)
  Every text of a pack that is shown in the game, except the title screen
  phrases, goes in its folder texts/: one file per language, named like
  the files of languages/: texts/en.txt, texts/es.txt... The game uses
  the one of its language and, for what isn't there, texts/en.txt.
  The game's name at the top of the title screen is GAME_TITLE: a pack
  can change it (GAME_TITLE = MOON MODE) or leave it empty for none.
  First the texts of the levels, one per line, "KEY = text" (a level
  shows it with text = @KEY; \n is a new line):

       WELCOME = Welcome to the village!\nTalk to the guard

  Then the conversations of the NPCs, each one a [section]:

       [guard]
       Guard: Halt! Where are you going?
       > To the castle -> castle
       > Nowhere

       [castle]
       Guard: The castle is closed today.
       Guard: Come back tomorrow.

       [guard 7]
       Guard: This is level 7.

  - The keys (WELCOME) and the sections ([guard], [castle]) are the same
    in every language: only the text after "=" and the lines change.
  - "Name: text": a line, with the name of who says it above it. A line
    without "Name: " has no name. X shows the next line; O ends the
    conversation.
  - "> answer -> section": answers to the line before (up to 4), chosen
    with up and down. Without "-> section" the answer ends it.
  - "-> section" alone after a line: X goes on in that section.
  - [guard 7]: in level 7 the NPC uses it instead of [guard].
  - Long lines are broken to fit the box. Lines starting with # are
    comments. While an NPC talks, the game waits.
  - The box can be changed with textures/gui/dialog.png: it is drawn in 9
    parts (a 3x3 grid): the corners as they are, the edges and the middle
    stretched. Best size: 48x48.
  - In a level written line by line, an NPC is its folder name:
    "guard 320 352".
  - △ says if a line isn't understood, if an answer goes to a section
    that isn't in the file, if an NPC's conversation is missing, and if a
    level's @KEY isn't in texts/.
  - The dialog_en.txt, dialog_es.txt... files of 0.4.0 (next to pack.txt,
    only conversations) still work: texts/ is looked at first.


ANIMATIONS (enemies and NPCs of the packs)
------------------------------------------
An enemy or an NPC moves its picture with an animation: several drawings
(frames) one after the other, like a film strip.

  1. Draw every frame the same size, looking to the right (the game turns
     the picture when it goes left).
  2. Put them side by side, from left to right, in ONE PNG, with no space
     between them. With frames of 48x37 (an enemy of 1 square), 2 frames
     make a PNG of 96x37, 4 frames one of 192x37:

       +------+------+------+------+
       |  1   |  2   |  3   |  4   |      slime.png, 192x37
       +------+------+------+------+

  3. In its enemy.txt or npc.txt, say how many there are:

       picture = slime.png
       frames = 4

  - The game shows them in order and starts again: a new frame 7.5 times
    a second (every 4 steps of the game), always.
  - The size of each frame: 48x37 pixels per square of the enemy is the
    best (size = 2: 96x74 per frame). The PNG's width is that times the
    frames. Bigger pictures are made smaller.
  - frames = 1 to 16. A phase can have its own picture (picture =
    king_angry.png), with the same number of frames.
  - For a walk, 2 to 4 frames are enough: legs apart, together. For
    something that floats, move the drawing 1 or 2 pixels up and down.
  - The monk of the samples is animated (2 frames):
    resourcepacks/sample_temple/npcs/monk/.
  - The pictures of the game itself (player, enemy, flag...) are not
    animated: each one is a single drawing (the wheel turns by itself).


RULES (file rules.txt)
----------------------
A pack can also change how the game plays, with a few numbers, in the
file rules.txt next to pack.txt. The template has every rule with its
normal value behind a #: delete the # and change the number.

  Rule           Normal   Allowed     Is
  life           1        1 to 99     bullets the player can take
  jump           15       1 to 30     jump strength (15: about 120
                                      pixels high)
  gravity        1        0.1 to 5    how fast the player falls
  speed          5        1 to 20     how fast the player walks
  enemy_speed    3        0 to 10     how fast the enemies walk (0: they
                                      don't move)
  enemy_life     1        1 to 99     bullets the enemies can take
  fire_rate      3        1 to 10     bullets per second holding R

  For example, an easy mode:
      life = 3
      enemy_speed = 2
  or a moon mode, with jumps that float:
      gravity = 0.5

  - A rule that isn't in the file stays as in the game. With several packs
    on, each rule comes from the highest pack that has it.
  - life and enemy_life are whole numbers; the others can have a dot
    (gravity = 0.5, not 0,5). Lines starting with # are comments.
  - With more than 1 life, each bullet takes one and the player blinks
    for a second. Touching an enemy or the wheel, or falling, always kills.
  - The jump never takes the player off the screen: if it would go higher
    than 320 pixels (with a low gravity, for example), the game lowers it
    and △ says so.
  - The packs list marks these packs with CHANGES THE RULES, and △ shows
    their rules. Rules chosen in the pause menu are played as soon as the
    game continues.
  - The Spanish words also work (vida, salto, gravedad, velocidad,
    velocidad_enemigos, vida_enemigos, cadencia).


WARNINGS (△ in OPTIONS > TEXTURE PACKS)
---------------------------------------
  When a file can't be used, the game takes the one of the pack below (or
  its own) and the pack shows WARNINGS: N. △ lists every file with what is
  wrong, for example:
    - too big (with its size), damaged or incomplete PNG (a copy that
      didn't finish);
    - a WAV that is compressed, floating point, 24-bit, more than 2
      channels, outside 8000-48000 Hz or 10 seconds or longer;
    - a name the game doesn't use (misspelled), a JPG or MP3;
    - a name from older versions of the game (Spanish names, like
      enemigo.png or nivel3.txt): it says the new one;
    - a PNG or WAV loose in the pack (outside textures/ or sounds/);
    - a folder with another name (texturas/, sound/...: it must be
      textures/, sounds/ or levels/), or a folder the game doesn't use;
    - in a level: a line it doesn't understand (with its number), no
      player or no flag, two players, more than 1000 objects, a background
      that isn't in textures/, a text @KEY that isn't in texts/, or a gap
      (level9.txt without level8.txt); in a map, a letter it doesn't
      know, a row longer than 100 squares or more than 60 rows;
    - in rules.txt: a line it doesn't understand, a number outside its
      limits, or a jump that is lowered;
    - in an enemy: a line it doesn't understand, an option or a number it
      doesn't accept, a missing picture, a letter that can't be one or is
      used twice, a split_into that isn't in the pack, a folder without
      enemy.txt, or more than 24 enemies and NPCs;
    - in an NPC or a text file: a line it doesn't understand, a missing
      conversation, an answer to a section that isn't there;
    - a game_version in pack.txt older than what the pack uses, or newer
      than the game (not compatible);
    - a texts/splashes.txt without phrases;
    - a pack that changes nothing.
  The details also say how many pictures, sounds, levels and phrases the
  pack changes, its rules, and the version, author and game version of
  its pack.txt.


LANGUAGES (folder languages/)
-----------------------------
  The game comes in English (en.txt, the main language) and Spanish
  (es.txt). Change it in OPTIONS > LANGUAGE; the game remembers it
  (config.txt).
  To add a language:
    1. Copy en.txt with another name, for example fr.txt.
    2. Open it with Notepad and change the texts on the right of the "=".
       Don't change the words on the left.
    3. Save it as UTF-8 (Notepad: Save as > Encoding: UTF-8).
  It shows up in OPTIONS > LANGUAGE. Missing texts are taken from English.
  - \n starts a new line.
  - △ ○ □ ✕ are drawn as the PSP's buttons (with button_*.png).
  - {1}, {2} and {3} are replaced by the game (a size, a file name...).
  - {JUMP}, {SHOOT}, {TALK} and {PAUSE} are the buttons chosen in
    OPTIONS > CONTROLS (✕, R, △ and START unless changed). Use them in
    the texts of the levels and the conversations, not the symbols.

TITLE SCREEN PHRASES (splash)
  The yellow phrases that appear at random on the title screen are the
  same in every language. They are in
  texts/splashes.txt of the "original" pack, one phrase per line (lines
  starting with # are comments, \n starts a new line). A pack changes them
  with its own texts/splashes.txt (splashes.txt loose in the pack, as
  before 0.5.1, also works):
      # my phrases
      To the moon!
      Now with aliens!
  If several active packs have them, the highest one in the list
  wins. Without any, the game's ones are used.

FONT (folder font/)
  font.ttf is the font of every text (Lilita One, free license: see
  font/LICENSE.txt). It can be replaced by another .ttf font with the same
  name. For languages with other letters (Russian, Greek...) use a font
  that has them.


===========================================================================
2. ESPAÑOL
===========================================================================

Todo esto se cambia con archivos junto a EBOOT.PBP, sin tocar el juego:
dibujos, sonidos, niveles, las reglas, idiomas, las frases de la pantalla
de inicio y la fuente. Los nombres de los archivos y carpetas están en
inglés, y son los mismos en todos los idiomas.


PAQUETES (paquetes de recursos)
-------------------------------
Un paquete es una carpeta dentro de resourcepacks/ con:

    pack.txt      su nombre, descripción y opciones (ver abajo)
    pack.png      su icono en el menú (mejor de 64x64)
    rules.txt     cómo se juega: vida, salto, velocidades... (ver REGLAS)
    textures/     los PNG que cambia, en carpetas (ver LOS DIBUJOS)
    texts/        sus textos; texts/splashes.txt son las frases de la
                  pantalla de inicio (ver FRASES DE LA PANTALLA DE INICIO)
    sounds/       los WAV que cambia, y en sounds/music/ su música (ver
                  MÚSICA)
    levels/       los niveles que cambia o añade
    blocks/       materiales para las casillas sólidas (ver MATERIALES)

Se eligen en OPCIONES > PAQUETES DE TEXTURAS:
    ✕     activar/desactivar el paquete seleccionado
    L/R   subir/bajar su prioridad
    △     detalles: qué cambia el paquete y qué tiene mal
    ○     volver (ahí se cargan los dibujos y los sonidos)
El juego muestra hasta 16 paquetes de resourcepacks/. Si hay más, se
queda con los activos y con "original", luego con el resto por nombre de
carpeta, y la línea de ayuda dice cuántos quedan fuera: quita los que no
uses.
El paquete "original" es la PLANTILLA: tiene los archivos del propio
juego, para copiarlos y cambiarlos (ver abajo), así que no se puede
activar.
Desde el menú de pausa, los paquetes que cambian cómo se juega (niveles,
enemigos o reglas) no se pueden activar ni desactivar: hazlo desde el
menú principal. Los que solo cambian dibujos, sonidos o frases, sí. El
juego lo ve solo: los niveles y reglas que se dejan como en la plantilla
(los del propio juego) no cuentan.
Puede haber hasta 8 activos a la vez. Si dos cambian el mismo archivo,
gana el que esté más arriba en la lista. Un paquete no necesita tener todos
los archivos: los que falten salen de los paquetes de debajo o del juego.
El juego revisa los paquetes en segundo plano la primera vez que se abre la
pantalla: mientras tanto, un paquete dice "Comprobando..." en vez de sus
avisos. Recuerda los resultados en la tarjeta de memoria, así que un paquete
solo se vuelve a revisar cuando cambia alguno de sus archivos o con una
versión nueva del juego; mientras tanto, la pantalla muestra los últimos
resultados.

EJEMPLOS
  Cada versión del juego trae paquetes terminados que enseñan lo que
  añadió, para mirar y copiar. Esta (0.6.0): resourcepacks/sample_temple
  (interruptores, bloques de colores, llaves y puertas) y sample_fortress
  (monedas, vidas extra, una barra de vida con fases). Los dos traen su
  material (blocks/), música (sounds/music/), enemigos, un NPC que habla
  y textos en todos los idiomas, y se juegan con sus propios niveles. Están hechos con IA, solo como ejemplos: no son parte del
  juego original.

PARA CREAR TU PAQUETE
  1. Dentro de la carpeta resourcepacks, copia la carpeta "original" y
     pégala en el mismo sitio (dentro de resourcepacks), con otro nombre:
     por ejemplo resourcepacks/mipaquete. No copies la carpeta
     resourcepacks entera.
  2. Edita pack.txt (nombre, descripción, autor y versión) y pack.png
     (icono). En texts/splashes.txt, escribe tus frases de la pantalla de
     inicio.
  3. Edita, en textures/, sounds/ y levels/, los archivos que quieras
     cambiar y borra los demás (o déjalos, son los originales). En
     rules.txt, cambia las reglas que quieras.
  4. En el juego, activa el paquete en OPCIONES > PAQUETES DE TEXTURAS. Si
     sale AVISOS, pulsa △ para verlos.

pack.txt (texto UTF-8; vale el Bloc de notas)
  Un solo nombre y una sola descripción, los mismos en todos los idiomas:
  name = Mi paquete                  el nombre
  description = Una linea corta      la descripción
  author = Tu nombre                 quién hizo el paquete
  version = 1.0                      la versión de tu paquete: súbela cada
                                     vez que lo actualices (1.1, 2.0...)
  game_version = 0.6.0-alpha         la versión del juego con la que lo
                                     hiciste (sale en el título del juego
                                     en el menú de la PSP). Una versión
                                     más antigua del juego enseña el
                                     paquete como INCOMPATIBLE y no lo
                                     puede activar. Lo que usa el
                                     paquete decide lo nueva que tiene
                                     que ser: los enemigos y los mapas
                                     necesitan la 0.3.0, los NPC la
                                     0.4.0, los niveles grandes y texts/
                                     la 0.5.0 (la pantalla de paquetes te
                                     lo dice).
  pixelated = yes                    yes (sí): píxeles nítidos (pixel art)
                                     no: suavizado, como el juego original
  own_levels = yes                   yes (sí): solo se juegan los niveles
                                     de los paquetes (desde su
                                     level1.txt), no los 1-6 del juego.
                                     Sin esto, los niveles de un paquete
                                     cambian o siguen a los del juego.
  type = mod                         mod: el paquete cambia el juego, así
                                     que solo se activa o desactiva desde
                                     el menú principal, no desde la pausa
                                     (aunque solo tenga dibujos).
                                     textures (texturas): un paquete de
                                     texturas. Sin esta línea, el juego
                                     decide por lo que tiene el paquete
                                     (niveles, enemigos o reglas lo hacen
                                     un mod).
  Las líneas que empiezan por # son comentarios. Sin pack.txt, o sin
  nombre, se usa el nombre de la carpeta. También valen las claves en
  español (nombre, descripcion, autor, version, version_juego,
  pixelado = si, tipo = texturas / mod, niveles_propios = si). Los
  paquetes de antes de la 0.5.0 ponían en su lugar format = 1 a 4: sigue
  valiendo.
  OPCIONES > PAQUETES DE TEXTURAS muestra la versión junto al nombre, y △
  muestra la versión, el autor y la versión del juego bajo el nombre.

PAQUETES PARA VARIAS CONSOLAS
  El mismo paquete sirve en todas las versiones de platform-shooter (PSP y
  los futuros ports). Para cambiar algo solo en la PSP, ponlo en
  textures_psp/, sounds_psp/ o levels_psp/ dentro del paquete: gana a
  textures/, sounds/ y levels/ de ese paquete. Las carpetas de otras
  consolas (textures_3ds/...) se ignoran.


LOS DIBUJOS (carpeta textures/)
-------------------------------
  Desde la 0.5.1 los dibujos están en carpetas. Los nombres de antes
  (enemy.png, background_level1.png... sueltos en textures/) siguen
  funcionando; si un paquete tiene los dos, gana el de la carpeta.

  Archivo (en textures/)           Es                   Original  PSP 1:1  HD
  entity/player/left.png           jugador, mira izq.   60x53*    60x53    120x106
  entity/player/right.png          jugador, mira der.   60x53*    60x53    120x106
  entity/player/shooting_right.png jugador disparando der. 96x85* 96x85    192x170
  entity/player/shooting_left.png  jugador disparando izq. 96x85* 96x85    192x170
  entity/enemy.png                 enemigo que camina   32x32     24x18    48x37
  entity/shooter.png               enemigo que dispara  32x32     72x54    144x109
  entity/projectiles/bullet.png    balas                32x32     24x18    48x37
  entity/wheel.png                 rueda que gira (mata) 32x32    60x45    120x91
  entity/flag.png                  bandera de salida    28x60     72x97    145x194
  entity/items/switch.png          interruptores: apagado | encendido
                                                        32x16 (5) 48x18    96x37
  entity/items/block.png           bloques de colores   16x16 (5) 24x18    48x37
  entity/items/key.png             llaves               16x16 (5) 24x18    48x37
  entity/items/door.png            puertas              16x16 (5) 24x18    48x37
  entity/items/coin.png            monedas              16x16     24x18    48x37
  entity/items/life.png            vidas extra          16x16     24x18    48x37
  block/floor_top.png              fila de arriba del suelo 32x32 24x18    48x37 (**)
  block/floor.png                  el suelo, por debajo 32x32     24x18    48x37 (**)
  block/platform.png               plataformas flotantes 32x32    24x18    48x37 (**)
  block/wall.png                   paredes (verticales) 32x32     24x18    48x37 (**)
  environment/level1.png ... environment/level6.png
                                   fondos de los niveles 640x480  480x272  480x272
  gui/menu_background.png          todos los menús      640x480   480x272  480x272
  gui/title/background.png ...     solo un menú (***)   640x480   480x272  480x272
  gui/sprites/widget/button.png    los botones de los menús 48x48 -        48x48
  gui/sprites/widget/button_highlighted.png
                                   el botón elegido (****) 48x48  -        48x48
  gui/sprites/icon/gear.png        el engranaje de la pausa 64x64 -        64x64
  gui/dialog.png                   el cuadro de los NPC 48x48     -        48x48
  font/triangle.png                △ en los textos      64x64     -        64x64
  font/circle.png                  ○ en los textos      64x64     -        64x64
  font/square.png                  □ en los textos      64x64     -        64x64
  font/cross.png                   ✕ en los textos      64x64     -        64x64
  (*  desde la 0.6.0 el jugador es pixel art, enseñado píxel a píxel;
      antes era un dibujo de 558x658 y 116x137. El dibujo de disparar es
      el de estar quieto con el brazo levantado: el mismo cuerpo, píxel a
      píxel, a 13 píxeles de la izquierda y 37 de arriba, así al disparar
      solo cambia el brazo)
  (*** gui/title/background.png, gui/options/background.png,
       gui/packs/background.png, gui/controls/background.png y
       gui/inworld_menu_background.png (la pausa): opcionales, para un
       menú que necesite su propio dibujo. En un paquete gana a su
       gui/menu_background.png; el gui/menu_background.png de un paquete
       con más prioridad gana a él. Los CRÉDITOS usan el de CONTROLES)
  (**** opcional: sin él, el botón elegido lleva un marco amarillo)
  (5 0.6.0: blancos y grises; el juego los pinta de rojo, azul, verde o
      amarillo. El interruptor son dos dibujos uno al lado del otro:
      apagado y encendido. Mira INTERRUPTORES, LLAVES Y MONEDAS)
  (** una casilla, repetida por cada bloque sólido como azulejos. El
      juego los distingue: un bloque más alto que ancho es una pared; la
      capa más baja del nivel, y lo que está apoyado en ella (escalones),
      es el suelo; los demás bloques, flotando, son plataformas. La fila
      de arriba del suelo (la hierba, por ejemplo) es floor_top.png y el
      resto floor.png (la tierra). Sin floor_top.png o platform.png se usa
      floor.png; sin floor.png, wall.png)

  NOMBRES ANTIGUOS (antes de la 0.5.1, sueltos en textures/)
    player_left.png, player_right.png, player_shooting_left.png,
    player_shooting_right.png, enemy.png, shooter.png, bullet.png,
    wheel.png, flag.png, floor_top.png, floor.png, platform.png,
    wall.png, background_level1.png ... background_level6.png,
    background_menu.png, background_title.png, background_options.png,
    background_packs.png, background_controls.png, background_pause.png,
    button.png, gear.png, dialog.png, button_triangle.png,
    button_circle.png, button_square.png, button_cross.png

  A QUÉ TAMAÑO DIBUJAR
  - "PSP 1:1" es el tamaño exacto de cada dibujo en la pantalla de la PSP
    (al tamaño más grande con el que sale en los niveles). Un dibujo de
    ese tamaño se ve píxel a píxel, sin reescalar: lo mejor para pixel art
    (con pixelated = yes en pack.txt).
  - "HD" es el doble, y el tamaño con el que mejor se ve: el juego solo lo
    reduce a la mitad, nunca lo agranda, así que los bordes salen suaves y
    los detalles pequeños limpios.
  - Más pequeño que 1:1 funciona, pero el juego lo agranda y se ve
    borroso. Más grande que HD se reduce a HD al cargarlo: solo gasta
    memoria.
  - La pantalla de la PSP es más ancha que el juego original (640x480 se
    ve en 480x272), así que todo se ve un poco más plano: un cuadrado del
    original mide 24x18 en la PSP. Los tamaños de la tabla ya lo tienen en
    cuenta: dibuja en un lienzo de ese tamaño y lo que dibujes es
    exactamente lo que se ve.
  - Dentro de su imagen el dibujo es libre: estilo, colores, detalles,
    contornos, transparencias. Solo mantén cada personaje más o menos del
    mismo tamaño y en el mismo sitio de su imagen que el original (dónde
    tiene los pies, el cuerpo y la mano), para que pise el suelo y sujete
    la pistola donde el juego espera. Los dibujos nunca cambian las
    colisiones.

  - Vale cualquier tamaño: cada dibujo se estira al hueco del original.
    Mantén las mismas proporciones y el dibujo en el mismo sitio de la
    imagen, o se verá movido o aplastado.
  - Límite: 480.000 píxeles por imagen (por ejemplo 800x600) y 2048 por
    lado. Las más grandes no se cargan, para que a la PSP-1000 no le falte
    memoria.
  - Las zonas transparentes del PNG se ven transparentes en el juego.
  - Cambiar un dibujo NUNCA cambia las colisiones: el juego sigue igual.
  - Lo que choca es un rectángulo: el sitio del dibujo original dentro
    de cada imagen. Dibuja tu personaje llenándolo y lo que se ve es lo que
    choca. En porcentajes de la imagen (desde la izquierda
    y desde arriba), así vale para cualquier tamaño:
      player_right.png           x 38% a 70%, y 0% a 92%
      player_left.png            x 30% a 62%, y 0% a 92%
      player_shooting_*.png      los pies abajo del todo y el cuerpo en
                                 el centro (50%); la pistola al 79% (der.)
                                 o al 21% (izq.) de ancho y al 61% de alto
      shooter.png                x 25% a 59%, y 34% a 100%
      bullet.png                 x 3% a 25%, y 78% a 100%
      enemy, wall, wheel, flag   toda la imagen
    El rectángulo no gira con el dibujo (la rueda), y las partes
    transparentes de dentro también chocan.
  - El jugador de un paquete hecho antes de la 0.6.0 (con un game_version
    más viejo, o sin él) mantiene las cajas de antes: player_right.png
    x 20% a 92%, y 4% a 91%; player_left.png x 8% a 80%, y 4% a 91%; y la
    pistola de los dibujos disparando al 85% (der.) o al 15% (izq.) de
    ancho y al 70% de alto.
  - Los símbolos de los botones (button_*.png) se dibujan tan altos como
    las letras del texto en el que están, con sus proporciones: mejor
    cuadrados.
  - Los botones de los menús no llevan texto en los dibujos: lo escribe el
    juego en el idioma elegido.
  - Desde la 0.5.1 los fondos de los menús son solo el fondo: el juego
    dibuja cada botón con button.png y escribe su palabra encima.
    button.png se dibuja en 9 partes: sus esquinas tal cual y sus bordes y
    su centro estirados a cada botón (mejor 48x48, como mucho 192x192).
    gear.png es el engranaje blanco de la pausa, dibujado sobre su botón.
  - Un paquete de antes de la 0.5.1 (con un game_version más viejo, o sin
    él) que no trae su propio button.png tiene los botones pintados en sus
    menús: el juego no dibuja botones encima de sus fondos de inicio y de
    pausa, así que se ven como antes. Su fondo de opciones no se usa: las
    opciones tienen otros botones desde la 0.5.1.


LOS SONIDOS (carpeta sounds/)
-----------------------------
  Archivo        Es
  click.wav      botones de los menús
  death.wav      muere el jugador

  - Formato: WAV, PCM sin comprimir, 8 o 16 bits, mono o estéreo, de 8000
    a 48000 Hz. El juego lo pasa a 16 bits mono a 44100 Hz.
    (Audacity: Archivo > Exportar > WAV, "PCM 16 bits con signo".)
  - Menos de 10 segundos.
  - No se leen MP3, OGG ni WAV comprimidos o de coma flotante.


MÚSICA (carpeta sounds/music/, juego 0.6.0)
-------------------------------------------
  El juego no trae música: la pone un paquete.

  Archivo                   Suena
  sounds/music/menu.ogg     en los menús (pantalla de inicio, opciones,
                            paquetes, controles)
  sounds/music/game.ogg     en los niveles
  sounds/music/<cualquiera>.ogg
                            en un nivel que diga music = <cualquiera>.ogg

  - Formato: OGG Vorbis, mono o estéreo, de 8000 a 48000 Hz (mejor 44100
    Hz: no se convierte). De cualquier duración: se lee poco a poco y al
    terminar vuelve a empezar. (Audacity: Archivo > Exportar > OGG.)
  - La pausa la para, y luego sigue donde estaba.
  - Su volumen es OPCIONES > MÚSICA.
  - Como los demás archivos, gana el del paquete activo con más
    prioridad que la tenga.
  - Paquetes hechos con el juego 0.6.0: game_version = 0.6.0-alpha en
    pack.txt.


NIVELES (carpeta levels/)
-------------------------
Un paquete puede cambiar los niveles y añadir otros nuevos. Cada nivel es un
archivo de texto: levels/level1.txt ... level6.txt cambian los niveles del
juego, y level7.txt, level8.txt... se juegan después del 6 (hasta
level99.txt, sin saltarse ninguno: level8.txt solo se juega si hay
level7.txt). La plantilla (resourcepacks/original/levels/) trae los 6
niveles del juego escritos así: copia uno y cámbialo.
Un nivel se puede escribir de dos formas, incluso las dos en el mismo
archivo: dibujado como un mapa (la fácil) o una línea por objeto (para
colocar las cosas al píxel).

LA FORMA FÁCIL: DIBÚJALO
  Escribe "map:" y, debajo, dibuja el nivel con letras, una por casilla.
  Una pantalla mide 20 casillas de ancho y 15 de alto (cada casilla es
  de 32x32 píxeles). Un nivel puede ser más grande: hasta 100 casillas de
  ancho y 60 de alto (mira NIVELES GRANDES más abajo). Este es de una
  pantalla:

    background = environment/level2.png
    text = ¡Salta hasta la bandera!

    map:
    ....................
    ....................
    ....................
    ....................
    ....................
    ...........###......
    ...........###......
    ....................
    ....................
    ....................
    ..P...............F.
    ####################
    ####################

    #   sólido: suelo, plataformas y paredes (el juego dibuja cada uno con
        su dibujo: floor_top.png y floor.png, platform.png o wall.png)
    1-9 sólido, de un material: el 1 es el césped del juego (ver
        MATERIALES)
    P   donde empieza el jugador (solo uno)
    F   la bandera: la salida (al menos una)
    E   enemigo que camina (mata)
    S   enemigo que dispara (3 casillas de ancho y de alto: deja sitio
        encima)
    W   rueda que gira (mata)
    ! % ~ & | * +   interruptor, bloques, llave, puerta, moneda y vida
        extra (ver INTERRUPTORES, LLAVES Y MONEDAS)
    .   vacío (un espacio también)

  - Debajo de "map:" cada línea es una fila, empezando por arriba: ahí "#"
    es una pared, no un comentario. Pon las opciones (background, text...)
    encima de "map:". También vale "mapa:".
  - Las filas que falten abajo y las casillas que falten al final de una
    fila están vacías. Caer por debajo de la última fila mata; la
    izquierda, arriba y la derecha están cerradas.
  - Cualquier otra letra es un enemigo de los paquetes activos (ver
    ENEMIGOS).
  - El jugador mide más o menos 1 casilla de ancho y 3 de alto: deja sitio
    encima de la P.
  - Al saltar, el jugador sube unas 3 casillas y avanza unas 4: escalones
    de 2 casillas y huecos de 3 son cómodos.
  - Donde el jugador salta no puede haber nada sólido justo encima: en
    una subida en zigzag, deja 1 casilla libre entre las plataformas.
  - El jugador dispara a la altura de su mano: un enemigo que hay que
    derrotar (lock_exit, o la S) tiene que estar donde el jugador pueda
    ponerse a su altura y verlo. En el suelo, un enemigo de los paquetes
    al que hay que disparar necesita size = 1.8 o más (la pistola está a
    unas 1,9 casillas; con el jugador de un paquete hecho antes de la
    0.6.0, a 1,3: size = 1.5).
  - Para añadir un nivel: copia un archivo de nivel con el número
    siguiente (level7.txt, level8.txt...) y dibújalo.

NIVELES GRANDES (juego 0.5.0)
  Dibuja filas más largas o más filas: el nivel es tan ancho como su fila
  más larga y tan alto como sus filas (como poco una pantalla, 20x15;
  como mucho 100x60).
  - La vista es la de siempre (20x15 casillas) y sigue al jugador: un
    poco por delante de donde mira, y hacia arriba o abajo cuando aterriza
    a otra altura. Nunca enseña lo de fuera del nivel.
  - El fondo se dibuja una pantalla detrás de otra y se mueve más despacio
    que el nivel (parallax).
  - Caer por debajo de la última fila mata; la izquierda, arriba y la
    derecha están cerradas, como en un nivel de una pantalla.
  - Lo que está fuera de la vista no se dibuja, así que los niveles largos
    no hacen ir más lento el juego. Los enemigos, ruedas y personajes que
    están lejos de la vista duermen (desde la 0.6.1): no se mueven ni
    disparan hasta que la vista se acerca otra vez. "Lejos" es al menos
    media pantalla de la vista, y tanto como la mayor vista (vista =) de los
    enemigos del nivel, así que un enemigo que podría ver al jugador siempre
    está despierto. Siguen existiendo: un enemigo con lock_exit = yes que
    duerme mantiene la salida cerrada. Un nivel de una pantalla (también los
    originales) no se ve afectado.
  - Un paquete con un nivel grande necesita game_version = 0.5.0 o una
    más nueva en su pack.txt (el de la plantilla ya lo dice).

LA FORMA EXACTA: UNA LÍNEA POR OBJETO
Una línea por objeto, con su sitio en el nivel (640x480 píxeles, x hacia la
derecha, y hacia abajo; en un nivel grande dibujado con mapa, todo el
mapa):

    nombre  x  y  [escala_x  escala_y  [ángulo]]

  Objeto      Es                           Tamaño normal
  player      donde empieza el jugador     71x84 (solo uno)
  wall        suelo, plataformas y muros   32x32
  enemy       enemigo que camina (mata)    32x32
  shooter     enemigo que dispara          32x32
  wheel       rueda que gira (mata)        32x32
  flag        la salida (al menos una)     28x60

  - x e y son la esquina de arriba a la izquierda (la rueda: su centro).
  - Después de los números, opciones de ese objeto (juego 0.4.0):
      flag 529 209 2 2 hide        la bandera se esconde (y la salida queda
                                   cerrada) hasta eliminar a los enemigos
                                   que disparan, como en el nivel 6
                                   original
      shooter 288 224 3 3 no_shoot este enemigo que dispara no dispara
                                   (también para los enemigos del paquete
                                   que disparan)
    En español: esconder, no_dispara. Sin hide, la bandera está siempre
    (en un paquete hecho para la 0.3.0 o antes, las
    banderas de sus niveles con disparo siguen esperando, como entonces).
  - Escala 1 es el tamaño normal: una pared de 640 de ancho y 64 de alto
    abajo del todo es "wall 0 416 20 2". Con escala negativa crece hacia
    la izquierda o hacia arriba.
  - Números con punto: 1.5, no 1,5. Las líneas con # son comentarios.
  - Hasta 1000 objetos. El jugador muere si cae por debajo del nivel (y 480
    en un nivel de una pantalla).

Opciones (líneas con =):
  background = environment/level3.png
                             el fondo: uno del juego
                             (environment/level1.png ... level6.png) o un
                             PNG de textures/ del paquete (640x480 o con
                             esa forma). Sin esto, el del nivel (después
                             del 6, el del nivel 6).
  music = bosque.ogg         (0.6.0) su música, en sounds/music/ de los
                             paquetes. Sin esto, o si ningún paquete la
                             tiene: game.ogg.
  blocks = grass             (0.6.0) el material de sus # y paredes (ver
                             MATERIALES). Sin esto, sus dibujos
                             (floor.png...); los niveles del juego son de
                             césped.
  shooting = yes             yes (sí) o no: R dispara. Sin esto: sí a
                             partir del nivel 6. (La salida solo espera a
                             los enemigos que disparan si su bandera tiene
                             hide.)
  switch = talk              (0.6.0) cómo se usan sus interruptores y qué
  switch_mode, switch_time,  hacen (ver INTERRUPTORES, LLAVES Y MONEDAS)
  exit_switch
  text = Hola\ncomo estas    un cuadro de texto (\n: otra línea); el
                             mismo en todos los idiomas, o "@CLAVE"
                             para traducirlo
  text_exit = ...            el texto cuando se abre la salida
  text_y = 6                 altura del cuadro (0: arriba del todo)
  "@CLAVE" como texto es el texto de esa clave en los archivos de texts/
  del paquete, en el idioma del juego (mira LOS ARCHIVOS DE TEXTOS): text
  = @WELCOME y, en texts/es.txt, WELCOME = ¡Bienvenido!. Los niveles
  originales también lo hacen (@TUTORIAL en level1.txt, en
  resourcepacks/original/texts/).
  También valen las palabras en español (jugador, pared, enemigo,
  enemigo_que_dispara, rueda, bandera, fondo, disparo = si, texto,
  texto_salida, texto_y, bloques).

  Un nivel sin jugador o sin bandera no se juega (se usa el del paquete de
  debajo o el del juego). Los AVISOS (△) dicen qué está mal y en qué línea.


INTERRUPTORES, LLAVES Y MONEDAS (juego 0.6.0)
---------------------------------------------
Piezas que abren el camino, dibujadas en el mapa con su símbolo:

    !   interruptor: △ (el botón de hablar) a su lado enciende su color
    %   bloque que aparece mientras su color está encendido (entonces es
        sólido)
    ~   bloque que desaparece mientras su color está encendido
    &   llave: el jugador la coge...
    |   ...y una puerta de su color se abre con △ cuando el jugador está
        pegado a ella llevando una (una llave abre una puerta: todas las |
        juntas). Encima de lo que usaría sale un aviso con △
    *   moneda: el juego las cuenta, nivel tras nivel (arriba a la
        izquierda de la pantalla, en cuanto hay alguna)
    +   vida extra: lo siguiente que mataría al jugador (menos una caída)
        no lo mata; parpadea 1,5 s. Hasta 3

  Hay 4 colores: rojo, azul, verde y amarillo. Una pieza es roja si
  "colors:" no dice otra cosa: debajo del mapa, escribe "colors:" (o
  "colores:") y luego las mismas filas otra vez, con la letra de un color
  encima de cada pieza que no sea roja (r rojo, a azul, v verde, m
  amarillo; en inglés también b azul, g verde, y amarillo). Las demás
  casillas pueden tener cualquier cosa (un punto, por ejemplo):

    map:
    ..........|.......
    P.!...%...|...&..F
    ##################
    colors:
    ..........m.......
    ..a...a...m...m...

  El interruptor azul hace aparecer el % azul; la llave amarilla abre la
  puerta amarilla. Las opciones del nivel dicen cómo van sus
  interruptores:

  switch = talk              talk (hablar): △ a su lado (sin la línea);
                             touch (tocar): el jugador lo toca; shoot
                             (disparar): le da un disparo
  switch_mode = toggle       toggle (alternar): enciende y apaga cada
                             vez; once (una_vez): se queda encendido;
                             timer (tiempo): encendido switch_time segundos
  switch_time = 5            los segundos de un interruptor con tiempo
                             (de 0.5 a 600)
  exit_switch = red          la salida (las banderas) espera al
                             interruptor de ese color

  - Un bloque que tiene que aparecer espera mientras el jugador o un
    enemigo está en su casilla.
  - Morir empieza el nivel otra vez: interruptores apagados, y las llaves
    y las monedas vuelven. Las monedas y las vidas extra de los niveles
    terminados antes se guardan: el siguiente nivel empieza con ellas. Una
    partida nueva empieza sin ninguna.
  - La pausa lo deja todo como estaba: interruptores, tiempos, llaves y
    monedas.
  - Sus dibujos son entity/items/ (mira la tabla de dibujos): el
    interruptor, el bloque, la llave y la puerta son blancos y grises, y
    el juego los pinta de cada color.
  - En líneas de objetos: "interruptor 64 96 azul" (interruptor,
    bloque_aparece, bloque_desaparece, llave, puerta, moneda, vida, o en
    inglés switch, block_on, block_off, key, door, coin, life; x e y son la
    esquina de arriba a la izquierda de su casilla).
  - También valen las palabras en español (interruptor = tocar /
    disparar / hablar, modo_interruptor = una_vez / alternar / tiempo,
    tiempo_interruptor, salida_interruptor = rojo / azul / verde /
    amarillo).
  - Un paquete que las usa necesita game_version = 0.6.0.


MATERIALES (carpeta blocks/, juego 0.6.0)
-----------------------------------------
Las casillas sólidas de un mapa pueden ser de un material: césped, piedra,
hielo... Cada material es UN dibujo con todas sus piezas, y el juego elige,
casilla a casilla, la pieza que encaja con las de alrededor (un borde, una
esquina, el interior...). El juego trae el suyo: el césped, símbolo 1.

PARA CREAR UN MATERIAL
  1. En tu paquete, crea la carpeta blocks/ y dentro una carpeta para el
     material, con su nombre: blocks/stone/.
  2. Dibuja su dibujo, tiles.png: 5 columnas y 3 filas de piezas, cada una
     una casilla del mapa. Mejor a 240x111 (piezas de 48x37, el tamaño
     HD), o a 120x55 (24x18, los píxeles de la PSP). Copia el del juego,
     resourcepacks/original/blocks/grass/tiles.png, y pinta encima:

       esquina       borde         esquina       plataforma    esquina
       arriba-izq.   arriba        arriba-der.   izquierda     interior izq.
       lado          dentro        lado          plataforma    esquina
       izquierdo                   derecho       centro        interior der.
       esquina       borde         esquina       plataforma    esquina int.
       abajo-izq.    abajo         abajo-der.    derecha       los dos lados

     Columnas 1-3: un bloque de 2 o más casillas de alto. Columna 4: una
     plataforma de 1 casilla de alto. Columna 5: donde el bloque sigue
     hacia arriba junto a uno más alto (sólido encima y a los dos lados,
     aire en la diagonal de arriba): ahí el césped de arriba se junta con
     la pared.
     Cada pieza tiene que verse bien sola, junto a cualquier otra.
  3. Escribe blocks/stone/block.txt:

       symbol = 2
       picture = tiles.png

     symbol es su número en los mapas, del 1 al 9 (el 1 es el césped del
     juego: un material de un paquete con el 1 ocupa su lugar). picture es
     tiles.png si no lo dice. En español: simbolo, dibujo.
  4. Dibújalo en un mapa con su número (2), o hazlo el material de los #
     y las paredes del nivel con "blocks = stone".
  - Las casillas de materiales distintos que se tocan encajan como un solo
    bloque. Por debajo de la última fila y por los lados del nivel cuenta
    como sólido.
  - El blocks/grass/ de un paquete sustituye al césped del juego, también
    en sus niveles.
  - Si un enemigo de los paquetes usa la misma letra (2), gana el enemigo:
    el material se puede seguir usando con blocks =.
  - Un paquete cuyos mapas usan materiales necesita game_version = 0.6.0 o
    más nueva.


ENEMIGOS (carpeta enemies/)
---------------------------
Un paquete puede traer sus propios enemigos, montados con piezas: cómo se
mueven, cómo disparan, su vida... Sin programar nada: un archivo de texto
y un dibujo. Un paquete con enemigos (o con niveles dibujados con mapa)
necesita game_version 0.3.0 o una más nueva en su pack.txt.

PARA CREAR UN ENEMIGO
  1. En tu paquete, crea la carpeta enemies/ y dentro una carpeta para el
     enemigo con su nombre (letras, números y _): enemies/slime/
  2. Dibújalo en un PNG en esa carpeta, slime.png, mirando a la derecha
     (el juego lo gira cuando va a la izquierda). Para una animación, pon
     los dibujos (fotogramas) uno detrás de otro de izquierda a derecha,
     todos del mismo tamaño. Mejor tamaño: 48x37 píxeles por fotograma
     para un enemigo de 1 casilla, 96x74 para uno de 2 casillas...
  3. Escribe enemies/slime/enemy.txt:

       name = Slime
       letter = M
       picture = slime.png
       frames = 2
       move = patrol
       speed = 1.5
       life = 2
       stomp = yes

  4. Pon su letra (M) en el mapa de un nivel, donde empieza.
  5. Activa el paquete. △ dice si algo está mal, línea a línea, y cuántos
     enemigos tiene el paquete.

LAS PIEZAS (enemy.txt)
  name = Slime         su nombre (solo para ti)
  letter = M           su letra en los mapas: una letra o un número que no
                       sea P, E, S, W o F (M y m son distintas)
  picture = slime.png  su dibujo, en su carpeta
  frames = 1           dibujos de su animación en el PNG (1 a 16)
  size = 1             su tamaño en casillas, 0.5 a 4 (se queda de pie en
                       su casilla del mapa, centrado)
  move = walk          cómo se mueve:
                         still    no se mueve
                         walk     anda, se gira en las paredes, se cae
                                  por los bordes
                         patrol   anda sin caerse por los bordes
                         fly      vuela arriba y abajo (2 casillas a cada
                                  lado)
                         follow   va hacia el jugador cuando lo ve
                         jump     patrulla, y salta cada segundo y medio
                         charge   patrulla; cuando ve al jugador delante,
                                  se lanza contra él y luego descansa
                         drop     colgado del techo hasta que el jugador
                                  pasa por debajo, y entonces cae
  speed = 3            su velocidad, 0.5 a 10 (el jugador anda a 5)
  sight = 6            hasta dónde ve al jugador, en casillas, 1 a 20
                       (follow, charge y drop)
  charge_speed = 7     su velocidad al lanzarse, 1 a 15
  after_drop = still   qué hace después de caer (cualquier move)
  shoot = no           cómo dispara: no, forward (hacia delante),
                       at_player (apunta al jugador) o around (8
                       direcciones a la vez)
  fire_rate = 1        disparos por segundo, 0.2 a 5
  bullets = 8          balas de un disparo around, 2 a 16, repartidas
                       por igual desde la derecha (juego 0.4.0)
  life = 1             disparos que aguanta, 1 a 99
  damage = 1           vida que le quita al jugador que lo toca (el
                       jugador tiene 1, salvo que rules.txt le dé más)
  stomp = no           yes: saltarle encima le quita 1 de vida, y el
                       jugador rebota
  gravity = yes        no: no cae (y follow vuela detrás del jugador)
  split = 0            al morir se divide en estos, 0 a 8...
  split_into = mini    ...de este otro enemigo del paquete (su carpeta).
                       Sin esto: copias suyas, a la mitad de tamaño, que
                       ya no se dividen.
  lock_exit = no       yes: la bandera no aparece hasta derrotarlo
  health_bar = no      (0.6.0) yes: cuando se acerca al jugador (8
                       casillas), su nombre y la vida que le queda,
                       abajo, mientras está en la pantalla
  Sin una línea, se usa el valor escrito aquí. Las líneas que empiezan por
  # son comentarios. También valen los nombres en español (nombre, letra,
  dibujo, fotogramas, tamaño, movimiento, velocidad, vista,
  velocidad_carga, al_caer, disparo, cadencia, balas, vida, daño, pisoton,
  gravedad, dividir, dividir_en, cierra_salida, barra_vida, con_vida;
  quieto, andar, patrullar, volar, seguir, saltar, embestir, caer,
  delante, al_jugador, alrededor; si).

FASES (para jefes)
  Un enemigo puede cambiar cuando le baja la vida. Después de sus líneas,
  escribe [phase 2] (o [fase 2]), when_life (la vida que le queda cuando
  empieza) y lo que cambia:

       name = Rey Slime
       letter = K
       picture = king.png
       size = 3
       move = walk
       life = 20
       shoot = forward
       lock_exit = yes

       [phase 2]
       when_life = 12
       picture = king_angry.png
       move = charge
       shoot = at_player

       [phase 3]
       when_life = 5
       move = jump
       shoot = around
       fire_rate = 3
       split = 3
       split_into = slime

  - Hasta 3 fases ([phase 2], [phase 3] y [phase 4]), cada una con menos
    when_life que la anterior.
  - En una fase solo se escribe lo que cambia: lo demás sigue como antes.
    name, letter, frames, size, life y lock_exit no cambian.

  - Hasta 24 enemigos y NPC distintos entre los paquetes activos. Si dos
    paquetes tienen una carpeta de enemigo con el mismo nombre, gana el
    que esté más arriba en la lista.
  - En un nivel escrito línea a línea, un enemigo es el nombre de su
    carpeta: "slime 320 352".


NPC Y DIÁLOGOS (juego 0.4.0)
--------------------------
Los NPC son personajes con los que el jugador puede hablar. Son
inofensivos: no hacen daño, las balas los atraviesan y no cierran la
salida.

PARA CREAR UN NPC
  1. En tu paquete, crea la carpeta npcs/, y dentro una carpeta para el
     NPC con su nombre en inglés: npcs/guard/
  2. Su dibujo, guard.png, como el de un enemigo (mirando a la derecha,
     fotogramas de izquierda a derecha).
  3. Escribe npcs/guard/npc.txt:

       name = Guardia
       letter = G
       picture = guard.png
       move = still

  4. Escribe lo que dice en texts/es.txt (y texts/en.txt) (mira LOS
     ARCHIVOS DE TEXTOS más abajo).
  5. Pon su letra (G) en el mapa de un nivel. Su pack.txt necesita
     game_version = 0.5.0 o una más nueva para texts/ (basta la 0.4.0
     con los archivos dialog_es.txt de la 0.4.0).

LAS PIEZAS (npc.txt)
  Las mismas que las de un enemigo que encajan con algo inofensivo: name,
  letter, picture, frames, size, move (still, walk, patrol, fly, follow o
  jump), speed, sight y gravity. Y además:
  talk = button        button: el jugador le habla con Triángulo a su lado
                       (le sale un △ encima); touch: habla cuando el
                       jugador lo toca (carteles, un aviso...)
  dialog = guard       su conversación en los archivos de textos (sin
                       esto, el nombre de su carpeta)
  Sin una línea, se usa el valor escrito aquí; move = still. También
  valen los nombres en español (hablar = boton / tocar, dialogo).
  Un NPC y un enemigo no pueden tener la misma letra.

LOS ARCHIVOS DE TEXTOS (carpeta texts/)
  Todos los textos de un paquete que se ven en el juego, menos las frases
  de la pantalla de inicio, van en su carpeta texts/: un archivo por
  idioma, con el nombre de los de languages/: texts/en.txt,
  texts/es.txt... El juego usa el de su idioma y, para lo que no esté
  ahí, texts/en.txt.
  El nombre del juego arriba en la pantalla de inicio es GAME_TITLE: un
  paquete puede cambiarlo (GAME_TITLE = MODO LUNA) o dejarlo vacío para
  no tener ninguno.
  Primero los textos de los niveles, uno por línea, "CLAVE = texto" (un
  nivel lo enseña con text = @CLAVE; \n hace un salto de línea):

       WELCOME = ¡Bienvenido al pueblo!\nHabla con el guardia

  Después las conversaciones de los NPC, cada una una [sección]:

       [guard]
       Guardia: ¡Alto! ¿A dónde vas?
       > Al castillo -> castle
       > A ningún sitio

       [castle]
       Guardia: El castillo está cerrado hoy.
       Guardia: Vuelve mañana.

       [guard 7]
       Guardia: Esto es el nivel 7.

  Los nombres de las carpetas, los archivos, las claves (WELCOME) y las
  secciones ([guard], [castle]) van en inglés y son los mismos en todos
  los idiomas: en texts/en.txt también es [guard]. Solo cambia el texto
  que se ve.

  - "Nombre: texto": una frase, con el nombre de quien la dice encima. Una
    línea sin "Nombre: " no tiene nombre. X enseña la siguiente; O termina
    la conversación.
  - "> respuesta -> sección": respuestas a la frase de antes (hasta 4), que
    se eligen con arriba y abajo. Sin "-> sección" la respuesta la termina.
  - "-> sección" sola después de una frase: X sigue en esa sección.
  - [guard 7]: en el nivel 7 el NPC usa esa en vez de [guard].
  - Las frases largas se parten para que quepan en el cuadro. Las líneas
    que empiezan por # son comentarios. Mientras un NPC habla, el juego
    espera.
  - El cuadro se puede cambiar con textures/gui/dialog.png: se dibuja en 9
    partes (una cuadrícula de 3x3): las esquinas tal cual, los bordes y el
    centro estirados. Mejor tamaño: 48x48.
  - En un nivel escrito línea a línea, un NPC es el nombre de su carpeta:
    "guard 320 352".
  - △ dice si no se entiende una línea, si una respuesta va a una sección
    que no está en el archivo, si falta la conversación de un NPC, y si
    la @CLAVE de un nivel no está en texts/.
  - Los archivos dialog_en.txt, dialog_es.txt... de la 0.4.0 (junto a
    pack.txt, solo conversaciones) siguen valiendo: se mira antes texts/.


ANIMACIONES (enemigos y NPC de los paquetes)
--------------------------------------------
Un enemigo o un NPC mueve su dibujo con una animación: varios dibujos
(fotogramas) uno detrás de otro, como una tira de película.

  1. Dibuja todos los fotogramas del mismo tamaño, mirando a la derecha
     (el juego gira el dibujo cuando va a la izquierda).
  2. Ponlos uno al lado de otro, de izquierda a derecha, en UN solo PNG,
     sin espacio entre ellos. Con fotogramas de 48x37 (un enemigo de 1
     casilla), 2 fotogramas hacen un PNG de 96x37, y 4 uno de 192x37:

       +------+------+------+------+
       |  1   |  2   |  3   |  4   |      slime.png, 192x37
       +------+------+------+------+

  3. En su enemy.txt o npc.txt, di cuántos hay:

       picture = slime.png
       frames = 4

  - El juego los enseña en orden y vuelve a empezar: un fotograma nuevo
    7,5 veces por segundo (cada 4 pasos del juego), siempre.
  - El tamaño de cada fotograma: lo mejor es 48x37 píxeles por casilla
    del enemigo (size = 2: 96x74 por fotograma). El ancho del PNG es eso
    por los fotogramas. Los dibujos más grandes se hacen más pequeños.
  - frames = 1 a 16. Una fase puede tener su propio dibujo (picture =
    king_angry.png), con el mismo número de fotogramas.
  - Para andar bastan 2 a 4 fotogramas: piernas separadas, juntas. Para
    algo que flota, mueve el dibujo 1 o 2 píxeles arriba y abajo.
  - El monje de los ejemplos tiene animación (2 fotogramas):
    resourcepacks/sample_temple/npcs/monk/.
  - Los dibujos del propio juego (jugador, enemigo, bandera...) no tienen
    animación: cada uno es un solo dibujo (la rueda gira sola).


REGLAS (archivo rules.txt)
--------------------------
Un paquete también puede cambiar cómo se juega, con unos pocos números, en
el archivo rules.txt junto a pack.txt. La plantilla trae todas las reglas
con su valor normal detrás de un #: borra el # y cambia el número.

  Regla          Normal   Se puede    Es
  life           1        1 a 99      balas que aguanta el jugador
  jump           15       1 a 30      fuerza del salto (15: unos 120
                                      píxeles de alto)
  gravity        1        0.1 a 5     lo rápido que cae el jugador
  speed          5        1 a 20      lo rápido que anda el jugador
  enemy_speed    3        0 a 10      lo rápido que andan los enemigos
                                      (0: no se mueven)
  enemy_life     1        1 a 99      balas que aguantan los enemigos
  fire_rate      3        1 a 10      balas por segundo con R mantenido

  Por ejemplo, un modo fácil:
      life = 3
      enemy_speed = 2
  o un modo luna, con saltos que flotan:
      gravity = 0.5

  - Una regla que no está en el archivo se queda como en el juego. Con
    varios paquetes activos, cada regla sale del paquete más alto que la
    tiene.
  - life y enemy_life son números enteros; las demás pueden llevar punto
    (gravity = 0.5, no 0,5). Las líneas con # son comentarios.
  - Con más de 1 de vida, cada bala quita una y el jugador parpadea un
    segundo. Tocar a un enemigo o la rueda, o caer, mata siempre.
  - El salto nunca saca al jugador de la pantalla: si subiera más de 320
    píxeles (con poca gravedad, por ejemplo), el juego lo baja y △ lo
    avisa.
  - La lista de paquetes marca estos paquetes con CAMBIA LAS REGLAS, y △
    enseña sus reglas. Las reglas elegidas en el menú de pausa se juegan
    en cuanto se continúa la partida.
  - También valen las palabras en español (vida, salto, gravedad,
    velocidad, velocidad_enemigos, vida_enemigos, cadencia).


AVISOS (△ en OPCIONES > PAQUETES DE TEXTURAS)
---------------------------------------------
  Cuando un archivo no se puede usar, el juego coge el del paquete de
  debajo (o el suyo) y el paquete muestra AVISOS: N. △ lista cada archivo
  con lo que tiene mal, por ejemplo:
    - PNG demasiado grande (con su tamaño), dañado o incompleto (una copia
      que no terminó);
    - un WAV comprimido, de coma flotante, de 24 bits, de más de 2 canales,
      fuera de 8000-48000 Hz o de 10 segundos o más;
    - un nombre que el juego no usa (mal escrito), un JPG o un MP3;
    - un nombre de versiones anteriores del juego (los nombres en español,
      como enemigo.png o nivel3.txt): dice el nuevo;
    - un PNG o WAV suelto en el paquete (fuera de textures/ o sounds/);
    - una carpeta con otro nombre (texturas/, sound/...: tiene que ser
      textures/, sounds/ o levels/), o una carpeta que el juego no usa;
    - en un nivel: una línea que no se entiende (con su número), sin
      jugador o sin bandera, dos jugadores, más de 1000 objetos, un fondo
      que no está en textures/, un texto @CLAVE que no está en texts/, o
      un hueco (level9.txt sin level8.txt); en un mapa, una letra que no
      conoce, una fila de más de 100 casillas o más de 60 filas;
    - en rules.txt: una línea que no se entiende, un número fuera de sus
      límites, o un salto que se baja;
    - en un enemigo: una línea que no se entiende, una opción o un número
      que no acepta, un dibujo que falta, una letra que no vale o que se
      repite, un split_into que no está en el paquete, una carpeta sin
      enemy.txt, o más de 24 enemigos y NPC;
    - en un NPC o un archivo de textos: una línea que no se entiende,
      una conversación que falta, una respuesta a una sección que no está;
    - un game_version en pack.txt más viejo que lo que usa el paquete, o
      más nuevo que el juego (no es compatible);
    - un texts/splashes.txt sin frases;
    - un paquete que no cambia nada.
  Los detalles también dicen cuántos dibujos, sonidos, niveles y frases
  cambia el paquete, sus reglas, y la versión, el autor y la versión del
  juego de su pack.txt.


IDIOMAS (carpeta languages/)
----------------------------
  El juego viene en inglés (en.txt, el idioma principal) y español
  (es.txt). Se cambia en OPCIONES > IDIOMA y el juego lo recuerda
  (config.txt).
  Para añadir otro idioma:
    1. Copia en.txt con otro nombre, por ejemplo fr.txt.
    2. Ábrelo con el Bloc de notas y cambia los textos de la derecha del
       "=". No cambies las palabras de la izquierda.
    3. Guárdalo en UTF-8 (Bloc de notas: Guardar como > Codificación: UTF-8).
  Aparecerá en OPCIONES > IDIOMA. Si falta algún texto, se usa el inglés.
  - \n hace un salto de línea.
  - △ ○ □ ✕ se dibujan como los botones de la PSP (con button_*.png).
  - {1}, {2} y {3} los cambia el juego (un tamaño, un nombre de archivo...).
  - {JUMP}, {SHOOT}, {TALK} y {PAUSE} son los botones elegidos en
    OPCIONES > CONTROLES (✕, R, △ y START si no se cambian). Úsalos en
    los textos de los niveles y de las conversaciones, no los símbolos.

FRASES DE LA PANTALLA DE INICIO (splash)
  Las frases amarillas que salen al azar en la pantalla de inicio son las
  mismas en todos los idiomas. Están en el
  texts/splashes.txt del paquete "original", una frase por línea (las
  líneas que empiezan por # son comentarios, \n hace un salto de línea).
  Un paquete las cambia con su propio texts/splashes.txt (también vale
  splashes.txt suelto en el paquete, como antes de la 0.5.1):
      # mis frases
      ¡A la luna!
      ¡Ahora con aliens!
  Si varios paquetes activos las tienen, gana el que esté más
  arriba en la lista. Si ninguno lo tiene, se usan las del juego.

FUENTE (carpeta font/)
  font.ttf es la letra de todos los textos (Lilita One, licencia libre:
  ver font/LICENSE.txt). Se puede cambiar por otra fuente .ttf con el
  mismo nombre. Para idiomas con otras letras (ruso, griego...) usa una
  fuente que las tenga.
