Conversation
|
Autofix has formatted code style violation in this PR. I edit commits locally (e.g: git, github desktop) and want to keep autofix
I do not want the automated commit
If you don't do this, your following commits will be based on the old commit, and cause MERGE CONFLICT. |
| if: ${{ env.SKIP == 'false' && matrix.tiles == 1 }} | ||
| run: | | ||
| sudo apt-get install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev libpulse-dev libflac-dev | ||
| sudo apt-get install libsdl3-dev libsdl3-ttf-dev libsdl3-image-dev libsdl3-mixer-dev |
There was a problem hiding this comment.
libsdl3-mixer-dev does not exist as an ubuntu package, the rest of the sdl3 packages are only available currently on ubuntu 25.04 or newer (and this workflow uses ubuntu 24.04)
There was a problem hiding this comment.
This is known, unfortunately we're gonna have to wait for a number of reasons.
I'm marking this as a draft for now. MacOS is similarly effected. We'd have to compile ourselves to skip the wait.
Hopefully won't be too long.
There was a problem hiding this comment.
Also, if SDL3 requires a newer version of Ubuntu, I assume we'll have to change the required Ubuntu version.
There was a problem hiding this comment.
Stable SDL3_Mixer came out last week, so its not available on stable distro packages yet.
I don't think the runner is going to support it until 26.04 LTS (ubuntu-latest runner image is still on 24.04)
Alternatively, we'll have to CMake FetchContent / Git Submodule SDL, as to not depend on distro packaging
DO NOT MERGE
This compiles for me, but I need the build system to run tests for this.
Purpose of change (The Why)
SDL3 allows for some better handling of tiles, shaders, and compute shaders.
Shaders will allow cool effects, compute shaders can be leveraged for some insane performance gains.
The latter being a must to improve lighting performance, especially high bubble sized zlight.
Describe the solution (The How)
Migrates to SDL3
Describe alternatives you've considered
The magical code in zlight will haunt me forever.
I cannot make it significantly faster, even with multi-threading (without breaking it).
Testing
Most things seem to work correctly, but who knows at this point.
What Still Needs Attention
Note: This section relied heavily on AI support due to my lacking of intimate experience or resources for the following information. I've done what I can to ameliorate this, but caution and scrutiny is advised, and help required.
1. macOS Homebrew/MacPorts package names (verify)
The Makefile has been updated to use
sdl3,SDL3_image,SDL3_ttf,SDL3_mixeras pkg-config names and
sdl3-configas the config tool. Verify these match theactual package names once SDL3 lands in Homebrew and MacPorts stable channels.
At time of writing SDL3 may only be available as
sdl3(Homebrew tap) or requirea manual install. Adjust if the package names differ.
The macOS framework path (
FRAMEWORK=1) has been updated to look forSDL3.*frameworks. SDL3 does not currently ship official
.frameworkbundles. If macOSframework support is required, build SDL3 from source with
-DSDL_FRAMEWORK=ONand copy the output.4. Building docs (non-blocking)
The docs under
docs/en/dev/guides/building/,docs/ko/dev/guides/building/,and
docs/ja/dev/guides/building/still reference SDL2 package names, downloadlinks, and build instructions. These are user-facing and should be updated to
reflect SDL3 package names and install commands before release.
Known Regression
Pitch shift is not supported. The old code manipulated raw PCM via
Mix_Chunk::abuf.MIX_Audioin SDL3_mixer is opaque; no PCM buffer isexposed. All sounds play at their natural pitch. A future fix would use
SDL_AudioStreamfor sample-rate conversion.