A half-broken C++ software to play simple Scratch games offline using SDL2.
Download the latest release of the software or compile it yourself.
Then, acquire the .sb3
file of whatever Scratch project you want to play, and drag-and-drop it onto the software's executable.
(Alternatively, you can do this on your favourite terminal, by passing the path of the .sb3
file as the first argument of the command.)
- Blocks from the "data", "procedures" and "argument" category aren't supported
- Custom blocks aren't supported
- Backgrounds and sprites that have text won't render it, due to SDL2_image limitations
- A lot of heavy projects won't run properly or will lag
To compile this software, you'll need:
- Visual Studio 2022 (future-proof link to older versions), older versions weren't tested but should work with some edits
- Desktop C++ Development tools for Visual Studio 2022 (Check the corresponding checkbox in the Visual Studio Installer)
SDL2, SDL2_image and SDL2_ttf are included as compiled binaries in this repo. However, for obvious safety reasons, it is always recommended to compile these by yourself. For this, check the instructions from the corresponding repos.
zlib
and libzip
need to be compiled by hand, though. For this:
- Open
zlib
's solution file (Libs/zlib-win-build/build-VS2022/zlib.sln
) with Visual Studio 2022 - Build the solution with the targets you're interested in (
Debug
/Release
forWin32
/x64
) - Repeat the process with
libzip
's solution file (Libs/libzip-win-build/build-VS2022/libzip.sln
), with the same targets aszlib
- It is required for you to build
zlib
first, aslibzip
relies onzlib
to build itself.
Once that libraries are compiled, open the solution file located at the root of the repo with Visual Studio 2022 and try to build the solution with the same targets as zlib
and libzip
.
You should be able to find the output executable at the root of the repo, in folders having names matching your targets.
Add the DLLs from your builds in the same folder and it should run. If you're struggling with that, I've uncluded a DLLs folder containing all of them, sorted by target. Do note that again, it is always recommended to use your own DLLs, as using ones from strangers could compromise your computer.
This project is widely unfinished!
I've started it a few months ago but eventually lost the motivation to finish it, but I'm publishing it in the hopes of it being useful to someone.
Please refer to the LICENSE file.
libsdl for SDL2, SDL2_image and SDL2_ttf.
nlohmann and his contributors for json library
Mark Adler, Jean-loup Gailly and their contributors for zlib
Dieter Baron, Thomas Klausner and their contributors for libzip
Kelvin Lee for his zlib-win-build and libzip-win-build repositories