sezero / quakespasm

QuakeSpasm -- A modern, cross-platform Quake game engine based on FitzQuake.
https://sourceforge.net/projects/quakespasm/
GNU General Public License v2.0
244 stars 97 forks source link

Cannot get mission packs to load when using Flatpak #111

Closed msmigiel closed 2 months ago

msmigiel commented 2 months ago

I am running Fedora 40 KDE and have installed the Quakespasm Flatpak and copied my id1, rogue, dopa, and hipnotic folders to /home/msmigiel/.var/app/net.sourceforge.quakespasm.Quakespasm/data/.

I am able to run flatpak run net.sourceforge.quakespasm.Quakespasm to launch the base Quake game without any issues. However, if I try to run one of the other mission packs, things do not work.

For flatpak run net.sourceforge.quakespasm.Quakespasm -rogue (and the same for hipnotic), I can hear the correct music, but the base game launches. It does not find the rogue/hipnotic folder and fails to load assets for it.

home/msmigiel/.var/app/net.sourceforge.quakespasm.Quakespasm/data/id1/pak0.pak
Command line: /app/bin/quakespasm -basedir /home/msmigiel/.var/app/net.sourceforge.quakespasm.Quakespasm/data -rogue
...
..
W_GetLumpinfo: r_invbar1 not found
W_GetLumpinfo: r_invbar2 not found
W_GetLumpinfo: r_lava not found
W_GetLumpinfo: r_superlava not found
W_GetLumpinfo: r_gren not found
W_GetLumpinfo: r_multirock not found
W_GetLumpinfo: r_plasma not found
W_GetLumpinfo: r_shield1 not found
W_GetLumpinfo: r_agrav1 not found
W_GetLumpinfo: r_teambord not found
W_GetLumpinfo: r_ammolava not found
W_GetLumpinfo: r_ammomulti not found
W_GetLumpinfo: r_ammoplasma not found

For dopa, it just acts as if it loads the base game and nothing else.

Please let me know if there is another way to load these mission packs or if there is a bug with the flatpak.

sezero commented 2 months ago

CC: @fpiesche

fpiesche commented 2 months ago

image Have you tried running with -rogue +game rogue? That does the trick for me (also on Fedora 40 and KDE, though the immutable Kinoite flavour rather than regular Fedora)...

 outrider@ash  .../home/outrider  flatpak run net.sourceforge.quakespasm.Quakespasm -rogue +game rogue
/home/outrider/.var/app/net.sourceforge.quakespasm.Quakespasm/data/id1/pak0.pak
Command line: /app/bin/quakespasm -basedir /home/outrider/.var/app/net.sourceforge.quakespasm.Quakespasm/data -rogue +game rogue

[...]

========= Quake Initialized =========

execing quake.rc
execing default.cfg
execing config.cfg
execing autoexec.cfg
Unknown command "r_replacemodels"
Unknown command "r_replacemodels"
Unknown command "gl_load24bit"
"game" is already "rogue"
2 demo(s) in loop
Playing demo from demo1.dem.

VERSION 1.07 SERVER (59422 CRC)

Towers of Wrath
Using protocol 15
msmigiel commented 2 months ago

Unfortunately that does not work for me and gives the same effect of just passing -rogue. Here is the full log of me starting the game (trying for rogue) but getting the base game - selecting easy difficulty and then the 1st episode.

$ flatpak run net.sourceforge.quakespasm.Quakespasm -rogue +game rogue
/home/msmigiel/.var/app/net.sourceforge.quakespasm.Quakespasm/data/id1/pak0.pak
Command line: /app/bin/quakespasm -basedir /home/msmigiel/.var/app/net.sourceforge.quakespasm.Quakespasm/data -rogue +game rogue
Found SDL version 2.28.5
Detected 8 CPUs.
Initializing QuakeSpasm v0.96.3
Host_Init
Playing registered version.
Console initialized.
UDP_Init: WARNING: gethostbyname failed (Host name lookup failure)
UDP Initialized
Server using protocol 666 (FitzQuake)
Exe: 18:35:08 Jul 31 2024
256.0 megabyte heap
Video mode 1920x1080x24 60Hz (24-bit z-buffer, 0x FSAA) initialized
GL_VENDOR: Intel
GL_RENDERER: Mesa Intel(R) HD Graphics 4600 (HSW GT2)
GL_VERSION: 4.6 (Compatibility Profile) Mesa 24.1.3 (git-0c49f54c76)
FOUND: ARB_vertex_buffer_object
FOUND: ARB_multitexture
GL_MAX_TEXTURE_UNITS: 8
FOUND: ARB_texture_env_combine
FOUND: ARB_texture_env_add
FOUND: SDL_GL_SetSwapInterval
FOUND: EXT_texture_filter_anisotropic
FOUND: ARB_texture_non_power_of_two
FOUND: GLSL
Enabled: GLSL gamma
Enabled: GLSL alias model rendering
Enabled: EXT_packed_pixels
FOUND: glGenerateMipmap
Intel Display Adapter detected, enabling gl_clear

