Drewol / unnamed-sdvx-clone

A game based on K-Shoot MANIA and Sound Voltex
MIT License
795 stars 96 forks source link

Set gameDir to $XDG_DATA_HOME and copy assets on initialization #658

Closed SkyLeite closed 10 months ago

SkyLeite commented 10 months ago

This is somewhat of a stopgap solution to the issue of the game failing to launch when gameDir is set to a directory without the necessary assets. USC is shipped with the assets needed to at least run, so it can handle this scenario by copying them over to gameDir when it is detected to be empty. For my nix package I wrapped the executable with a bash script that does this at runtime, but it makes sense to me for the game to do this.

A more elegant solution would be to separate the specification of asset paths (for example, implementing -skinsdir, -fontsdir, -songsdir, etc), as well as allowing these options to contain multiple paths to be searched, akin to the colon-separated list of directories in $PATH. In this scenario, the game could always search the executable path for necessary assets, while still allowing the user to specify additional ones.

Fixes #645