Discuss Scratch

EPICPIKAGUY
Scratcher
100+ posts

Scratch to Javascript converter

The4thPixel wrote:

Support, if it's possible. I'd like to be able to download my games and upload them to gamejolt or something without having to worry about people remixing or cheating.
I'd also support a scratch to exe converter if it's possible.

Although it's not as easy (or encouraged), you can still pirate and cheat on Javascript games. Even “real” games get pirated a lot, and cheating is a huge problem for many games.

Someone made a scratch to exe for scratch 1.4, but none exists for 2.0.
garlicbreathinator
Scratcher
48 posts

Scratch to Javascript converter

Well, scratch is being rewritten in javascript already! Scratch 3.0, planned to be released in August, is going to be written in javascript. Here's a link to the beta: https://llk.github.io/scratch-gui/ In the meantime, go ahead and use the phosohorus or sulfurious compilers: phosphorus.github.io https://sulfurous.aau.at/ .

Dear Algebra,

I am sick and tired of finding your X. Just accept that she is gone. Move on!
Ashington06
Scratcher
4 posts

Scratch to Javascript converter

This would be awesome!
xCommander12
Scratcher
20 posts

Scratch to Javascript converter

Well if you go to see inside and do Control+U all the code should pop up in JavaScript, which up can later copy into another app that reads JS.
xCommander12
Scratcher
20 posts

Scratch to Javascript converter

I mean that's the best Scratch has
conzokwan25
Scratcher
4 posts

Scratch to Javascript converter

it could be a zipped HTML project with gif images for sprites and a javascript script
EPICPIKAGUY
Scratcher
100+ posts

Scratch to Javascript converter

conzokwan25 wrote:

it could be a zipped HTML project with gif images for sprites and a javascript script

Actually, that would make a lot of sense!
christophert9015
Scratcher
1 post

Scratch to Javascript converter

