Phalcode / gamevault-app

Frontend for the self-hosted gaming platform for drm-free games
https://gamevau.lt
Other
281 stars 12 forks source link

Auto-Extract and -Install games (a.k.a. Installation Pipeline) #18

Closed Alfagun74 closed 1 year ago

Alfagun74 commented 1 year ago

Users need a pipeline to automatically extract and install downloaded games.

States of the Pipeline

  1. Nothing - No game available
  2. Downloading - User clicked Download 2.1 Download failed - Offer Retry
  3. Downloaded - Download is complete
  4. Extracting - User pressed Extract 4.1 Extraction Failed - Offer Retry
  5. Extracted - Game is ready for installation
  6. Installing - User clicked Install (Depending on the Game Type diefferent stuff happens only here) 6.1 Installation failed - Offer Retry
  7. Installed - Game has been installed (Installation folder is full)

Extraction Process

  1. Unzip downloaded games by clicking a button on the Downloads page or enabling auto-extract settings (default off).

After clicking the button:

Installation Process

If the <Root>/Downloads/Game/Extracted/gamevault-metadata file has extraction_completed=true, offer an Install Button based on the game type:

Other game types may be added in the future (Emulators, Linux etc.).

Further Instructions like Pre- and Postinstall steps can be implmemented in this Stage later aswell

Error Scenarios

Game type is set to WINOWS_PORTABLE but game is actually WINOWS_SETUP

Game type is set to WINOWS_SETUP but game is actually WINDOWS_PORTABLE

Game Type

A persisted enum in the game entity determines the game's type.

To-Dos Client

To-Dos Server

To-Dos Docs

Additional Future Ideas

KairuByte commented 1 year ago

One thing caught my eye, direct play games should really just immediately move into the final destination, potentially even directly from the archive. Installation shouldn’t really be a thing for live-play games, and just adds one more step (and potentially time if the download and install directories are on different physical disks.)

Alfagun74 commented 1 year ago

@KairuByte Y'know, we seriously considered it but weren't keen on having direct-play games extract to the games install folder directly. There are several reasons for this:

Alfagun74 commented 1 year ago

Changed Terms Direct Play and Setup Needed to:

to support other types and platforms in the future.

lenaxia commented 1 year ago

From a user standpoint, extraction and installation should be a single step. In the case of an installable game, the admin should be able to define the installer in the backend so that when the user/client extracts the game, it should auto launch the installer right after.

In the case of a direct play game, the admin should still be able to define the exe on the backend. It doesn't make sense to make ALL users define the exe over and over again, thats a repeated task for something that should not change from installation to installation.

Also, instead of defaulting to off for auto extraction, it should be something prompted to the user upon first launch. The reality is most users will not dig through settings to enable something like this. A prime example is Plex, where 90% of my users don't change from the default 720p streaming quality, even if I tell them to. If the user isn't prompted for this, most users won't take advantage of this setting.

KairuByte commented 1 year ago

As someone who has a direct view into the world of both the technical (myself) and non technical (my wife) worlds, I find myself agreeing with auto extraction. It’s part of the reason I am pushing for live play game support as hard as I am.

A typical end user (not a power user) wants to click less, and have things done for them. If things sound scary in the dialog prompt, they will click no, or freeze because they don’t know what the “proper” choice is. If they don’t understand the question, they will just pick an answer at random.

Important decisions for the average end user should be neither opt in, nor opt out, but opt “most convenient for the average user.” Power users will go into the settings and explore every corner.

The best way I have seen to handle such a conundrum, is ask the user if they want default settings (auto everything), or to customize their settings on install. This will give average users the most seamless experience, at the “cost” of some decisions being defaulted like auto extracting/auto installing dependencies/auto running scripts/etc, and power users will be able to make those decisions on their own.

Keep in mind, you need to target people who don’t even understand what the word extraction means. There’s a reason Steam and other game libraries handle all the download/extract in one go, and dependencies/first run scripts/etc on first play. It’s to cut down on confusion for the end user who doesn’t know what any of that even is.

Alfagun74 commented 1 year ago

@KairuByte I really like the idea of having a fourth setup page where the user has preselected "use defaults", and it automatically enables autostart, autoextract, autosearch and so on with the ability to toggle them each if the user wants to.

lenaxia commented 1 year ago

Might be asking a but much, but I would like to enable the server admin to define the defaults that show up for their users. So a client would login and fetch defaults as provided by the backend.

The use case for this again goes back to plex. I would love to define 1080p as the default playback quality for any client that connects because I have that bandwidth. However the other guy over there may not have that bandwidth so it wouldn't make sense for clients connecting to his server to default to 1080p. This gives server admin the power to better shape his or her users' experiences.

Alfagun74 commented 1 year ago

@lenaxia I understand your perspective, but allowing server admins to define user defaults can lead to inconsistency and confusion. My preference is to create a standardized experience for all users, irrespective of the connected server. This is particularly important when implementing settings that the admin cannot be certain whether the user prefers or not.

Alfagun74 commented 1 year ago

Mockup for Download Tab

Yelo420 commented 1 year ago

The installation pipeline will finally be available in the upcoming version. I hope it is understandable and reliably fulfills its purpose. None of this is not still changeable. Glad about feedback.