'How to convert a SB3 file to an EXE

I'm creating a game on Scratch 3, however, when I'm finished with it, I want to convert it to an .exe file. How do I do this?

I've been interested in game development for a long time, and have even tried Unity before, but I'm just a beginner meaning it was too difficult for me. So I turned to Scratch.



Solution 1:[1]

Yes, It is possible! ...But it's kinda complex, Bear with me!

First, Take your sb3 file and convert it into a sb2. To do this I recommend using rexscratch's sb3tosb2 tool. Found here: https://github.com/RexScratch/sb3tosb2 Make sure you have python installed, if you don't, google how to install it. (it's easy). Next, Click Clone or Download then click Download ZIP. Once that is downloaded, Open the zip, go to the next folder, and execute sb3tosb2.py . This will then ask for a sb3 file, Navigate to the sb3 file you have and select it. It may say it wants to work in compatibility mode, if it does, Just accept it. It will finish up and ask you where to put a sb2 file, just place it on your desktop and name it something.

Secondly, We need to use a program called junebeetle, Don't worry, it's a web based one, found here: https://junebeetle.github.io/converter/online/
Click open scratch file. It will ask for a sb2, Navigate to where you put the sb2 file and open it. If you want you can customize how it will open, you can. I like to use the auto start function, and fullscreen. Don't mess with the resolution unless you know not how to screw-up aspect-ratios. Then click "Convert to SWF" This will then download the SWF version the scratch game, simply name it what you want and leave it.

Finally, you need to convert the SWF file to an EXE, There are plenty of ways to do this, but for ease, I recommend using a lite file converter. SWF Tools is a good one found here: https://sourceforge.net/projects/swftools/files/SwF_To_eXe/Swf2eXe_Latest.zip/download

Let it download and then extract the zip file's content to your desktop or downloads folder. Then open the exe file inside the folder from the zip file you just extracted. Almost there! Click "Add a file" Then, you guessed it, Navigate to the SWF file that was spat out from the conversion of the sb2. Then click "Convert" Let it do its thing, and soon it will finish. Boom, Done. To find your exe file, go to where you stored the SWF to EXE converter, go to the "Output" Folder, and infront of you, is your EXE File! Note: Your anti-virus might freakout, this is normal when making new programs. Also, Some fonts may break, This is just a side effect of the sb3 to sb2 conversion due to the fact that there is currently no way to convert sb3 to SWF. Hopefully that was easy enough to understand. It is a complicated process, But yields results! If you have any issues, Just Ask! I can help!

Solution 2:[2]

You could use the TurboWarp Packager. It's free and safe. https://packager.turbowarp.org/

Solution 3:[3]

  1. Convert your Scratch project to HTML using Scratch HTMLifier: https://sheeptester.github.io/words-go-here/htmlifier/

  2. Download NW.js and put its files (nw.exe, ...) in a directory. Create a package.json file in that directory that should look like this:

{
   "name": "Project",
   "main": "project.html"
}

(replace Project with the name of your project and project.html with the name of your HTML file).

  1. Make sure that your project runs when you start nw.exe.

  2. Use any tool to turn your folder into a self-extracting archive.

See also: https://scratch.mit.edu/discuss/topic/341617/

Solution 4:[4]

You can do what Adam said. But you said that Unity was too hard for you. Well, there are much better options than Scratch:

  1. Javascript Canvas Game Development: You can use some Javascript and HTML to make games that run in the browser

  2. Python Game Development using Pygame: You can use the Pyagme library with python to make awesome 2d games in a few minutes

You can search up these things in YouTube.

Solution 5:[5]

Currently, there is no software or smart javascript tricks that can convert .sb3 files into .exe files. You could use an .sb2 file but you need to use Scratch 2.0. There are developers working on conversion programs that do .sb3 to .exe but that will take a while. I would recommend using Scratch 2.0 if you want to convert your Scratch games to an executable.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Flimzy
Solution 2 Loves2Code
Solution 3
Solution 4 Ayushman Das
Solution 5