NesFishy game template: top-down adventure
==========================================

Game > Top-down adventure, then Build and Run in Mesen (F6). NesFishy puts your
project into this folder ("<project>_topdown", next to the project), builds the
ROM with cc65 (ca65 + ld65) and opens it in Mesen. Set the cc65 tools folder and
Mesen in Workspaces > Settings.

Files
  main.s          the engine (yours: NesFishy copies it once; delete it to get a
                  fresh copy on the next build)
  nes.cfg         memory layout (NROM-256: 32 KB code + data, 8 KB tiles)
  modules/        add-ons, one folder each (see MODULES.txt)
  game_data.s     made on every build: palettes, every Map screen, tile properties,
  game_data.inc   sprites, Game Object tables, each screen's objects, the HUD
  modules.s       made on every build from the modules folder
  chr.bin         made on every build: the background bank + the sprite bank
  <project>.nes   the ROM; game.lbl / game.dbg are labels for Mesen's debugger

What it does
  - The Map is the world. One screen at a time: walk off an edge (holding the
    direction) to the screen next to it in the Map; the player comes in on the
    other side. No scrolling (a quick cut).
  - Tile properties (Properties panel): 1st = solid (walls), 4th = hazard (hurts).
    The edges of the world are walls.
  - Objects: the player (type Player, the first one placed on an Object layer;
    the world starts on its screen) and the objects placed on each screen's
    Object layers. Leaving a screen and coming back puts its objects back.
  - Movement from the Game Object builder: Player 8 ways for the player (objects
    with 4 or 8 directions face up / down too), patrol, chase, fly toward the
    player... There's no gravity in this template (the states' gravity setting is
    ignored).
  - Attack: a player state named Attack (or Sword, Swing, Slash, Hit) hurts
    enemies that can be hurt, reaching 12 pixels in front of the player; they're
    pushed back. The "Player (top-down)" ready-made object has one (A button).
  - Enemies that hurt the player take its health (then it blinks); pickups add
    points and coins.
  - HUD: the first HUD at the top (HUD / UI Boxes, Where: Top strip). Numbers and
    meters update by name: Score, Health / Hearts, Coins, Lives, Time, or
    hud_var + n for your own. Keep the screens' top rows (under the HUD) empty.
  - Lives: 3; losing one starts again where you came into the screen, losing all
    goes back to the start.
  - Sounds through the modules' sound hook (modules/sfx); a new screen plays
    SND_DOOR (= SND_LEVEL).

Not in this version yet: doors / warps inside a screen, scrolling between
screens, items and inventory, music.

Game Types and Game Options
  This folder is a copy of templates\topdown\ (next to NesFishy.exe). Every folder
  there with a main.s shows up in Game > Game Type; copy one to make your own.
  template.ini names it and lists its Game Options (Game > Game Options): each
  one is written to game_data.inc as a constant (e.g. START_LIVES = 3) on every
  build, so main.s and modules can use it. Add options to template.ini for your
  own constants.

Palettes per screen
  Each Map screen can use its own palette set (right-click it on the Map, or pick
  one for the whole screen in the Screens list). The game loads that set when the
  player walks onto the screen (palette_sets, world_pal in game_data.s).

Title, Game Over and Ending screens
  Right-click an entry in the Screens list > In the Game: Level (its Map is the
  game's levels), Title screen (shown at power on until Start), Game Over screen
  (when the lives run out, then back to the title) (the top-down game has
  no last level, so no Ending). Each shows its screen with its palette set, using the levels' tiles.

Players, saving, PAL (Game Options)
  2 players: controller 2 moves a second Player (the second Player game object,
  or a copy of the first); the players share the lives. Battery save: keeps the
  high score and how far you got (Start continues, Select + Start starts over); a
  HUD number named "High" shows the high score. Same speed on PAL: 50 Hz consoles
  take an extra step every 5 frames. Game Object states can be drawn behind the
  background ("Behind the background" in the Game Object builder).

Music (FamiStudio)
  Game > Music Files: pick the songs (and sound effects) exported from FamiStudio
  (File > Export > FamiStudio Sound Engine Assembly, CA65). Each build copies them
  into music/ here; music/famistudio_ca65.s is the FamiStudio sound engine. A .dmc
  file next to the music file brings its DPCM samples (placed at the end of the
  ROM). The Sounds panel says which song plays where: each Map screen's music (it
  starts when you walk onto that screen), the Title / Game Over / Ending
  screens' music (or a game state named Title / Game Over / Ending). Sound
  effects named Jump, Hurt, Stomp, Pickup, Die, Level / Door, Shoot play through
  FamiStudio; the others still use the sfx module. The pause module pauses the
  song too.

Cartridge: NROM or MMC3 (Game Options > Cartridge)
  NROM: 32 KB, one 8 KB set of tiles. MMC3 (256 KB, mapper 4): each level gets
  its own 16 KB bank for its screens (up to 15 screens a level, 14 levels; top-
  down: 15 screens a bank), every CHR bank of the project goes in, the Title /
  Game Over / Ending screens show with their own CHR bank, and the CHR Animation
  bank swaps (128- or 256-tile regions) play in the game. The code and the other
  data stay in the fixed 16 KB at $C000 (with the music and DPCM samples).
  NesFishy links with nes_mmc3.cfg then.
