gittromney / Playnite-NowPlaying

This is a Playnite Library Extension that creates & manages game caches for locally installed PC Windows and/or supported emulated platform games.
MIT License
12 stars 0 forks source link

NowPlaying Game Cacher, a library extension for Playnite

Downloads LatestVersion LastCommit License Crowdin

This extension may be useful if you have a local library of PC Windows and/or emulated games you legally own, such as Abandonware or public domain games not available on the usual platforms (steam, epic, xbox game pass, etc), and you have limited space on your fast storage device(s). This extension allows you to host your games on big-and-slow storage devices (HDDs, network drives/NAS, etc.), and it can create & mangage game caches on your fast storage device(s) for the games you are actively playing.

Supported Emulated Platforms

Game caching is now possible for the following emulated platforms (See here for details):

Games must meet the following requirements to be eligible for game caching:

Note, the Play action's 'Path' must point to an executable/shortcut/symlink that is somewhere under the 'Work' directory.

How it works

When you enable a game for caching, it gets subsumed under the NowPlaying Game Cacher library. (If game caching is later disabled, the game is released back to the Playnite library.)

To play a game from the NowPlaying library, you first Install it to create a game cache on your fast storage device, and then you Play it as you normally would. As an alternative, you can also Preview the game (via right-mouse click) without creating a cache. Preview plays a game directly from its installation directory, aka, from a big-and-slow storage device. Once you finish a game, or if don't plan on playing it for awhile, you'll likely want to Uninstall it to delete its cache and free up space for other game caches.

While a game's cache is being created (which can take awhile depending on the size of the game, speed of the storage devices, etc), you are still able to browse and play games in Playnite; and you can also schedule cache installation for additional games (in a queue). Depending on NowPlaying's settings, cache installation can continue in the background while you are playing games.

Playnite's built in interface can be used for basic game cache management (install/uninstall, as well as enable/disable game caching via right-mouse). A progress indicator (at the top of Playnite's library view) will keep you informed of NowPlaying cache activity, and notifications will be issued for milestones such as when a game cache is installed and ready to play. More advanced management as well as real-time, detailed installation progress are available from the NowPlaying view (via the sidebar). NowPlaying's settings are also accessible there, too.

Changes made to a Playnite Game when caching is enabled:

Changes made to a Playnite Game when caching is disabled:

Initial setup: choose a cache root

After installing this extension, you'll want to specify at least one cache root directory/storage device and then you'll be able to enable games for caching. This is done from the NowPlaying view (via sidebar).

A few notes about cache installation

Uninstalling 'dirty' game caches

Some games save settings and game save data locally. While playing one of these games, the cache can become 'dirty', or different than the installed files. When a dirty game cache is uninstalled, you have the option of syncing updated game settings/save data back to the installation directory. (See NowPlaying settings.)

Recommended Emulator Setup

If using game caching for emulated platform games, here are some recommendations:

Updates/DLCs

Multi-disk/multi-DVD games

If M3U files are a supported by the emulator, you can create one and import it as the game's ROM file:

Example use case:

  1. Import PC Windows and/or supported emulator platform games into Playnite from your big-and-slow storage devices (Add Game → Manually, Add Game → Scan Automatically, or via emulator library scan)

    Make sure each game's Installation Folder points to its main folder. Also, avoid using a shortcut (with a hardcoded path to the big-and-slow device) as the game's executable

    A good way to check this at a glance is to see if the Install Size seems reasonable. Sometimes Playnite sets the Installation Folder to a subdirectory where the game executable/ROM lives. When that happens, the Install Size reported will be way too small. Edit the game's Install Folder and play action/ROM Path, if needed.

    Incorrect 😒🚫

    • Installation Folder: E:\Games\My Favorite Abandonware Game\Some subdirectory\bin
    • Install Size: 50 KB
    • Play action, Path: {InstallDir}\MyFaveAbondonwareGame.exe

    Correct 😁👍

    • Installation Folder: E:\Games\My Favorite Abandonware Game
    • Install Size: 5 GB
    • Play action, Path: {InstallDir}\Some subdirectory\bin\MyFaveAbondonwareGame.exe
  2. Install NowPlaying Game Cacher Extension, if you haven't already.

  3. Navagate to the NowPlaying view (via sidebar).

  4. Add at least one NowPlaying Cache Root (storage device, directory, max fill level), where game caches can be created.

    Note, a maximum fill level can be set to prevent game caches from completely filling your storage device, if necessary. Definitely set this < 100% if using your C:\ drive for game caches, for example.

  5. Enable caching for the games you imported in step 1. If you specified more than one Cache Root, you will be able to select which Root each game will be cached to, in this step. There are two ways to enable games for caching:

    • From the NowPlaying view (via sidebar), click on the "+" under the NowPlaying Game Caches list. In the popup, filter/select from the list of cache-eligible games.
    • From Playnite's main (Library) view, right click on a game that is eligible for game caching, select "NowPlaying: Enable caching for selected game", and select a cache root if multiple cache roots are defined.
  6. Installing/uninstalling a game cache; there are several ways:

    • Use Playnite's built-in install/uninstall mechanisms for your cache enabled games (those listed under the NowPlaying Game Cacher library).
    • From the NowPlaying view (via sidebar), use install/uninstall buttons or right-mouse options to manage your game caches.