scratchcpp / libscratchcpp

C++ library for building Scratch project players
Apache License 2.0
24 stars 8 forks source link
cpp scratch scratch-implementation scratch3

Contributors Forks Stargazers Issues MIT License


libscratchcpp

A library for C++ based Scratch project players

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License

About The Project

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.

NOTE

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!

(back to top)

Getting Started

We're working on the documentation, it'll be available soon.

(back to top)

Usage

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");

(back to top)

Roadmap

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Format changed source files (clang-format src/some_file.cpp)
  4. Commit your Changes (git add -A && git commit -m 'Add some AmazingFeature')
  5. Push to the Branch (git push origin feature/AmazingFeature)
  6. Open a Pull Request

(back to top)

License

Distributed under the Apache-2.0 License. See LICENSE for more information.

(back to top)