Cannot configure sound for my game, core20 strict confiment

Hello, since a few days I fight with chatgpt to get sound with my game – opendungeons-plus. Whatever the solution chatgpt proposes it fails – and I am tired of this situation. The sound drivers seems to be much delicate and difficult to configure then even the graphics !!! I wish I could run pulse or alsa THROUGH the snap machine, by the plugin system ( strict confinement ) . Here’s the snapcraft.yaml file and the output of OpenAL library :

name: opendungeons-plus
version: "0.8.0"
summary: OpenDungeonsPlus – enhanced fork
description: |
  A dungeon management game inspired by Dungeon Keeper, Overlord 
  and Evil Genius. Enhanced fork with upgraded editor and engine.



grade: stable
confinement: strict
base: core20

apps:
  opendungeons-plus:
    command: usr/bin/opendungeons-plus
    plugs:
      - opengl
      - audio-playback
      - joystick
      - network
      - network-bind
      - home
      - removable-media
      - x11
      - desktop
      - desktop-legacy
      - wayland
      - pulseaudio
    environment:
      ALSOFT_DRIVERS: pulse
      LD_LIBRARY_PATH: "${SNAP}/usr/lib:
                        ${SNAP}/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}:
                        ${SNAP}/usr/lib/x86_64-linux-gnu:
                        ${SNAP}/usr/lib/x86_64-linux-gnu/pulseaudio:
                        ${SNAP}/usr/lib/openal:
                        ${SNAP}/usr/lib/cegui-0.9999"
      OGRE_PLUGIN_DIR: "${SNAP}/usr/lib/OGRE"
      OGRE_CONFIG_DIR: "${SNAP}/usr/share/OGRE"
      CEGUI_DIR: "${SNAP}/usr"
      XDG_DATA_DIRS: "${SNAP}/usr/share:/usr/share"
      XDG_DATA_HOME: "${SNAP_USER_DATA}"
      XDG_CONFIG_HOME: "${SNAP_USER_DATA}"
      CEGUI_MODULE_DIR: "${SNAP}/usr/lib/cegui-0.9999"
      DISPLAY: :0
      ALSOFT_LOGLEVEL: 3

