Discuss Scratch

squidoosh14
Scratcher
100+ posts

Convert to Java Code

I was thinking, it might come in handy if there were an option in the file dropdown menu in the editor, called ‘convert to java code’, and it would translate all the scripts into java language so you could use it in out-of-scratch programs.

Thx!
DimensionPvP
Scratcher
100+ posts

Convert to Java Code

This link compiles to java. I'm sure you can embed.

But converting to java code, I'm not sure to support or not.

Semi-support.
squidoosh14
Scratcher
100+ posts

Convert to Java Code

Umm, thanks but i just tried it and it did not work AT ALL.
Sigton
Scratcher
1000+ posts

Convert to Java Code

squidoosh14 wrote:

Umm, thanks but i just tried it and it did not work AT ALL.
What went wrong? Phosphorus normally works for me.

Sigton
squidoosh14
Scratcher
100+ posts

Convert to Java Code

Um i had a project (duh) that requires you to click a lamp and it turns the screen dark and shows a bunch of eyes, but when i clicked the lamp, everything turned white. The eyes didn't show up.
Sigton
Scratcher
1000+ posts

Convert to Java Code

squidoosh14 wrote:

Um i had a project (duh) that requires you to click a lamp and it turns the screen dark and shows a bunch of eyes, but when i clicked the lamp, everything turned white. The eyes didn't show up.
Isn't that a problem with your project rather than phosphorus?

Sigton
squidoosh14
Scratcher
100+ posts

Convert to Java Code

No i tried a different project just now and it did nothing at all, whereas it does exactly what it's supposed to on scratch.
Sigton
Scratcher
1000+ posts

Convert to Java Code

squidoosh14 wrote:

No i tried a different project just now and it did nothing at all, whereas it does exactly what it's supposed to on scratch.
Had it loaded correctly?

Sigton
squidoosh14
Scratcher
100+ posts

Convert to Java Code

squidoosh14 wrote:

No i tried a different project just now and it did nothing at all, whereas it does exactly what it's supposed to on scratch.
Here's the project.
alexphan
Scratcher
1000+ posts

Convert to Java Code

Do you mean Javascript or Java? They are two different languages.
Also, Java is object-oriented, so I don't know if it fits Scratch's structure.
Sigton
Scratcher
1000+ posts

Convert to Java Code

alexphan wrote:

Do you mean Javascript or Java? They are two different languages.
Also, Java is object-oriented, so I don't know if it fits Scratch's structure.
Well, I suppose Scratchblocks are OOP…

Sigton
geekygirlepicness101
Scratcher
22 posts

Convert to Java Code

that a good idea so we can learn different coding support

Last edited by geekygirlepicness101 (July 28, 2016 19:52:24)

Sigton
Scratcher
1000+ posts

Convert to Java Code

geekygirlepicness101 wrote:

that a good idea so we can learn different coding support
Learning one language by turning another into it isn't going to teach you much.

Sigton

Last edited by Sigton (July 28, 2016 19:54:14)

squidoosh14
Scratcher
100+ posts

Convert to Java Code

still it might come in handy
Sigton
Scratcher
1000+ posts

Convert to Java Code

squidoosh14 wrote:

still it might come in handy
We're looking for things that are going to be really useful and will benefit the entirety of Scratch, not things that “might be handy”

Sigton
squidoosh14
Scratcher
100+ posts

Convert to Java Code

let me rephrase that: it would come in handy if you implemented it.
Sheep_maker
Scratcher
1000+ posts

Convert to Java Code

What would a newly created Scratch project (with the default Scratch cat having this script:
whenthisspriteclickedmove10steps
in it) look like in Java code?

Last edited by Sheep_maker (July 29, 2016 03:16:37)

squidoosh14
Scratcher
100+ posts

Convert to Java Code

How would i know? Java is as vague to me as it is to Scratch–i don't mean that as a bad thing at all, btw.
Icey29
Scratcher
500+ posts

Convert to Java Code

Someone linked you to Phosphorous- a JavaScript based Scratch compiler. It isn't perfect, but it's good.
Converting Scratch to Java or JS would be very complicated. As @alexphan noted, the structure of Scratch is very different from Java. I personally feel that Python would be a tad closer.
Sigton
Scratcher
1000+ posts

Convert to Java Code

Icey29 wrote:

Someone linked you to Phosphorous- a JavaScript based Scratch compiler. It isn't perfect, but it's good.
Converting Scratch to Java or JS would be very complicated. As @alexphan noted, the structure of Scratch is very different from Java. I personally feel that Python would be a tad closer.
Not really, Python is also very different.
The only languages similar to Scratch are other block-based languages.

Sigton

Powered by DjangoBB