A library for C++ based Scratch project players
Report Bug
·
Request Feature
libscratchcpp is a library for building C++ based Scratch project players.
It provides an API for reading and running Scratch projects which makes it easy to create a GUI application that runs Scratch projects.
The idea is to implement Scratch blocks in C++ to build a fast project player that is faster than the original Scratch VM.
This library is still in development and it shouldn't be used to build complete Scratch project players yet.
There might be incompatible API changes anytime before version 1.0.0 releases!
We're working on the documentation, it'll be available soon.
A minimal CLI program for running Scratch projects:
#include <scratchcpp/project.h>
int main(int argc, char **argv) {
libscratchcpp::Project p("/path/to/project.sb3");
bool ret = p.load();
if (!ret)
return 1;
p.run();
return 0;
}
Loading projects from scratch.mit.edu is supported too:
libscratchcpp::Project p("https://scratch.mit.edu/projects/XXXXXX");
libscratchcpp::Engine::run()
)See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
git checkout -b feature/AmazingFeature
)clang-format src/some_file.cpp
)git add -A && git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the Apache-2.0 License. See LICENSE for more information.