parts:
  desktop-glib-only:
    source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
    source-subdir: glib-only
    plugin: make 
  ######################################################################
  # OIS 1.5.1
  ######################################################################
  libois:
    plugin: cmake
    source: https://github.com/wgois/OIS.git
    source-tag: v1.5.1
    source-depth: 1
    cmake-parameters:
      - -DCMAKE_BUILD_TYPE=Release
      - -DCMAKE_INSTALL_PREFIX=/usr
    build-packages:
      - libx11-dev


  ######################################################################
  # OGRE 13.6.5 (your configuration)
  ######################################################################
  ogre:
    plugin: cmake
    source: https://github.com/OGRECave/ogre.git
    source-tag: v13.6.5
    source-depth: 1

    cmake-parameters:
      - -DCMAKE_BUILD_TYPE=Debug
      - -DOGRE_CONFIG_THREAD_PROVIDER=std
      - -DOGRE_CONFIG_THREADS=3
      - -DOGRE_STATIC=FALSE
      - -DOGRE_BUILD_DEPENDENCIES=FALSE
      - -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=TRUE
      - -DOGRE_RESOURCEMANAGER_STRICT=0

      - -DOGRE_GLSUPPORT_USE_EGL=FALSE
      - -DOGRE_BUILD_RENDERSYSTEM_GLES2=FALSE
      - -DOGRE_BUILD_TOOLS=FALSE
      - -DOGRE_BUILD_SAMPLES=FALSE
      - -DOGRE_BUILD_PLUGIN_FREEIMAGE=FALSE
      - -DOGRE_BUILD_PLUGIN_EXRCODEC=FALSE
      - -DOGRE_BUILD_PLUGIN_BSP=FALSE
      - -DOGRE_BUILD_PLUGIN_PCZ=FALSE
      - -DOGRE_BUILD_PLUGIN_DOT_SCENE=FALSE
      - -DOGRE_BUILD_RENDERSYSTEM_GL=FALSE
      - -DOGRE_BUILD_COMPONENT_JAVA=FALSE
      - -DOGRE_BUILD_COMPONENT_VOLUME=FALSE
      - -DOGRE_BUILD_COMPONENT_PAGING=FALSE
      - -DOGRE_BUILD_COMPONENT_TERRAIN=FALSE
      - -DOGRE_BUILD_COMPONENT_PROPERTY=FALSE
      - -DOGRE_BUILD_COMPONENT_MESHLODGENERATOR=FALSE
      - -DOGRE_BUILD_COMPONENT_HLMS=FALSE

      - -DCMAKE_INSTALL_PREFIX=/usr
      - -DOGRE_ENABLE_PRECOMPILED_HEADERS=OFF

    build-packages:
      - libxrandr-dev
      - libfreetype6-dev
      - libgl1-mesa-dev
      - libglu1-mesa-dev
      - g++

    stage-packages:
      - libfreetype6
      - libgl1
      - libxrandr2
      - libegl1

    after: [libois]


  ######################################################################
  # CEGUI (your forks scissors_test_disabled tag)
  ######################################################################
  cegui:
    plugin: cmake
    source: https://github.com/tomluchowski/cegui.git
    source-tag: scissors_test_disabled
    source-depth: 1
    cmake-parameters:
      - -DCMAKE_BUILD_TYPE=Debug
      - -DCMAKE_INSTALL_PREFIX=/usr
      - -DCMAKE_CXX_FLAGS=-std=c++11

      - -DCEGUI_BUILD_RENDERER_OGRE=ON
      - -DCEGUI_BUILD_RENDERER_OPENGL=OFF
      - -DCEGUI_BUILD_RENDERER_OPENGL3=OFF
      - -DCEGUI_BUILD_RENDERER_OPENGLES=OFF

      - -DCEGUI_SAMPLES_ENABLED=OFF
      - -DCEGUI_BUILD_IMAGECODEC_FREEIMAGE=OFF

      - -DCEGUI_OPTION_DEFAULT_IMAGECODEC=OgreRenderer

      # Critical fix
      - -DCEGUI_INSTALL_DEV_HEADERS=ON
      - -DCEGUI_INSTALL_INCLUDEDIR=CEGUI

    build-packages:
      - librapidxml-dev

    build-environment:
      - CMAKE_PREFIX_PATH: "$SNAPCRAFT_STAGE/usr"
      - CMAKE_INCLUDE_PATH: "$SNAPCRAFT_STAGE/usr/include"
      - CMAKE_LIBRARY_PATH: "$SNAPCRAFT_STAGE/usr/lib"
      - PKG_CONFIG_PATH: "$SNAPCRAFT_STAGE/usr/lib/pkgconfig"

    after: [ogre]
    
  ########################################################################
  # SFML 2.5.1 (AUDIO ENABLED, PULSEAUDIO DISABLED)
  ########################################################################
  sfml:
    plugin: cmake
    source: https://github.com/SFML/SFML.git
    source-tag: 2.5.1
    source-depth: 1

    cmake-parameters:
      - -DCMAKE_BUILD_TYPE=Release
      - -DCMAKE_INSTALL_PREFIX=/usr
      - -DBUILD_SHARED_LIBS=ON

      # Enable audio (required by OpenDungeons)
      - -DSFML_BUILD_AUDIO=ON

      # Disable PulseAudio backend completely
      - -DSFML_USE_PULSE=FALSE

      # Force OpenAL audio backend only
      - -DSFML_USE_OPENAL=TRUE

      # Enable needed modules
      - -DSFML_BUILD_GRAPHICS=ON
      - -DSFML_BUILD_WINDOW=ON
      - -DSFML_BUILD_SYSTEM=ON
      - -DSFML_BUILD_NETWORK=ON

      # Disable examples
      - -DSFML_BUILD_EXAMPLES=OFF

    build-packages:
      - libopenal-dev
      - libflac-dev
      - libvorbis-dev
      - libogg-dev
      - libfreetype6-dev
      - libx11-dev
      - libxrandr-dev
      - libudev-dev
      - libjpeg-dev
      - libpng-dev
      - libxcb1-dev
      - libxcb-image0-dev
      - libxcb-render0-dev
      - libxcb-shm0-dev
      - libxcb-icccm4-dev
      - libgl1-mesa-dev
      - mesa-common-dev

    stage-packages:
      - libopenal1
      - libflac8
      - libvorbis0a
      - libvorbisenc2
      - libvorbisfile3
      - libogg0
      - libfreetype6

    after: [ogre]


  ######################################################################
  # OpenDungeonsPlus
  ######################################################################
  opendungeons-plus:
    plugin: cmake
    source: .
    cmake-parameters:
      - -DOD_USE_SFML_WINDOW=TRUE
      - -DCMAKE_BUILD_TYPE=Debug
      - -DCMAKE_INSTALL_PREFIX=/usr/
      - -DOD_TREAT_WARNINGS_AS_ERRORS=OFF
      - "-DOGRE_DIR=$SNAPCRAFT_STAGE/usr/lib/OGRE/cmake"
      - "-DCEGUI_DIR=$SNAPCRAFT_STAGE/usr"
      - "-DOIS_DIR=$SNAPCRAFT_STAGE/usr"
      - "-DCMAKE_PREFIX_PATH=$SNAPCRAFT_STAGE/usr"

    build-environment:
      - CMAKE_PREFIX_PATH: "$SNAPCRAFT_STAGE/usr"
      - CMAKE_INCLUDE_PATH: "$SNAPCRAFT_STAGE/usr/include"
      - CMAKE_LIBRARY_PATH: "$SNAPCRAFT_STAGE/usr/lib"
      - PKG_CONFIG_PATH: "$SNAPCRAFT_STAGE/usr/lib/pkgconfig"

    build-packages:
      - pkg-config
      - libboost-thread-dev
      - libboost-locale-dev
      - libboost-filesystem-dev
      - libboost-program-options-dev
      - libpython3.8-dev
      - python3-distutils
      - python3-distutils-extra
      - pybind11-dev
    stage-packages:
      - libboost-thread1.71.0
      - libboost-program-options1.71.0
      - libboost-filesystem1.71.0
      - libboost-system1.71.0
      - libboost-locale1.71.0
      - libboost-chrono1.71.0
      - python3
      - libpython3.8

    override-build: |
      snapcraftctl build

      # Move binary into /usr/bin
      install -Dm755 $SNAPCRAFT_PART_INSTALL/usr/games/opendungeons-plus \
                     $SNAPCRAFT_PART_INSTALL/usr/bin/opendungeons-plus
    override-prime: |
      snapcraftctl prime

      # OpenDungeons config directory
      odcfg="$SNAPCRAFT_PRIME/etc/opendungeons-plus"

      # Patch plugins.cfg actually used by the game
      if [ -f "$odcfg/plugins.cfg" ]; then
        sed -i \
          -e 's|/root/stage/usr/lib|/usr/lib|g' \
          -e 's|/root/stage||g' \
          "$odcfg/plugins.cfg"
      fi

      # Patch resources.cfg used by the game
      odres="$SNAPCRAFT_PRIME/usr/share/games/opendungeons-plus/resources.cfg"
      if [ -f "$odres" ]; then
        sed -i \
          -e 's|/root/stage/usr/share/OGRE/Media/RTShaderLib|/usr/share/OGRE/Media/RTShaderLib|g' \
          -e 's|/root/stage/usr/share/OGRE/Media/Main|/usr/share/OGRE/Media/Main|g' \
          "$odres"
      fi

    # Assets
    organize:
      models: usr/share/opendungeons-plus/models
      materials: usr/share/opendungeons-plus/materials
      shaders: usr/share/opendungeons-plus/shaders
      levels: usr/share/opendungeons-plus/levels
      sounds: usr/share/opendungeons-plus/sounds
      music: usr/share/opendungeons-plus/music
      gui: usr/share/opendungeons-plus/gui
      config: usr/share/opendungeons-plus/config

    after: [ogre, cegui, desktop-glib-only, libois, sfml]