Scratch is operated primarily with the costumes, backdrops, and sounds, which mainly come from the library. This may not seem like a big difference from regular code, ike js, but it is. In order for it to work, you have to have every single one of the files on the scratch cloud on the subject of any specific project you want to view downloaded to the computer you are using, otherwise, the project would only show pen elements, and not the kind in the editor, but the pen scripts.
(These Kinds:)
pen down
pen up
set pen color to [#74c086]
change pen color by (10)
set pen color to (1001)
And you can only show the proper images, if you download all of the project files, which could easily take up a terabyte of data on your computer, and that's why you can't convert scratch to js and back. Anyone trying to show you a converter that works, is a liar, or just has millions of terabytes of storage on their computer.

Last edited by christophert9015 (May 9, 2018 00:06:10)

MaxxMakes
Scratcher
4 posts

Scratch to Javascript converter

when green flag clicked
convert to javascript


Some thing like this perhaps?

Last edited by MaxxMakes (May 9, 2018 00:17:04)

SuperC_03
Scratcher
1 post

Scratch to Javascript converter

Sigton wrote:

The problem is Scratch doesn't function the same way as any other languages, and is often extremely difficult to represent Scratch code as text. For example, what would a sprite be in javascript? The backdrop, costumes, sounds and so on and so forth.

Sigton

The background image could be replaced by the “background-image” css attribute. (ie.

<style>
body {
background-image: src(https://scratch.mit.edu/images/scratch-og.png);
};
</style>
EPICPIKAGUY
Scratcher
100+ posts

Scratch to Javascript converter

christophert9015 wrote:

Scratch is operated primarily with the costumes, backdrops, and sounds, which mainly come from the library. This may not seem like a big difference from regular code, ike js, but it is. In order for it to work, you have to have every single one of the files on the scratch cloud on the subject of any specific project you want to view downloaded to the computer you are using, otherwise, the project would only show pen elements, and not the kind in the editor, but the pen scripts.
(These Kinds:)
pen down
pen up
set pen color to [#74c086]
change pen color by (10)
set pen color to (1001)
And you can only show the proper images, if you download all of the project files, which could easily take up a terabyte of data on your computer, and that's why you can't convert scratch to js and back. Anyone trying to show you a converter that works, is a liar, or just has millions of terabytes of storage on their computer.

What do you mean “millions of terabytes of data”? A single scratch project should only take up a few megabytes of data.

If you’re trying to suggest that the entire costume library, you’re wrong. You don’t need every single image in the library, you only need the ones scratch uses. And even if you somehow needed the entire library, that’s not a big deal, because the library shouldn’t take up more than a couple hundred megabytes, max.

If you’re trying to suggest that you would need every single image that represents every combination of pen drawings because JS can’t support an equivalent pen blocks, you’re wrong. CanvasRenderingContext2D, which is natively supported in javascript, has methods for rendering images AND drawing lines on the screen.

If you’re trying to suggest that anyone claiming to have made a converter is a liar, you’re wrong. Phosphorus is a scratch-to-js converter that works on any project you give it. Note that, if converting really required “hundreds of terrabytes,” the webpage would crash due to insufficient space. But it doesn’t. Because you don’t need that much space.

Also, scratch 3.0 is being developed in javascript. It has the ability to load in .sb2 projects. It’s completely open source, so you can check out the code if you really believe they’re somehow pulling your leg.

I’m not trying to be mean, but I’m just saying: Scratch-to-js is possible, and has already been done. In fact, once scratch 3.0 comes out, javascript will be the norm.

Last edited by EPICPIKAGUY (May 29, 2018 18:08:23)

kkidslogin
Scratcher
1000+ posts

Scratch to Javascript converter

gavinskycastle wrote:

That would be great to have. You could play the game like if it was an actual video game, instead of a Scratch project. JavaScript is very hard to learn, especially for young kids and adults. Almost anyone could learn Scratch with a little bit of research, so kids could program proper games!

What is annoying is how hard it might be to create a converter. While you can convert .sb files with a converter, nobody has come up with a real solution to the problem. You could convert .sb2 files to .sb (there is a converter for that,) and then convert .sb to .jar, however new features of Scratch 2.0 will not work here.

I think it is a great idea overall!

cloning wont be a problem.

Forum Clout: 232,655. Alright, who ate my Kumquats? Finally foruming again. Support for reasons in OP and no support for all the other reasons.



Enjoy my music.

[small]non-member post, take whatever I say with a hint of salt and remember there's no authority behind it[/small]
Whatsfordinner77
Scratcher
100+ posts

Scratch to Javascript converter

good idea for 3.0 (its a html/js program Going to be text to program scratch.)
bad for 2.0. Just convert sb2 to swf to put on web and html.

Last edited by Whatsfordinner77 (June 14, 2018 00:26:25)


GANGSTER
Mr_PenguinAlex
Scratcher
1000+ posts

Scratch to Javascript converter

If you want java, why not go to java instead of turning another thing into java?

TheAdriCoolManDude
Scratcher
1000+ posts

Scratch to Javascript converter

*cough* *cough* Scratch 3.0 is in Javascript *cough* *cough*


ScratchDiogoh
Scratcher
1000+ posts

Scratch to Javascript converter

Mr_PenguinAlex wrote:

If you want java, why not go to java instead of turning another thing into java?
Yes

Last edited by ScratchDiogoh (June 4, 2018 20:55:17)


+1700 Bad Posts
DaEpikDude
Scratcher
1000+ posts

Scratch to Javascript converter

Mr_PenguinAlex wrote:

If you want java, why not go to java instead of turning another thing into java?
*Javascript.

Java and Javascript are two VERY different languages.

And all the world over, each nation's the same,
They've simply no notion of playing the game.
They argue with umpires, they cheer when they've won,
And they practice beforehand, which ruins the fun!
Mr_PenguinAlex
Scratcher
1000+ posts

Scratch to Javascript converter

DaEpikDude wrote:

Mr_PenguinAlex wrote:

If you want java, why not go to java instead of turning another thing into java?
*Javascript.

Java and Javascript are two VERY different languages.
Oh, i didnt know that.

mystery4000
Scratcher
100+ posts

Scratch to Javascript converter

I don’t know if this applies to only unity js, but aren’t event systems in js complex and difficult? Then again, if scratch 3.0 is being written in js, then I guess they know a way around it.

Edit: the reason I pointed out events in js is because of if they could translate over

Last edited by mystery4000 (June 5, 2018 22:49:15)

oleg-bronzhaiev
New to Scratch
1 post

Scratch to Javascript converter

Excuse me guys,

but if Scratch 3.0 is powered by Javascript mostly. It doesn't necessarily mean it'll support blocks <-> JS convertion. I didn't find such feature officially claimed.

Powered by DjangoBB