This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#201 2011-12-31 10:33:38

Dawgles
Scratcher
Registered: 2011-07-29
Posts: 100+

Re: JsScratch viewer development thread

MathWizz wrote:

Here if some JSON for a raw script directly from the Scratch file:

Code:

[{"x":20,"y":747},[["changeVariable","HighScore","setVar:to:",["readVariable","Score"]]]]

Can you do anything with that?

I don't see where the x and y parts come into it, otherwise it looks like it's setting HighScore to Score. I'm pretty sure if I looked into it, I could write something to decipher blocks like this and convert into functions/raw js.

Last edited by Dawgles (2011-12-31 10:36:32)

Offline

 

#202 2011-12-31 11:00:41

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: JsScratch viewer development thread

Dawgles wrote:

MathWizz wrote:

Here if some JSON for a raw script directly from the Scratch file:

Code:

[{"x":20,"y":747},[["changeVariable","HighScore","setVar:to:",["readVariable","Score"]]]]

Can you do anything with that?

I don't see where the x and y parts come into it, otherwise it looks like it's setting HighScore to Score. I'm pretty sure if I looked into it, I could write something to decipher blocks like this and convert into functions/raw js.

The x and y are the x and y coordinates of the script in Scratch.


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#203 2011-12-31 11:03:19

Dawgles
Scratcher
Registered: 2011-07-29
Posts: 100+

Re: JsScratch viewer development thread

So that's to be discarded then, unless you're planning an editor too?

Offline

 

#204 2011-12-31 11:05:25

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: JsScratch viewer development thread

Dawgles wrote:

So that's to be discarded then, unless you're planning an editor too?

Maybe in the future, but not now.


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#205 2011-12-31 13:19:20

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: JsScratch viewer development thread

MathWizz wrote:

Dawgles wrote:

Just some foresight, won't this run a little worse than it could because you're using morphic? That's a considerable overhead that you could do away with by making it 100% native.

Potentially. I'm beginning to think about ditching it mainly because of rotating sprites that morphic does not support (it may in the future, idk.) If I weren't so busy, I'd be working on it right now...

But then you'd be doing exactly the same thing as me...I chose to make a native-canvas MVC framework because the player is very centered around the data (the Scratch project that is read from the file). I haven't worked on it in a while because I'm doing something for the block library, though.


nXIII

Offline

 

#206 2011-12-31 13:20:30

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: JsScratch viewer development thread

nXIII wrote:

MathWizz wrote:

Dawgles wrote:

Just some foresight, won't this run a little worse than it could because you're using morphic? That's a considerable overhead that you could do away with by making it 100% native.

Potentially. I'm beginning to think about ditching it mainly because of rotating sprites that morphic does not support (it may in the future, idk.) If I weren't so busy, I'd be working on it right now...

But then you'd be doing exactly the same thing as me...I chose to make a native-canvas MVC framework because the player is very centered around the data (the Scratch project that is read from the file). I haven't worked on it in a while because I'm doing something for the block library, though.

*sign* Always one step ahead of me.

EDIT: Wow. A sign. XD

Last edited by MathWizz (2011-12-31 13:28:36)


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#207 2012-02-07 15:32:07

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: JsScratch viewer development thread

I'm gonna have to quit. I wasn't ever much of a help.
I've always felt like (and proved) that I was a good programmer. You guys are just...better. :\

I'm sorry.

Offline

 

#208 2012-02-07 19:43:50

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Re: JsScratch viewer development thread

Its okay I haven't done much either, I have learned lots of binary since then so I might try reading that source code again. I hope to get this thing working.

PS new sig.

Last edited by midnightleopard (2012-02-07 19:44:42)


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#209 2012-02-09 11:02:46

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: JsScratch viewer development thread

Would you consider me joining in ? , been a front-end back end -developer / designer for a while now ^_^,

Fluent in JavaScript , HTML 5 , CSS 3 ..

** Skills **
----------------------------------------

* Mobile Development
* Code Optimization
* Server-Client Communication
* Fluency in Server / Client side javascript

-----------------------------------------

By the way kindly use SVG for ScratchJS or DIV becasue you will require object orientation to a higher level then canvas can provide ,

canvas ofcourse can be coded for it but then the javascript being processed will slow it down  sad

For binary reading consider this solution

Use Node.js to read the file on server side and push the JS output to the client side in  either JSON or simple JS object format  smile

