How to convert a SB3 file to an EXE
Asked Answered
O

4

5

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.

Odellodella answered 14/8, 2019 at 12:0 Comment(1)
The Scratch wiki extensively covers the possibilities: en.scratch-wiki.info/wiki/Porting_Scratch_ProjectsUlulant
Y
7

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!

Yuletide answered 3/10, 2019 at 14:2 Comment(1)
The vector fonts being broken is no prob since I only use bitmap, and this is a very good answer! Thank you.Odellodella
T
2

There might not be a specific or direct way to convert a Sb3 File to an exe file but You can do it indirectly in a few steps which might be kind of lengthy but works. When your SB3 project is done, go to https://sheeptester.github.io/htmlifier/ And convert your sb3 file to html. From there you can convert the html file you got just now to an exe file, but not as you might expect it to. You cannot convert an html page to an exe file so what you can do is add the html webpage (the scratch game now converted to a html webpage) as an 'embed' file in the software such as, like Unity or Visual Basic, as they allow html webpages to be embedded in a project. Then you can add features and stuff, then publish or export your project as an exe file.

I know the process is really lengthy and I practically just wrote a long boring thesis but this might be the only way you can convert scratch to exe. Hope my answer helps! Hasta La Vista

Tout answered 5/6, 2022 at 9:53 Comment(1)
@AdamWalker's answer explains the process after "htmlify-ing" the project.Johiah
R
1
  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/

Rundlet answered 30/11, 2019 at 9:32 Comment(0)
A
-2

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.

Arrowroot answered 2/9, 2019 at 23:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.