OUTPUT:

AL lib: (II) alc_initconfig: Initializing library v1.19.1-unknown UNKNOWN
AL lib: (II) alc_initconfig: Supported backends: jack, pulse, alsa, sndio, oss, port, null, wave
AL lib: (II) ReadALConfig: Loading config /etc/openal/alsoft.conf...
AL lib: (II) ReadALConfig: Loading config /etc/xdg/alsoft.conf...
AL lib: (II) ReadALConfig: Loading config /etc/xdg/alsoft.conf...
AL lib: (II) ReadALConfig: Loading config /etc/xdg/xdg-xfce/alsoft.conf...
AL lib: (II) ReadALConfig: Loading config /home/tom/snap/opendungeons-plus/x1/.alsoftrc...
AL lib: (II) ReadALConfig: Loading config /home/tom/snap/opendungeons-plus/x1/alsoft.conf...
AL lib: (II) GetProcBinary: Got path: /snap/opendungeons-plus/x1/usr/bin
AL lib: (II) ReadALConfig: Loading config /snap/opendungeons-plus/x1/usr/bin/alsoft.conf...
AL lib: (II) GetConfigValue: Key disable-cpu-exts not found
AL lib: (II) FillCPUCaps: Detected max CPUID function: 0x10 (ext. 0x80000023)
AL lib: (II) FillCPUCaps: Vendor ID: "AuthenticAMD"
AL lib: (II) FillCPUCaps: Name: "AMD Ryzen 9 5950X 16-Core Processor            "
AL lib: (II) FillCPUCaps: Extensions: +SSE +SSE2 +SSE3 +SSE4.1
AL lib: (II) GetConfigValue: Key rt-prio not found
AL lib: (II) GetConfigValue: Key resampler not found
AL lib: (II) GetConfigValue: Key trap-al-error not found
AL lib: (II) GetConfigValue: Key trap-alc-error not found
AL lib: (II) GetConfigValue: Key reverb/boost not found
AL lib: (WW) pulse_load: Failed to load libpulse.so.0
AL lib: (WW) alc_initconfig: Failed to initialize backend "pulse"
AL lib: (WW) alc_initconfig: No playback backend available!
AL lib: (WW) alc_initconfig: No capture backend available!
AL lib: (II) GetConfigValue: Key excludefx not found
AL lib: (II) GetConfigValue: Key default-reverb not found
AL lib: (WW) alcSetError: Error generated on device (nil), code 0xa004
Failed to open the audio device
Failed to create input context for window -- TextEntered event won't be able to return unicode
Warning: The created OpenGL context does not fully meet the settings that were requested
Requested: version = 1.1 ; depth bits = 32 ; stencil bits = 0 ; AA level = 2 ; core = false ; debug = false ; sRGB = false
Created: version = 4.6 ; depth bits = 24 ; stencil bits = 0 ; AA level = 2 ; core = false ; debug = false ; sRGB = false