Last edited by fanofcena (2012-02-09 11:04:40)


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#210 2012-02-09 11:05:29

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: JsScratch viewer development thread

ProgrammingFreak wrote:

I'm gonna have to quit. I wasn't ever much of a help.
I've always felt like (and proved) that I was a good programmer. You guys are just...better. :\

I'm sorry.

yikes  waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaat ??? dont feel low dude!


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#211 2012-02-09 12:20:21

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: JsScratch viewer development thread

fanofcena wrote:

ProgrammingFreak wrote:

I'm gonna have to quit. I wasn't ever much of a help.
I've always felt like (and proved) that I was a good programmer. You guys are just...better. :\

I'm sorry.

yikes  waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaat ??? dont feel low dude!

Thanks for trying to cheer me up.

Offline

 

#212 2012-02-16 11:29:18

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: JsScratch viewer development thread

I had an idea. Bookmarklets.
You could go to a scratch project, then click the bookmarklet, and then it takes you to the website, playing that project.  smile

Whatchya think?

Offline

 

#213 2012-02-18 09:51:05

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: JsScratch viewer development thread

bunp

Offline

 

#214 2012-02-18 10:05:52

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: JsScratch viewer development thread

[/deadthread] <- indicating mods


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#215 2012-02-20 15:51:26

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: JsScratch viewer development thread

fanofcena wrote:

[/deadthread] <- indicating mods

Yep. ;__;

Offline

 

#216 2012-04-07 10:15:30

JoLLDS
Scratcher
Registered: 2011-04-26
Posts: 63

Re: JsScratch viewer development thread

Internet does not work

"Connecting to client ...
Connected!
Connected to server ...
Error! "

because?

Offline

 

#217 2012-04-07 20:52:46

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Re: JsScratch viewer development thread

I might take this up on my own time. I think I know how now.


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#218 2012-04-08 04:38:22

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: JsScratch viewer development thread

midnightleopard wrote:

I might take this up on my own time. I think I know how now.

Really? I'd love to see this completed! Maybe a sourceforge svn too?

Offline

 

#219 2012-04-09 21:10:44

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Re: JsScratch viewer development thread

who knows. I haven't done a big project in a while, but I finally figured out binary, and the scratch file format so i think I can do it. I know canvas like no other.


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#220 2012-04-10 05:27:15

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: JsScratch viewer development thread

midnightleopard wrote:

who knows. I haven't done a big project in a while, but I finally figured out binary, and the scratch file format so i think I can do it. I know canvas like no other.

Then I can't wait to see it!
I might take on development of the 2.0 reader and player, if people start making mods of the new version.

Offline

 

#221 2012-04-10 05:33:00

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: JsScratch viewer development thread

Has anyone ever noticed that JsScratch won't work properly for projects that use the arrow keys or space because they scroll through the page while you're trying to play the project.


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&amp;display=small

Offline

 

#222 2012-04-10 05:37:30

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: JsScratch viewer development thread

nathanprocks wrote:

Has anyone ever noticed that JsScratch won't work properly for projects that use the arrow keys or space because they scroll through the page while you're trying to play the project.

You could hide the rest, or hope there's some kind of focus function to be released?

Offline

 

#223 2012-04-10 05:44:09

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: JsScratch viewer development thread

LS97 wrote:

nathanprocks wrote:

Has anyone ever noticed that JsScratch won't work properly for projects that use the arrow keys or space because they scroll through the page while you're trying to play the project.

You could hide the rest, or hope there's some kind of focus function to be released?

So you could use toggle-able divs or something?


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&amp;display=small

Offline

 

#224 2012-04-10 07:46:47

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: JsScratch viewer development thread

nathanprocks wrote:

LS97 wrote:

nathanprocks wrote:

Has anyone ever noticed that JsScratch won't work properly for projects that use the arrow keys or space because they scroll through the page while you're trying to play the project.

You could hide the rest, or hope there's some kind of focus function to be released?

So you could use toggle-able divs or something?

Exactly. That still poses the problem of <380-tall browser windows, but that's very rare.

Last edited by LS97 (2012-04-10 07:47:33)

Offline

 

#225 2012-04-10 08:51:38

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: JsScratch viewer development thread

nathanprocks wrote:

Has anyone ever noticed that JsScratch won't work properly for projects that use the arrow keys or space because they scroll through the page while you're trying to play the project.

I thought one had to put "e.preventDefault()" in the event handler code somewhere...


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

Board footer