GithubHelp home page GithubHelp logo

dungeonation / graze Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 1.0 2.46 MB

Rewrites Scratch projects as GameMaker 1.4 projects

License: GNU General Public License v3.0

Python 25.32% Game Maker Language 0.08% XML 74.61%
python scratch converter gamemaker-language gamemaker-studio scratch2

graze's Introduction

Graze Logo
Rewrites Scratch projects as GameMaker 1.4 projects

Graze is a Python program that parses an unzipped .sb2 Scratch project file, and rewrites the project as a GameMaker 1.4 project. With this, you can free your games and software from Scratch and leverage the power of GameMaker Studio 1.4, which can then be converted to GameMaker Studio 2 if need be. Use GameMaker's exporting capabilities, improve performance, add save data to games, or add Medals or Highscores in web game form using something like the Newgrounds.io API.

Only Scratch 2.0 projects are supported right now but Scratch 3.0 support is possible as it's just a different .json format, and will happen in the future.

Setup

Contributing to or testing the tool in its current in-development state requires Python 3.8 or greater.

Install Python dependancies from the requirements.txt file:

pip install -r requirements.txt

Project Status

As of the GitHub release in August 2021 Graze can only convert over sprites and sounds and establish variables, and is in the beginning stages of converting code. Check changelog.txt frequently as development continues. To check to see if your Scratch project is compatible, also check compatibilitystatus.txt for the status of Scratch block support in Graze.

Using Graze

First off, download Python and make sure you have the libraries needed installed from the command line (Here's how to do that if you're a novice). You'll also need GameMaker Studio 1.4 or higher of course.
Now download this repository and put it all in its own folder so you don't screw up any of your other files. This tool uses file manipulation, moving, deleting, etc. (In Graze's early stage, check for updates on GitHub!)
A fresh download has the empty GameMaker project folder unzipped in the main folder which Graze will refer to. But for future conversions, delete or move that project folder, and within the blank gamemaker template folder, unzip the .zip into the main folder.

GrazeConvert.py

Running this in Python immediately begins the conversion process, and runs until finished or encountering an error, then prompting you to press any key to halt the program. Don't run it if you're not ready!
If you run it in the command line instead of within the Python shell, and instead of an error handler in the code itself it just crashes - it'll just close instead of telling you I think. Run it in the Python shell to get a crash report.

GrazeTesting.py

For outputting parsed JSON.

scratchproject

This folder is what Graze refers to for the unzipped Scratch project that you wish to convert. Take your Scratch 2.0 (.sb2) file and change the file extension to .zip (dunno how to do that? Look up how to show file extensions in file names in your version of Windows or whatever, then you can type in a new file extension when renaming the file. Ignore warnings from doing so), then unzip it into the scratchproject folder. Everything in that folder should just be your unzipped Scratch project for conversion, and also keep a backup of the original .sb2 file!!

FinishedGame.gmx

The GameMaker project folder Graze works with. It can't just be any old GameMaker project 'cuz this one has unique scripts in it and is also already in the frame rate and screen size of a Scratch project.

blank gamemaker template

I just have this here for unzipping a blank copy of the GameMaker project into the main folder for a new conversion.

License

Graze is licensed under the GNU General Public License v3.0. GameMaker is copyright Yoyo Games. Scratch has stated Scratch projects are under the Creative Commons Attribution-ShareAlike license, and making a Scratch project and converting it to GameMaker with Graze both allow you to sell your finished project, or distribute it places as you wish. :)

Contribution

Contributions from everyone are welcome! Any contribution submitted for inclusion in Graze consents to being included and being under the same license as Graze.
An unzipped .sb2 file is all the sprites and sounds the Scratch project uses numbered, as well as the all-important project.json which contains all the information on the project and its code.
Scratch has us covered on documentation on the .sb2 file format and its .json, that can be found here.
The goal of Graze is to mimic the behavior of the original Scratch project as close as possible in GameMaker without undesired behavior after conversion. Some functions of Scratch such as Extensions and Cloud Variables, will not be able to be supported in Graze.

graze's People

Contributors

bfrymire avatar dungeonation avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

jaspergreyj

graze's Issues

.JSON error? :(

Hi, I have these two errors

Screenshot_2

Screenshot_1

I've already unzipped the .sb2 file in scratchproject folder but it still says .JSON project could not be found.
What do I do?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.