Living checklist for the current development push (git subtrees, Nix flake cleanup, experimental WASM / Android / R36S). Update this file when items land or scope changes.
- Add
AGENTS.md(coding standards, git-bundle handoffs, AI attribution) - Clarify handoffs: only
git bundle+git pull; nevergit fetch/git cherry-pickas a substitute for stacking - Flake Windows outputs under host system (
pingus-win32-x64/pingus-win32-x86), notpackages.*-windows - Drop
x86_64-darwinfromeachSystem(nixpkgs unstable dropped it)
- Vendor helper libraries under
external/viagit subtree add --squash- tinycmmc, uitest, argpp, geomcpp, logmich, sexpcpp, priocpp, strutcpp, tinygettext, xdgcpp, wstsound
- Avoid recursive submodule checkout when adding subtrees
- Nested upstream gitlinks (
external/*/external/tinycmmc) left as gitlinks only — real modules live atexternal/tinycmmc
-
tinycmmc_find_dependency: monorepo paths + aliases (geom→geomcpp,prio→priocpp,strut→strutcpp,sexp→sexpcpp) - Bootstrap
TinyCMMC.cmakefalls back to top-levelexternal/tinycmmc - Hardcoded module paths in argpp/logmich/strut/wstsound fixed for monorepo
-
sexpordered beforepriofor in-tree builds - Flake builds helpers with
callPackagefromexternal/*/(no flake inputs for those libs) - Flake inputs reduced to nixpkgs, flake-utils, Win32 SDL ports (+ SDL source tarballs for Android/wasm)
- Copy/adapt
mk/{wasm,android,r36s}andnix/{wasm,android,r36s}.nix(GP2X/Wiz not brought over) - Wire host-system packages:
pingus-wasm,pingus-android,pingus-r36s, PortMaster zips,arkos-sysroot, SDL helper outputs - CMake:
SDL2_ROOT,PINGUS_USE_GLES,EMSCRIPTEN_LINK_FLAGS, html suffix, skipxdgcppon Emscripten/Android -
PINGUS_ENABLE_SOUNDoptional on Emscripten (was forced OFF; now ON via flake when wstsound path is ready) - wasm
build-app.shuses Pingus CMake options (not SuperTuxENABLE_*)
- Replace
{fmt}withstd::format/std::vformat(C++20) in Pingus, logmich, and priocpp - Provide glm + libsigc++-2 for Emscripten (
EXTRA_PREFIX_PATH) and confirmfind_package/ pkg-config under FIND_ROOT BOTH
- Strip SuperTux-only
EXPORTED_FUNCTIONS(_st_emscripten_*) from the link line; keep_main+ main-loop pause/resume only -
Legacy GL emulationsuperseded by real GLES2 shaders (FULL_ES2only) - Soften
mk/wasm/shell.htmlwhen optional_st_emscripten_*symbols are absent (guards already present; exports no longer require them) - Get a full
emcmake+ link ofpinguspast compile/link errors - Runtime: main loop / filesystem (
data/preload at/data), canvas resize, input - wstsound on Emscripten OpenAL (see section below) — not SDL2_mixer
Goal: real SFX + module music in the browser without OpenAL Soft. Use
Emscripten’s OpenAL 1.1 → Web Audio (-lopenal) and a slim codec set.
| Path | Formats | Decoder |
|---|---|---|
data/sounds/*.wav |
PCM WAV | in-tree WavSoundFile (no extra dep) |
data/music/*.it, one .s3m |
Impulse Tracker / Scream Tracker | libmodplug |
Not required for Pingus data: mpg123, libvorbis, opus. Keep those optional for desktop wstsound; do not pull them into the wasm closure unless a future asset needs them.
- Codecs as separate flake outputs (quick
nix build .#libmodplug-wasmwithout rebuilding the game):libmodplug-wasm— static libmodplug forwasm32-emscripten- Later: optional
libogg-wasm/libvorbis-wasmonly if needed
- Sources: fetch from the web first (
fetchurl). Vendor underexternal/only if packaging becomes painful or upstream disappears. - wstsound wasm build:
- Link Emscripten OpenAL (
-lopenal), not OpenAL Soft - CMake options to disable unused codecs (
WSTSOUND_WITH_MPG123=OFF, etc.) - Stub or
#ifdef __EMSCRIPTEN__EFX (alGenEffects/ effect slots) — not available in Emscripten’s AL - Avoid requiring pthreads
- Link Emscripten OpenAL (
- Pingus: stop forcing
PINGUS_ENABLE_SOUND=OFFon Emscripten once wstsound-wasm links; keep autoplay / first-gesture behaviour in mind → done: CMake respects-DPINGUS_ENABLE_SOUND; flake setsenableSound=true
-
libmodplug-wasmflake package (static, emconfigure/emmake or cmake) - wstsound CMake:
WSTSOUND_WITH_{MODPLUG,VORBIS,OPUS,MPG123,EFX}options; default wasm profile = modplug + wav only; Soft loopback excluded - wstsound builds under emscripten against
-lopenal(EFX stubbed) -
wstsound-wasmflake output for isolated testing - Wire
.#pingus-wasmwithenableSound=true+ preload music/sounds - Runtime: music + SFX after user gesture; greeting reflects real backend
- Detect
.s3mmagic inSoundFile::from_stream(SCRM) sogd-giirm.s3mroutes to ModPlug
- Porting OpenAL Soft itself to wasm
- Shipping mpg123/vorbis/opus on wasm “just in case”
- SDL2_mixer as the primary path (keep as a possible alternative only)
Runtime status (device / Fire tablet): menu, levels, levelsets, Options,
translations, and editor groundpieces work after asset-index + empty-datadir
fixes. Sound is still forced off (PINGUS_NO_SOUND).
- Stage
external/*/includeinto the NDK tree; excludesound_real.cpp(until sound lands) - GLES context attributes in OpenGLFramebuffer when
PINGUS_USE_GLES - Writable userdir via
SDL_AndroidGetInternalStoragePath - Asset I/O:
System::read_file/existviaSDL_RWFromFile - Load prio documents via
System::read_file(load_document) - Legacy
/images/...sprite paths stripped for AssetManager - GLES viewport synced to drawable size (1024×528 vs requested 1024×768)
- Pingus launcher icons (
mipmap-*/ic_launcher.png) - Translations: Android
FileSystemfor tinygettext + non-throwingpo/scan -
android-asset-index.txtsoopendirlists levelsets / prefabs / images - Empty-datadir
opendir_recursivepath fix (editor groundpieces) - Validate APK install on a device (Fire tablet / austin)
- Build/link remaining
external/static libs for each ABI where needed - [~] wstsound + OpenAL Soft + libmodplug for real audio (wiring in; see below)
- Pause/resume audio on Activity lifecycle
Parity with wasm: wstsound → OpenAL, codecs modplug + wav.
- Asset-aware open:
SoundManagerOpenFunc→System::read_fileinsound_real.cpp(#ifdef ANDROID) -
mk/android/scripts/build-audio-libs.sh— NDK CMake for OpenAL Soft (static) + libmodplug per ABI -
nix/android.nixaudioAndroidLibs+AUDIO_ANDROID_LIBSinto APK build - Stage wstsound (wav+modplug only) + prebuilt
.ainbuild-apk.sh -
Android.mk: whenENABLE_ANDROID_SOUND=1, link openal+modplug, compilesound_real.cpp+ wstsound,-lOpenSLES; else keep dummy - First successful
nix build .#pingus-androidwith audio libs (fix OpenAL source hash if fetch fails) - Device test: menu music (
.it) + SFX; pause on Activity lifecycle
Non-goals for this track: SDL2_mixer as primary path; full codec set; OpenAL EFX on mobile.
- Successful CMake configure against
arkos-sysroot(SDL2, GL/GLES, fmt, glm, sigc++, libpng, …) - Build
external/for aarch64-sysroot or rely on sysroot packages - Binary runs under PortMaster with
SDL_GAMECONTROLLERCONFIG - Real screenshot/cover assets for PortMaster metadata
- Request ES 2.0 context via SDL when
PINGUS_USE_GLES/ Emscripten - Compile-time
PINGUS_DEFAULT_DATADIRfrom CMakeDATA_PREFIX(wasm preload at/data) - Shader-based OpenGL path shared by OpenGL 3.3 Core (desktop default)
and OpenGL ES 2.0 (
PINGUS_USE_GLES/ Emscripten):opengl_program.*, VBO draws, no fixed-function / no legacy GL emulation - Runtime verification on desktop GL 3.3, wasm GLES2, Android GLES2
- Runtime verification of data path (
DATA_PREFIX/ preload) on each port
- Run
nix flake lockafter input changes; prune unused lock nodes - CI:
nix build .#pingus+ optional port smoke jobs - Consider vendoring Win32 SDL under
external/later (optional)
- GP2X / Wiz / Open2x (explicitly excluded)
- Archive write, remote VFS, or other non-port features
- Pixel-perfect SuperTux Milestone 1 feature parity (different game)
nix build .#pingus
nix build .#pingus-win32-x64
nix build .#wasm-sdl-libs # SDL stack only
nix build .#pingus-wasm # full wasm app (WIP)
nix build .#arkos-sysroot
nix build .#pingus-r36s # WIP
nix build .#pingus-android # WIP- SuperTux Milestone 1 ports (source of packaging patterns): https://github.com/SuperTux-Origins/supertux-milestone1
- Pingus repo: https://github.com/Pingus/pingus