Discuss Scratch

the_electro_bros
Scratcher
69 posts

SB3 to Java converter

Is there a SB3 to Java converter?
Not JavaScript, only java.

—————————-
ELECTRO CORP.
———————–

Windows is AWESOME!!
ELECTRO CORP ©2015-2020

Please check our Terms of Service
Windows has encountered a fatal error. Windows cannot continue. Press Ctrl-Alt-Del to continue…
vcokltfre
Scratcher
100+ posts

SB3 to Java converter

That would mean creating something that translates not just JavaScript, but also HTML and CSS into Java probably using some engine like OpenGL… God I hate the idea of being the one to create it but that would be awesome if it existed, especially if it were open-source

GENERATION 363: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment. I did not start this.

set [neuron#6352] to [0.164523846]
set [neuron#6353] to [0.938245764]
set [neuron#6354] to [0.983563488]
set [neuron#6355] to [0.527382948]
set [neuron#6356] to [0.163548436]
set [neuron#6357] to [0.983456385]
aero-a
New to Scratch
20 posts

SB3 to Java converter

Why would you want such a converter, anyways? What are you trying to achieve?

“My friends are my power!”

https://www.youtube.com/channel/UCrfnCA2F291UGwAw6ePctAg
vcokltfre
Scratcher
100+ posts

SB3 to Java converter

If you were able to convert to Java it would make the projects so inconceivable fast as compared to running natively on scratch, as Java is compiled to Java Bytecode and ran on the JVM, rather than being JIT compiled by V8

GENERATION 363: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment. I did not start this.

set [neuron#6352] to [0.164523846]
set [neuron#6353] to [0.938245764]
set [neuron#6354] to [0.983563488]
set [neuron#6355] to [0.527382948]
set [neuron#6356] to [0.163548436]
set [neuron#6357] to [0.983456385]
the_electro_bros
Scratcher
69 posts

SB3 to Java converter

I found a way.
1.Convert sb3 to sb2
2. Convert to JavaScript via phosphorus
3.Javascript to Java converter!

—————————-
ELECTRO CORP.
———————–

Windows is AWESOME!!
ELECTRO CORP ©2015-2020

Please check our Terms of Service
Windows has encountered a fatal error. Windows cannot continue. Press Ctrl-Alt-Del to continue…
Epicness123
Scratcher
1000+ posts

SB3 to Java converter

the_electro_bros wrote:

I found a way.
1.Convert sb3 to sb2
2. Convert to JavaScript via phosphorus
3.Javascript to Java converter!
I don't think you quite understand how Java and JavaScript work.
Despite the name similarities, they are not based on each other- they are two entirely different languages.
You can't simply convert JavaScript to Java- you'd need to rewrite the entire code from scratch.

Sadly, my kumquats were eaten by an evil forum signature.

the_electro_bros
Scratcher
69 posts

SB3 to Java converter

I know about JavaScript because I am fluent in it, and learning Java.
There are converters available online.
The conversion is difficult due to different numerical arrays, however is possible.

—————————-
ELECTRO CORP.
———————–

Windows is AWESOME!!
ELECTRO CORP ©2015-2020

Please check our Terms of Service
Windows has encountered a fatal error. Windows cannot continue. Press Ctrl-Alt-Del to continue…
Maximouse
Scratcher
100+ posts

SB3 to Java converter

the_electro_bros wrote:

I know about JavaScript because I am fluent in it, and learning Java.
There are converters available online.
The conversion is difficult due to different numerical arrays, however is possible.
Yes, it's possible, but JavaScript generated by Phosphorus uses a HTML canvas to render things. This is not possible in Java. Also, why do you need to convert your project to Java? If you want to create an Android app, use Scratch HTMLifier to create a HTML file and then use something like PhoneGap to build the app.


Pixel art editor: create pixel art and download it to your computer as a BMP file
the_electro_bros
Scratcher
69 posts

SB3 to Java converter

Also, why do you need to convert your project to Java?
Well, I am creating a PC game, but I made a small(yet large) part in Scratch, so I was trying to port it, so I didn't need to rewrite it. I will keep looking into it, but does anybody have some ideas?

—————————-
ELECTRO CORP.
———————–

Windows is AWESOME!!
ELECTRO CORP ©2015-2020

Please check our Terms of Service
Windows has encountered a fatal error. Windows cannot continue. Press Ctrl-Alt-Del to continue…
Maximouse
Scratcher
100+ posts

SB3 to Java converter

the_electro_bros wrote:

Also, why do you need to convert your project to Java?
Well, I am creating a PC game, but I made a small(yet large) part in Scratch, so I was trying to port it, so I didn't need to rewrite it. I will keep looking into it, but does anybody have some ideas?
So if I understand correctly, you want to create one part of a game in Scratch and another in Java? I don't think that's possible


Pixel art editor: create pixel art and download it to your computer as a BMP file
the_electro_bros
Scratcher
69 posts

SB3 to Java converter

one part of a game in Scratch and another in Java
No, I already made one part, and realized I wanted to make it in Java, so I am trying to move it to Java.

—————————-
ELECTRO CORP.
———————–

Windows is AWESOME!!
ELECTRO CORP ©2015-2020

Please check our Terms of Service
Windows has encountered a fatal error. Windows cannot continue. Press Ctrl-Alt-Del to continue…
Jonathan50
Scratcher
1000+ posts

SB3 to Java converter

You could certainly write a compiler which would translate from Scratch to Java, but that would likely be more effort than rewriting your game, and the resulting code would probably be awkward and not take advantage of Java's features well.
the_electro_bros
Scratcher
69 posts

SB3 to Java converter

Ok. Thank you guys for all the tips! I really appreciate it!

—————————-
ELECTRO CORP.
———————–

Windows is AWESOME!!
ELECTRO CORP ©2015-2020

Please check our Terms of Service
Windows has encountered a fatal error. Windows cannot continue. Press Ctrl-Alt-Del to continue…

Powered by DjangoBB

Standard | Mobile