RobertBeckebans / RBDOOM-3-BFG

Doom 3 BFG Edition source port with updated DX12 / Vulkan renderer and modern game engine features
https://www.moddb.com/mods/rbdoom-3-bfg
GNU General Public License v3.0
1.38k stars 247 forks source link

Flatpak distribution #719

Open fpiesche opened 1 year ago

fpiesche commented 1 year ago

With the spike in popularity of the Steam Deck and other "immutable" Linux distributions that either cannot install packages at a system level or make this difficult and non-permanent (eg. Fedora Silverblue), it'd be grand to have RBDoom3BFG available as a Flatpak so both application and configuration are stored in persistent user data.

I've put together a manifest that will build RBDoom3BFG as a flatpak at https://github.com/fpiesche/flathub/tree/io.github.RobertBeckebans.RBDOOM-3-BFG which I'd be happy to maintain; however Flathub as the go-to repository for Flatpaks specifically notes that flatpak distributions should be under the control of the devleopers of the software; at the least they want submissions to include evidence that the upstream developers are happy for the software to be distributed as a Flatpak.

https://github.com/flathub/flathub/wiki/App-Submission has their guidelines there. Would you be happy with me submitting RBDoom3BFG to flathub? I'd be happy to give any of the regular contributors here write access to my repository for the flatpak distribution as well.

RobertBeckebans commented 1 year ago

For me it's important that it's not extra work for me. I usually have the opinion that everybody who wants to run RBDoom3BFG on Linux should just compile it because it is so easy. I somewhat lost interest in Linux because of the major fragmentation and work forced me to use Windows almost all the time. I see the future of this source port more in the Windows world and with a major focus on getting custom content/mods running instead of just being a Linux port with some code cleanups. For me RBDOOM-3-BFG is not complete if you don't download the additional 6 GB data from Mod DB. There is an ambient light fallback baked into the C++ code but it sucks compared to the full version. That is probably the major issue I have with all separate semi "official" versions of this source port.

However if you want to maintain it then it's fine. I also thought about if we should consider snap or flatpak instead of the traditional package managers. I actually like snap under Kubuntu and some kind of this should be the prefered way for games imho.

Can you have a look at https://www.moddb.com/mods/rbdoom-3-bfg/downloads ? The best way of running this engine under Linux is to compile it from Git and then patch the lightgrid data into the base/ folder.

On Windows it is: Download RBDOOM-3-BFG 1.3 and install it over your Steam D3BFG installation. Download 1.4 and extract it over that installation or if you want the latest tech then download 1.5 from the idTech4 Discord channel #rboom3bfg in the pinned messages section.

RobertBeckebans commented 1 year ago

Keep in mind that 1.5.0 will use NVRHI with Vulkan and it might break compatibility for some users. It would be also good if you could add me to the rbdoom3bfg-flatpak repo.

fpiesche commented 1 year ago

I have done this for somewhat selfish reasons, being that I got a Steam Deck and would love to play RBDoom3BFG on it - and figured if I'm going to do that maybe I should set it up in a way that benefits other Deck users as well. :D

Again the issue with compiling, at least on Steam Deck, is that installing any packages (say, gcc) to the system is a fairly advanced step and requires manually disabling the base system write protection, and because the base system is immutable any SteamOS update will in fact wipe that kind of thing (as system updates are just rolled out as full base system images that overwrite the entire root partition). Literally only things in the user's home directory are persistent, and Flatpak is included and enabled by default for this reason on the Deck. Dhewm3 as a more vanilla source port is in fact available as a Flatpak build.

Flathub policy is to run stable releases rather than development versions so I'll be going for 1.4 for a start - I've tried building the Vulkan version as a Flatpak first because the Deck tends to perform better on Vulkan than OpenGL but couldn't get that to work just yet so I need to do some more work to figure out how to get that going.

I'm not including the lightgrid and other "mod" data in the build just yet but might do so, so that users can just install the game on Steam and the Flatpak will just find the installation and work with no user configuration required :) Does RBD3BFG support using multiple data paths simultaneously? This'd be the easiest option for doing that, but it'd also be easy enough to have a post-installation step in the flatpak that automatically links the mod data from the flatpak into the Steam BFG installation...