This is the key error that requires to be resolved.

I would suggest:

  • Drop the unsupported desktop-glib-only part and use one of the gnome extensions
  • Bump the base to core22 or core24.
  • Comment out most of the environment variables unless you are certain they do work.

Good luck!

I ended up with such config , thanks to chatgpt , it runs the sound and graphics, but the main error remains . Namely : I did all this to investigate the slow map loading problem which reveals only when run from within the snap package ( that is bare binary on my hard drive runs fine …). IF someone could look with a skilled eye what might be wrong , that the loading is so slow , I would be most thankful…

name: opendungeons-plus
version: "0.8.0"
summary: OpenDungeonsPlus – enhanced fork
description: |
  A dungeon management game inspired by Dungeon Keeper, Overlord 
  and Evil Genius. Enhanced fork with upgraded editor and engine.

grade: devel
confinement: devmode
base: core22

apps:
  opendungeons-plus:
    command: usr/bin/opendungeons-plus
    plugs:
      - opengl
      - audio-playback
      - joystick
      - network
      - network-bind
      - home
      - removable-media
      - x11
      - desktop
      - desktop-legacy
      - wayland
      - pulseaudio
    environment:
      ALSOFT_DRIVERS: pulse
      LD_LIBRARY_PATH: "${SNAP}/usr/lib:
                        ${SNAP}/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}:
                        ${SNAP}/usr/lib/openal:
                        ${SNAP}/usr/lib/cegui-0.9999:
                        ${LD_LIBRARY_PATH}"
      OGRE_PLUGIN_DIR: "${SNAP}/usr/lib/OGRE"
      OGRE_CONFIG_DIR: "${SNAP}/usr/share/OGRE"
      CEGUI_DIR: "${SNAP}/usr"
      XDG_DATA_DIRS: "${SNAP}/usr/share:/usr/share"
      XDG_DATA_HOME: "${SNAP_USER_DATA}"
      XDG_CONFIG_HOME: "${SNAP_USER_DATA}"
      CEGUI_MODULE_DIR: "$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/cegui-0.9999"
      DISPLAY: :0
      ALSOFT_LOGLEVEL: 3
    extensions: [gnome]