Sound Initialization
SDL audio spec  : 44100 Hz, 1024 samples, 2 channels
SDL audio driver: pulseaudio - Built-in Audio Analog Stereo, 65536 bytes buffer
Audio: 16 bit, stereo, 44100 Hz
CDAudio disabled at compile time
W_GetLumpinfo: r_invbar1 not found
W_GetLumpinfo: r_invbar2 not found
W_GetLumpinfo: r_lava not found
W_GetLumpinfo: r_superlava not found
W_GetLumpinfo: r_gren not found
W_GetLumpinfo: r_multirock not found
W_GetLumpinfo: r_plasma not found
W_GetLumpinfo: r_shield1 not found
W_GetLumpinfo: r_agrav1 not found
W_GetLumpinfo: r_teambord not found
W_GetLumpinfo: r_ammolava not found
W_GetLumpinfo: r_ammomulti not found
W_GetLumpinfo: r_ammoplasma not found

Language initialization
Couldn't load 'localization/loc_english.txt'
from '/home/msmigiel/.var/app/net.sourceforge.quakespasm.Quakespasm/data'

========= Quake Initialized =========

execing quake.rc
execing default.cfg
execing config.cfg
execing autoexec.cfg
Unknown command "bottomcolor"
Unknown command "topcolor"
"game" is already "rogue"
3 demo(s) in loop
Playing demo from demo1.dem.

the Necropolis
Using protocol 15

FITZQUAKE 0.85 SERVER (24778 CRC)

Introduction
Using protocol 666
player entered the game

      This hall selects EASY skill

       This is the first episode:
        Dimension of the Doomed

    The mystical past comes alive...

         Walk into the Slipgate
        to start playing Quake!

FITZQUAKE 0.85 SERVER (24778 CRC)

the Slipgate Complex
Using protocol 666
Client player removed
Shutting down SDL sound
msmigiel commented 2 months ago

I've done some more analysis and figured out part of the problem - the file names pak0.pak, etc... are case sensitive. By default, copying my install from DOS has them capital (ie PAK0.PAK) but Quakespasm needs them to be in lower case. To help others who might face this, would it be worth checking the file names and ignoring case? On Windows this isn't a problem but on Linux it would be.

Changing the case of the pak files to all lower case fixes rogue and hipnotic, but dopa still does not work and goes into the base game as normal when I call flatpak run net.sourceforge.quakespasm.Quakespasm -dopa. Is there anything special about dopa that I need to do?

fpiesche commented 2 months ago

Ahhh, of course, the old case sensitivity problem :D I was about to suggest we compare our id1/rogue directories. Let me have a look at my dopa... (which I've also just confirmed works here)

Diordany commented 2 months ago

but dopa still does not work and goes into the base game as normal when I call flatpak run net.sourceforge.quakespasm.Quakespasm -dopa. Is there anything special about dopa that I need to do?

Is your pak file in dopa also in lowercase?

fpiesche commented 2 months ago

dopa works for me with -dopa +game dopa (but not with just -dopa!), all lowercase folder/file names. Try that and see what that does?

Diordany commented 2 months ago

dopa works for me with -dopa +game dopa (but not with just -dopa!), all lowercase folder/file names. Try that and see what that does?

Yeah, as far as I remember, only -quoth, -hipnotic and -rogue can be set that way. For dopa I think +game dopa should be enough.

fpiesche commented 2 months ago

Going to try and see if the case-sensitivity problem happens with standalone Quakespasm too; the Flatpak doesn't make any changes to the actual QS code so I wonder if this is an underlying bug of some sort...

msmigiel commented 2 months ago

Yes, that was the problem. dopa, and only dopa, needs to be run as flatpak run net.sourceforge.quakespasm.Quakespasm -dopa +game dopa while the others only need -rogue or -hipnotic. Is there anything that can be done to make them consistent, as well as ignore file name cases?

sezero commented 2 months ago

OK, problem turned out to be a non-bug. Closing.

fpiesche commented 2 months ago

+game [gamename] rather than -[gamename] is actually the standard command line option for loading Quake mods on startup, and looks to work for rogue and hipnotic as well.

Diordany commented 2 months ago

+game [gamename] rather than -[gamename] is actually the standard command line option for loading Quake mods on startup, and looks to work for rogue and hipnotic as well.

Somewhat true, but game hipnotic is treated by quakespasm as game hipnotic -hipnotic for example. Those "games" are a bit different because they also rely on modified behaviour from the engine. Those options -quoth, -hipnotic and -rogue do more than just set the game.