RobertBeckebans commented 1 year ago

Yeah support for Steam Deck is cool because that's really geared towards gaming. The engine uses a virtual filesytem when it looks up for the data. You can also extend this by setting +set fs_base_game . You can see the order how the engine is looking for files by typing "path" into the console:

]path 
Current search path:
C:\Users\rober\Saved Games\id Software\RBDOOM 3 BFG/base
C:\Projects\RBDOOM-3-BFG/base
_common.resources
...
fpiesche commented 1 year ago

Just for a quick update: I haven't been able to look at this much for the past couple of weeks since I was crunching at work, but the repo is in a fairly good state now:

Pending tasks that I'm hoping to sort out this weekend before I can create a PR to add this to Flathub (which will take care of the building once it's been accepted):

fpiesche commented 1 year ago

Are there locations other than moddb for downloading the added content? The automatic download isn't working off of moddb since flatpak just uses curl to download any data specified, and moddb's URLs aren't versioned either which makes automatically getting newer versions difficult when a new release of the main code is tagged.

Calinou commented 1 year ago
  • is there a preferred alternative to this?

You could use io.github.RobertBeckebans.RBDOOM-3-BFG, which is generally what Flathub uses for software hosted on GitHub that doesn't have a domain name owned by the project.

Are there locations other than moddb for downloading the added content?

Uploading it to GitHub Releases would be useful (also if ModDB goes down), but the repository maintainer will have to do it.

RobertBeckebans commented 1 year ago

I can upload the files to my personal site trebyte.de but io.github.RobertBeckebans.RBDOOM-3-BFG is also a good suggestion.

RobertBeckebans commented 1 year ago

I usually use GDrive for the Discord development snapshots. 1.3.0 full version https://drive.google.com/file/d/150Sd0x38GLM9lY8wh8Nse0WUCiwhMiZ8/view?usp=share_link 1.4.0 patch https://drive.google.com/file/d/19imXsoacyK4YIoUXoM8_sHovsnFK5G5J/view?usp=share_link

You can try those with curl.

coldtobi commented 1 year ago

Flatpak manifest now includes downloading and extracting the mod from moddb (not yet tested though)

@fpiesche Can you share how you are extracing the ambient light data? Background is, that there is support for RBDoom3BFG in game-data-packager and I'd like to teach it how to download and create a Debian data package for the ambient light data. (Due to the size it cannot be put in the Debian archives itself…)

TIA!

VortexAcherontic commented 11 months ago

Hey there just stopping by (was searching for something else) to drop you guys Luxtorpeda, which is a Steam Play Tool which allows for running games with open source engines, such as Doom 3: BFG. You can easily install it using ProtonUp-Qt or ProtonPlus (both available as flatpaks) and simply use Luxtorpeda as a Steam Play Compatibility tool.

This way you can get RBDoom3BFG easily on Deck. Even though I do not recommend using 1.5.x atm as it has horrible performance on Deck.

mbugni commented 8 months ago

I created a flatpak app for this project (v1.4.0, OpenGL), please take a look here. It includes:

Note the .GL suffix, just in case someone else want to release a regular (Vulkan) version.

@RobertBeckebans if you want to manage above items by yourself, please let me know. Otherwise, I'll submit the app to Flathub starting from next week.

Thanks!

Snapshot: rbdoom3bfg-gl

mbugni commented 8 months ago

On Windows it is: Download RBDOOM-3-BFG 1.3 and install it over your Steam D3BFG installation. Download 1.4 and extract it over that installation or if you want the latest tech then download 1.5 from the idTech4 Discord channel #rboom3bfg in the pinned messages section.

I have a doubt: is it the base folder incremental (i.e. each version contains different patches)? Or the latest version is cumulative (i.e. it includes all previous patches)?

mbugni commented 8 months ago

I have a doubt: is it the base folder incremental (i.e. each version contains different patches)? Or the latest version is cumulative (i.e. it includes all previous patches)?

It seems from zip-RBDOOM-3-BFG-lite-snapshot.bat that the lite version is cherry-picking files from the whole content.

Anyway, the app request has been submitted.

mbugni commented 8 months ago

An OpenGL version is available on Flathub.