parts:
 
  ######################################################################
  # OIS 1.5.1
  ######################################################################
  libois:
    plugin: cmake
    source: https://github.com/wgois/OIS.git
    source-tag: v1.5.1
    source-depth: 1
    cmake-parameters:
      - -DCMAKE_BUILD_TYPE=Release
      - -DCMAKE_INSTALL_PREFIX=/usr
    build-packages:
      - libx11-dev


  ######################################################################
  # OGRE 13.6.5 (your configuration)
  ######################################################################
  ogre:
    plugin: cmake
    source: https://github.com/OGRECave/ogre.git
    source-tag: v13.6.5
    source-depth: 1

    cmake-parameters:
      - -DCMAKE_BUILD_TYPE=Debug
      - -DOGRE_CONFIG_THREAD_PROVIDER=std
      - -DOGRE_CONFIG_THREADS=3
      - -DOGRE_STATIC=FALSE
      - -DOGRE_BUILD_DEPENDENCIES=FALSE
      - -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=TRUE
      - -DOGRE_RESOURCEMANAGER_STRICT=0

      - -DOGRE_GLSUPPORT_USE_EGL=FALSE
      - -DOGRE_BUILD_RENDERSYSTEM_GLES2=FALSE
      - -DOGRE_BUILD_TOOLS=FALSE
      - -DOGRE_BUILD_SAMPLES=FALSE
      - -DOGRE_BUILD_PLUGIN_FREEIMAGE=FALSE
      - -DOGRE_BUILD_PLUGIN_EXRCODEC=FALSE
      - -DOGRE_BUILD_PLUGIN_BSP=FALSE
      - -DOGRE_BUILD_PLUGIN_PCZ=FALSE
      - -DOGRE_BUILD_PLUGIN_DOT_SCENE=FALSE
      - -DOGRE_BUILD_RENDERSYSTEM_GL=FALSE
      - -DOGRE_BUILD_COMPONENT_JAVA=FALSE
      - -DOGRE_BUILD_COMPONENT_VOLUME=FALSE
      - -DOGRE_BUILD_COMPONENT_PAGING=FALSE
      - -DOGRE_BUILD_COMPONENT_TERRAIN=FALSE
      - -DOGRE_BUILD_COMPONENT_PROPERTY=FALSE
      - -DOGRE_BUILD_COMPONENT_MESHLODGENERATOR=FALSE
      - -DOGRE_BUILD_COMPONENT_HLMS=FALSE

      - -DCMAKE_INSTALL_PREFIX=/usr
      - -DOGRE_ENABLE_PRECOMPILED_HEADERS=OFF

    build-packages:
      - libxrandr-dev
      - libfreetype6-dev
      - libgl1-mesa-dev
      - libglu1-mesa-dev
      - g++

    stage-packages:
      - libfreetype6
      - libgl1
      - libxrandr2
      - libegl1

    after: [libois]


  ######################################################################
  # CEGUI (fork scissors_test_disabled) — FIXED INSTALL PATHS
  ######################################################################
  cegui:
    plugin: cmake
    source: https://github.com/tomluchowski/cegui.git
    source-tag: scissors_test_disabled
    source-depth: 1

    cmake-parameters:
      - -DCMAKE_BUILD_TYPE=Debug
      - -DCMAKE_INSTALL_PREFIX=/usr
      - -DCMAKE_CXX_FLAGS=-std=c++11
      - -DLIB_SUFFIX=
      # Renderers
      - -DCEGUI_BUILD_RENDERER_OGRE=ON
      - -DCEGUI_BUILD_RENDERER_OPENGL=OFF
      - -DCEGUI_BUILD_RENDERER_OPENGL3=OFF
      - -DCEGUI_BUILD_RENDERER_OPENGLES=OFF

      # Disable samples and unused codecs
      - -DCEGUI_SAMPLES_ENABLED=OFF
      - -DCEGUI_BUILD_IMAGECODEC_FREEIMAGE=OFF

      # Use Ogre image codec
      - -DCEGUI_OPTION_DEFAULT_IMAGECODEC=OgreRenderer
      # XML Parser (the missing piece!)
      
      - -DCEGUI_BUILD_XMLPARSER_EXPAT=ON
      # Ensure correct Snapcraft multi-arch installation
      - -DINSTALL_LIB_DIR=lib/${SNAPCRAFT_ARCH_TRIPLET}
      - -DINSTALL_PKGCONFIG_DIR=lib/${SNAPCRAFT_ARCH_TRIPLET}/pkgconfig
      - -DINSTALL_INCLUDE_DIR=include/cegui-0
      - -DINSTALL_DATA_DIR=share/cegui-0

      # Ensure dev headers get installed
      - -DCEGUI_INSTALL_DEV_HEADERS=ON

    build-packages:
      - librapidxml-dev
      - libexpat1-dev
    build-environment:
      - CMAKE_PREFIX_PATH: "$SNAPCRAFT_STAGE/usr"
      - CMAKE_INCLUDE_PATH: "$SNAPCRAFT_STAGE/usr/include"
      - CMAKE_LIBRARY_PATH: "$SNAPCRAFT_STAGE/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}"
      - PKG_CONFIG_PATH: "$SNAPCRAFT_STAGE/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/pkgconfig"


    override-build: |
      snapcraftctl build

      echo "=== FIXING CEGUI INSTALL PATHS ==="

      LIB64="$SNAPCRAFT_PART_INSTALL/usr/lib64"
      LIBTRIPLET="$SNAPCRAFT_PART_INSTALL/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}"

      if [ -d "$LIB64" ]; then
        echo "Moving everything from lib64 to $LIBTRIPLET"

        mkdir -p "$LIBTRIPLET"

        # Move plain .so files
        mv "$LIB64"/*.so* "$LIBTRIPLET"/ 2>/dev/null || true

        # Move CEGUI module directories
        for d in "$LIB64"/*; do
          if [ -d "$d" ]; then
            name=$(basename "$d")
            mkdir -p "$LIBTRIPLET/$name"
            mv "$d"/* "$LIBTRIPLET/$name"/ || true
          fi
        done

        rm -rf "$LIB64"
      fi

      echo "=== FINAL CEGUI INSTALL TREE ==="
      find "$SNAPCRAFT_PART_INSTALL/usr/lib" -maxdepth 4 -type f -name "libCEGUI*" | sed 's/^/ • /'
      find "$SNAPCRAFT_PART_INSTALL/usr/include" -maxdepth 4 -type f -name "CEGUI.h" | sed 's/^/ • /'



    after: [ogre]
    
  ########################################################################
  # SFML 2.5.1 (AUDIO ENABLED, PULSEAUDIO DISABLED)
  ########################################################################
  sfml:
    plugin: cmake
    source: https://github.com/SFML/SFML.git
    source-tag: 2.5.1
    source-depth: 1

    cmake-parameters:
      - -DCMAKE_BUILD_TYPE=Release
      - -DCMAKE_INSTALL_PREFIX=/usr
      - -DBUILD_SHARED_LIBS=ON

      # Enable audio (required by OpenDungeons)
      - -DSFML_BUILD_AUDIO=ON

      # Disable PulseAudio backend completely
      - -DSFML_USE_PULSE=FALSE

      # Force OpenAL audio backend only
      - -DSFML_USE_OPENAL=TRUE

      # Enable needed modules
      - -DSFML_BUILD_GRAPHICS=ON
      - -DSFML_BUILD_WINDOW=ON
      - -DSFML_BUILD_SYSTEM=ON
      - -DSFML_BUILD_NETWORK=ON

      # Disable examples
      - -DSFML_BUILD_EXAMPLES=OFF

    build-packages:
      - libopenal-dev
      - libflac-dev
      - libvorbis-dev
      - libogg-dev
      - libfreetype6-dev
      - libx11-dev
      - libxrandr-dev
      - libudev-dev
      - libjpeg-dev
      - libpng-dev
      - libxcb1-dev
      - libxcb-image0-dev
      - libxcb-render0-dev
      - libxcb-shm0-dev
      - libxcb-icccm4-dev
      - libgl1-mesa-dev
      - mesa-common-dev

    stage-packages:
      - libopenal1
      - libflac8
      - libvorbis0a
      - libvorbisenc2
      - libvorbisfile3
      - libogg0
      - libfreetype6

    after: [ogre]


  ######################################################################
  # OpenDungeonsPlus
  ######################################################################
  opendungeons-plus:
    plugin: cmake
    source: .
    cmake-parameters:
      - -DOD_USE_SFML_WINDOW=TRUE
      - -DCMAKE_BUILD_TYPE=Debug
      - -DCMAKE_INSTALL_PREFIX=/usr/
      - -DOD_TREAT_WARNINGS_AS_ERRORS=OFF
      - "-DOGRE_DIR=$SNAPCRAFT_STAGE/usr/lib/OGRE/cmake"
      - "-DCEGUI_DIR=$SNAPCRAFT_STAGE/usr"
      - "-DOIS_DIR=$SNAPCRAFT_STAGE/usr"
      - "-DCMAKE_PREFIX_PATH=$SNAPCRAFT_STAGE/usr"

    build-environment:
      - CMAKE_PREFIX_PATH: "$SNAPCRAFT_STAGE/usr"
      - CMAKE_INCLUDE_PATH: "$SNAPCRAFT_STAGE/usr/include"
      - CMAKE_LIBRARY_PATH: "$SNAPCRAFT_STAGE/usr/lib"
      - PKG_CONFIG_PATH: "$SNAPCRAFT_STAGE/usr/lib/pkgconfig"

    build-packages:
      - pkg-config
      - libboost-thread-dev
      - libboost-locale-dev
      - libboost-filesystem-dev
      - libboost-program-options-dev
      - libpython3.11-dev
      - python3-distutils
      - python3-distutils-extra
      - pybind11-dev
    stage-packages:
      - libboost-thread1.74.0
      - libboost-program-options1.74.0
      - libboost-filesystem1.74.0
      - libboost-system1.74.0
      - libboost-locale1.74.0
      - libboost-chrono1.74.0
      - python3
      - libpython3.11

    override-build: |
      snapcraftctl build

      # Move binary into /usr/bin
      install -Dm755 $SNAPCRAFT_PART_INSTALL/usr/games/opendungeons-plus \
                     $SNAPCRAFT_PART_INSTALL/usr/bin/opendungeons-plus
    override-prime: |
      snapcraftctl prime

      # OpenDungeons config directory
      odcfg="$SNAPCRAFT_PRIME/etc/opendungeons-plus"

      # Patch plugins.cfg actually used by the game
      if [ -f "$odcfg/plugins.cfg" ]; then
        sed -i \
          -e 's|/root/stage/usr/lib|/usr/lib|g' \
          -e 's|/root/stage||g' \
          "$odcfg/plugins.cfg"
      fi

      # Patch resources.cfg used by the game
      odres="$SNAPCRAFT_PRIME/usr/share/games/opendungeons-plus/resources.cfg"
      if [ -f "$odres" ]; then
        sed -i \
          -e 's|/root/stage/usr/share/OGRE/Media/RTShaderLib|/usr/share/OGRE/Media/RTShaderLib|g' \
          -e 's|/root/stage/usr/share/OGRE/Media/Main|/usr/share/OGRE/Media/Main|g' \
          "$odres"
      fi

    # Assets
    organize:
      models: usr/share/opendungeons-plus/models
      materials: usr/share/opendungeons-plus/materials
      shaders: usr/share/opendungeons-plus/shaders
      levels: usr/share/opendungeons-plus/levels
      sounds: usr/share/opendungeons-plus/sounds
      music: usr/share/opendungeons-plus/music
      gui: usr/share/opendungeons-plus/gui
      config: usr/share/opendungeons-plus/config

    after: [ogre, cegui, libois, sfml]

Try add compression: lzo see if it helps.