Insaniquarium Deluxe browser build: source code ================================================== The game on Retro Hideout (https://retrohideout.com/play/insaniquarium-deluxe/) is a WebAssembly build of the community "insaniquarium-port". That port is free software under the GNU Affero General Public License, version 3 (AGPL-3.0), so the source of the build, with the changes made for it, is offered here. Back to the game page: https://retrohideout.com/games/insaniquarium-deluxe/ What it is made from -------------------- - insaniquarium-port, revision 95d4aafe408b36e8a195982ad7acbae5fb6a0b33: the port itself (AGPL-3.0). https://github.com/SaMeiers/insaniquarium-port - WinFish, revision 61ddba10056621c7857ea6f822139c39c76a4019: the community decompilation of the game. The port reads it and corrects mistakes of the decompilation in port/fixups/apply-gamefixes.py. https://github.com/vindirect/winfish - PopLib, revision 45776cefdeb8cd5bd43ce7f345aa7be1807c7380: the framework. SDL3, SDL_ttf, OpenAL Soft, libopenmpt, libogg, libvorbis, FreeType, zlib, tinyxml2 and libcurl sit beneath it. Each keeps its own licence terms in its source folder. https://github.com/SaMeiers/PopLib Our changes ----------- Every change from those revisions is in one file: /insaniquarium/source/changes.diff (15 KB, plain text). In short, it makes the port build and run in a browser: WebAssembly thread settings and a larger thread stack, SDL3 built with threads, OpenAL playing through SDL3's Web Audio output, a saved-game folder kept in the browser's storage, the game's window left to the page (no fullscreen request on start), and the "check for updates" prompt switched off. The game regains focus when the browser returns with focus on a page control outside the canvas. One change reaches the game's rules (fix 12 in port/fixups/apply-gamefixes.py, inside changes.diff): in tank 4, from level 2, buying a Carnivore also unlocks the Ultravore and the weapon upgrade buttons, as it does in tank 1. Newly spawned guppies also initialize horizontal speed for both starting directions. The AGPL-3.0 licence text is at /insaniquarium/source/LICENSE-AGPL-3.0.txt. Build ----- Steps 1 to 3 are the port's own (its README has them); steps 4 to 6 are ours. Use a Linux shell with Emscripten (version at the end of this section) on the PATH. 1. git clone --recurse-submodules https://github.com/SaMeiers/insaniquarium-port && cd insaniquarium-port (the revisions above are the ones this build used: check them out in the port, in poplib and in external/winfish) 2. Apply changes.diff. It has one "=====" section for the port and one for each of poplib, poplib/external/SDL and poplib/external/openal: split it at those lines and run git apply -p1 for each section inside its own folder. 3. bash port/port.sh This regenerates port/winfish from external/winfish and runs the fixup scripts, including port/fixups/apply-browser.py from our changes. 4. The game's files, from your own installed copy, go in a folder named wasm-assets that sits NEXT TO the clone (the build reads ../wasm-assets from the port folder): the installed game's data, fishsongs, images, music, properties and sounds folders, and license.txt. Then run python3 port/verify-assets.py ../wasm-assets --fix-case to match the file-name capitals the game asks for. 5. cmake -S port -B build -DCMAKE_BUILD_TYPE=Release \\ -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \\ -DCMAKE_C_FLAGS=-pthread -DCMAKE_CXX_FLAGS=-pthread -DCMAKE_EXE_LINKER_FLAGS=-pthread \\ -DSDL_PTHREADS=ON -DPOPLIB_WITH_BASS=OFF -DPOPLIB_WITH_OPENMPT=ON \\ -DSDLTTF_VENDORED=ON -DSDLTTF_HARFBUZZ=OFF -DSDLTTF_PLUTOSVG=OFF 6. cmake --build build -j8 (the result is port/bin/Insaniquarium.js, .wasm and .data) The served files had the build machine's folder names replaced by same-length neutral text after the build, so their hashes below differ from a plain rebuild's. Emscripten: emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 6.0.1 (25e4e8d6550d392ba9e0c2936bce7cf41ee47cc0) The files this site serves -------------------------- - Insaniquarium.js SHA-256 1ad62e5fc2ad9094a3162b968ecae3da7438d015f2fa199517270097ca7add91 - Insaniquarium.wasm SHA-256 51646a13c7b84b6d22be1587c4da5daf41a37969ea32fcee69d4b5aa9fadd5be - Insaniquarium.data SHA-256 c50331bc2117b009bd51424bef674ebc74bc1b1d0e479f3295aa5739c8b51acf What is not included -------------------- The game's artwork, sound, music and level data are in Insaniquarium.data. They belong to PopCap Games and Electronic Arts and are not part of this source offer. Insaniquarium Deluxe is still sold: Steam (which has a free demo) https://store.steampowered.com/app/3320/Insaniquarium_Deluxe/ and EA https://www.ea.com/games/insaniquarium/insaniquarium Questions, or a request to change or remove the game: https://retrohideout.com/rights/contact/