legacyclonk / LegacyClonk

The LegacyClonk engine and the c4group command line tool.
https://clonkspot.org/lc-en
Other
83 stars 18 forks source link

Implement support for multiple separate directories containing game content #36

Open maxmitti opened 4 years ago

maxmitti commented 4 years ago

The basic idea is to have "official" game content together with the engine in a possibly write-protected place, while having a different place for example in the users directory to install additional content. openclonk has this implemented as C4Reloc.

This would and should also allow to adopt each operating system's directory hierarchy standards. For example putting user specific content into AppData on Windows (#25), adhering to XDG on Linux (#22) and installing LC into /Applications on Mac while still having the possibility to use custom content without modifying the app bundle.

evur commented 2 years ago

This feature would be useful when syncing files between different operating systems. When will this be done? I'm craving for this (;

SharkWipf commented 2 years ago

This would also help open up the way to distributing LC as AppImage (standalone, no deps), Flatpak (Steam Deck!), Snap (Ubuntu), etc. Though a solution would still have to be found for installing the original Clonk Rage files that presumably can't legally be shipped with LC containers.

Somebodyisnobody commented 2 years ago

Yeah that would be cool. Then clonk would finally comply with Windows' ideas about the UAC

2m commented 2 years ago

Got it running on a Steam Deck with a hacky flatpak definition: https://github.com/2m/legacyclonk-flatpak/

More information here: https://forum.clonkspot.org/t/legacy-clonk-on-steam-deck-as-a-flatpak/1482

walachey commented 2 years ago

I implemented something like that for OpenClonk as part of the automatic mod download/management. There, packages can be loaded from any subdirectory of an %APPDATA%/mods folder. Of course the intention was to be used with the mod management plattform Lorry and the ingame client. But you could also just put user files in there manually.

Might be a good starting point to just take over the code, test it and then be done with it. No idea how much the codebase had diverged before I implemented it, though.

Or you port Lorry and the ingame client :D

Somebodyisnobody commented 2 years ago

I think we should focus on a automated vanilla implementation without loading a mod for that. @Fulgen301 already did some tests with Lorry-like features. Nevertheless Lorry doesn't catch the issue with Playerfiles for example.

2m commented 2 years ago

What files are the graphical settings stored? I noticed that graphics settings are restored to defaults when using the flatpak.

maxmitti commented 2 years ago

$HOME/.legacyclonk/config contains the settings. https://github.com/legacyclonk/LegacyClonk/blob/master/src/C4Config.cpp#L80