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
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.
Offline
So that's to be discarded then, unless you're planning an editor too?
Offline
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.
Offline
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)
Offline
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
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)
Offline
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
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
Last edited by fanofcena (2012-02-09 11:04:40)
Offline
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.
waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaat ??? dont feel low dude!
Offline
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.waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaat ??? dont feel low dude!
Thanks for trying to cheer me up.
Offline
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.
Whatchya think?
Offline
bunp
Offline
fanofcena wrote:
[/deadthread] <- indicating mods
Yep. ;__;
Offline
I might take this up on my own time. I think I know how now.
Offline
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
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.
Offline
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
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.
Offline
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
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?
Offline
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
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...
Offline