LAST LIGHT - installing on a Miyoo Mini Plus with Onion OS
==========================================================

Version: v0.9.0

LAST LIGHT runs on the Miyoo Mini Plus with Onion OS 4.4 (tested on 4.4.0). It appears in
Onion's Ports list: Games > Ports > Action > Last Light. This zip holds only the game; it
never contains save files, so installing or updating never touches your progress.

What the zip puts on the SD card
--------------------------------

  Roms/PORTS/Games/LastLight/lastlight            the game
  Roms/PORTS/Games/LastLight/launch.sh            starts it (and puts the CPU back, see CPU BOOST)
  Roms/PORTS/Games/LastLight/INSTALL.txt          this file
  Roms/PORTS/Games/LastLight/CHANGELOG.md         what changed in each version
  Roms/PORTS/Games/LastLight/LICENSE.txt          LAST LIGHT's license
  Roms/PORTS/Games/LastLight/OFL.txt              the Exo 2 font's license (SIL Open Font License 1.1)
  Roms/PORTS/Shortcuts/Action/Last Light.port     the entry in the Ports list
  Roms/PORTS/Imgs/Last Light.png                  its box art

The game keeps its saves next to it, in Roms/PORTS/Games/LastLight/: meta.txt and meta.bak
(gold, power ups, unlocks, achievements, options), run.sav (a suspended run), last_run.rec
(the last run's recording) and log.txt.


Install
-------

1. Turn the handheld off and put its SD card in your computer.
2. Extract the zip to the ROOT of the SD card (the top level, where the Roms, App and Emu
   folders are), so that its Roms folder merges with the card's Roms folder. Nothing on the
   card is deleted; only the files listed above are added.
   - Windows: open the zip, select the Roms folder inside it, and copy it onto the card's top
     level (Explorer merges folders). Answer "Replace" if it asks about LAST LIGHT's files.
   - macOS: do NOT drag the Roms folder onto the card in Finder: Finder's default is to
     REPLACE the card's whole Roms folder, which deletes your games. Use Terminal instead
     (change "SDCARD" to your card's name as Finder shows it):
         unzip -o ~/Downloads/LastLight-v0.9.0.zip -d /Volumes/SDCARD
         dot_clean -m /Volumes/SDCARD
     (dot_clean -m removes the "._" files macOS leaves on memory cards.)
   - Linux: unzip -o LastLight-v0.9.0.zip -d /path/to/the/card
3. Check that the card now has Roms/PORTS/Games/LastLight/lastlight (not a
   LastLight-v0.9.0 folder at the top with Roms inside it).
4. Eject the card safely, put it back in the handheld and turn it on.
5. Open Games > Ports > Action > Last Light.

If Last Light does not show in the list, run "~Import ports" at the top of the Ports list
(Onion's refresh for that list). If Games > Ports is missing altogether, install Onion's
"Ports Collection" from Apps > Package Manager. If Onion says "Port Launch Error ...
lastlight is missing", the files went to the wrong folder: see step 3.


Update to a new version
-----------------------

Quit LAST LIGHT first (MENU; a run in progress is saved and offered as CONTINUE). Then
install the new zip exactly as above, replacing the old files when asked. Your saves are not
in the zip, so they stay as they are. To be extra safe, copy the meta.* and run.* files out
of Roms/PORTS/Games/LastLight/ before updating.

If an update changes how runs are stored, a run suspended by the older version cannot
continue: the title then offers BANK n GOLD (keep its gold) or KEEP FILE.


Moving from the Apps list (early testers)
-----------------------------------------

Test builds before this release installed LAST LIGHT in the Apps list (App/LastLight). The
Ports version starts with empty saves until you move yours over:

1. Quit LAST LIGHT (MENU) if it is open.
2. Install this zip as above.
3. Before you start the Ports version, copy these files (those you have) from
   App/LastLight/ to Roms/PORTS/Games/LastLight/:
       meta.txt  meta.bak  run.sav  run.bak  last_run.rec
   (and any other file whose name starts with meta., run., last_run. or settings.).
   If you already played the Ports version, copying replaces its new progress with the
   old one: keep whichever you prefer.
4. Start Games > Ports > Action > Last Light and check your gold and unlocks.
5. Remove the old Apps entry: delete the App/LastLight folder. (To hide it but keep its
   files, rename App/LastLight/config.json to config.json.migrated and launch.sh to
   launch.sh.migrated instead.)


CPU BOOST
---------

OPTIONS > CPU BOOST (off by default) runs the CPU at its full 1.2 GHz while LAST LIGHT runs,
for smoother frames in the busiest moments. It uses more battery and the handheld runs
warmer. It never changes how the game plays. The game puts Onion's CPU setting back when it
exits, and launch.sh puts it back too if the game is ever stopped abruptly. LAST LIGHT's
Ports entry does not use Onion's own performance mode; leave CPU BOOST off if battery life
matters more to you.


Uninstall
---------

Delete these from the SD card:
    Roms/PORTS/Games/LastLight/               (this deletes your saves too: copy meta.* first
                                               if you want to keep your progress)
    Roms/PORTS/Shortcuts/Action/Last Light.port
    Roms/PORTS/Imgs/Last Light.png
Then run "~Import ports" at the top of the Ports list so that the entry goes away.


Problems
--------

The game writes what it does to Roms/PORTS/Games/LastLight/log.txt; include that file when
you report a problem, along with the version shown on the title screen (v0.9.0).
