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

#5026 2012-05-01 17:49:03

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

rookwood101 wrote:

I agree, it is extremely unstable in firefox

Which Firefox, which OS, what happens in Firefox's safe mode?  Tnx.


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#5027 2012-05-01 18:24:34

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

rookwood101 wrote:

I agree, it is extremely unstable in firefox

Which Firefox, which OS, what happens in Firefox's safe mode?  Tnx.

12.0 (latest version) windows 7 64 bit and the same thing happens.

I was reading an article the other day about getting smooth animations with the canvas and it mentioned a relatively new javascript function (http://creativejs.com/resources/requestanimationframe/ - requestAnimationFrame) which I think could be used to solve the problem. I think the problem is that firefox is not particularly happy with loops that take too long on each cycle and with requestAnimationFrame (or even using setTimeout) you could have it call itself and firefox (I think) would be happier.

so instead of:

Code:

var world;
window.onload = function () {
    world = new WorldMorph(document.getElementById('world'));
    new IDE_Morph().openIn(world);
    setInterval(loop, 1);
};
function loop() {
    world.doOneCycle();
}

You could do:

Code:

var world;
window.onload = function () {
    world = new WorldMorph(document.getElementById('world'));
    new IDE_Morph().openIn(world);
    setTimeout(loop, 1);//OR
    requestAnimationFrame(loop);//See the article for more information on exact usage)
};
function loop() {
    world.doOneCycle();
    setTimeout(loop, 1);//the timeout/reqanimframe calls itself - thus creating a setInterval effect.
    requestAnimationFrame(loop);
}

Last edited by rookwood101 (2012-05-01 18:33:34)


http://i.imgur.com/zeIZW.png

Offline

 

#5028 2012-05-02 01:45:56

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hi, rockwood101.

Thanks for the pointer to requestAnimationFrame().

I've been thinking about using it, but so far it is unsupported by some browsers - especially by MS IE9 - so I'm currently reluctant to switch over. The main issue, however, is that I don't think we need it for Snap, because Morphic takes care of most of what's wrong with setInterval() internally, especially through its sophisticated mechanism of progressive screen updates (Morphic only redraws "damaged" screen areas in each display cycle, not everything).

There are also some other open questions related to requestAnimationFrame() that I'm not yet convinced of, and there are hints of "smart" behavior that I find outright scary (e.g. that browsers might be able to throttle the framerate according to what's happening in other apps or based on battery status). I'll keep an eye on browser support, and we'll play with it once it's supported by all browsers, and then we'll see.

In the meantime I doubt that the problems you seem to be experiencing with Firefox are due to not using requestAnimationFrame(). The problem with Firefox is, that it's JS VM is plain slow compared to both Chrome (always faster than everything else, by several orders of magnitude) and Safari, regardless of what they're saying or which benchmarks they're using. But, to be fair, Firefox's Canvas rendering implementation is by far the best, most complete and most accurate in any browser. So, in the best of worlds we'd have Mozilla just switch over to Chrome's (open source) V8 JavaScript VM, and Chrome switch over from WebKit to Mozilla's (open source) Canvas rendering engine. In the meantime we're left with hoping for incremental optimizations and performance gains  smile


Jens Mönig

Offline

 

#5029 2012-05-02 12:46:56

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: BYOB 3 - Discussion Thread

NOOOOO!!! IT DOESN'T WORK ON THE 3DS BROWSER!!!!!!!!!!
I hate the all-caps filter sometimes


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#5030 2012-05-02 14:10:18

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

Re: BYOB 3 - Discussion Thread

joefarebrother wrote:

NOOOOO!!! IT DOESN'T WORK ON THE 3DS BROWSER!

Should that really surprise you?  tongue

Last edited by blob8108 (2012-05-02 14:14:52)


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

Offline

 

#5031 2012-05-03 18:30:39

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

@shadow and Hardmath:

Okay, I think we're ready.  I've made a shared Dropbox folder called manual-pics to hold the new picture files.  If you send me an email address I can invite you to it.  Or if you're unhappy sharing your email and have a better idea for sharing files I'm happy to have suggestions.  I'm bh@cs.berkeley.edu

A rough draft manual is at http://snap.berkeley.edu/draftManual.pdf.  Part V, on sprite OOP, is going to change in yet-unknown ways and isn't implemented, so I suggest Parts I-III for shadow and Parts IV, VI-VIII for Hardmath (who gets the extra one because there's just one page in Part VIII).

To avoid confusion please use filenames in the form p43-2.png for the second picture on page 43 of the draft.  PNG is preferred because it's unencumbered by patent licensing; JPG second choice and GIF third.

Try to get pictures without grey backgrounds (from palette or scripting area) unless the picture shows the entire Block Editor or input dialog window (in which case still no background outside the window) or the block's location in palette/script/etc is part of the point of the picture, as in p5-1, p6-1, and p6-3.

Suggestions about errors or confusions in the text are welcome too -- if you don't understand something, neither will new users!

And thank you so much for volunteering!


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#5032 2012-05-04 01:05:35

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

@shadow and Hardmath:

Okay, I think we're ready.  I've made a shared Dropbox folder called manual-pics to hold the new picture files.  If you send me an email address I can invite you to it.  Or if you're unhappy sharing your email and have a better idea for sharing files I'm happy to have suggestions.  I'm bh@cs.berkeley.edu

A rough draft manual is at http://snap.berkeley.edu/draftManual.pdf.  Part V, on sprite OOP, is going to change in yet-unknown ways and isn't implemented, so I suggest Parts I-III for shadow and Parts IV, VI-VIII for Hardmath (who gets the extra one because there's just one page in Part VIII).

To avoid confusion please use filenames in the form p43-2.png for the second picture on page 43 of the draft.  PNG is preferred because it's unencumbered by patent licensing; JPG second choice and GIF third.

Try to get pictures without grey backgrounds (from palette or scripting area) unless the picture shows the entire Block Editor or input dialog window (in which case still no background outside the window) or the block's location in palette/script/etc is part of the point of the picture, as in p5-1, p6-1, and p6-3.

Suggestions about errors or confusions in the text are welcome too -- if you don't understand something, neither will new users!

And thank you so much for volunteering!

Sure, I'll work on it! How do you want me to remove the gray background? I'm not much of a graphics whiz, so I'll probably take the whole editor for all of them.  smile


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#5033 2012-05-04 01:12:03

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Oh yes, and about sharing: I'll post a ZIP file on my Google Docs, if you don't mind. I don't want to share my email, if that's ok with you.


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#5034 2012-05-04 02:14:08

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hold on! I'll let you export pictures of scripts without background, same as in Scratch... probably as soon as tonight.


Jens Mönig

Offline

 

#5035 2012-05-04 04:36:13

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Jens wrote:

Hold on! I'll let you export pictures of scripts without background, same as in Scratch... probably as soon as tonight.

big_smile  I'll wait till tonight to start, then. When do we need these done?


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#5036 2012-05-04 04:59:10

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: BYOB 3 - Discussion Thread

okay, here it is:

Today's Snap! alpha build (which I've just posted) features a new "script pic" option in block's context menus.

"script pic" opens a new browser window/tab with a PNG-encoded, background-less (the background is transparent) picture of the script (stack of blocks) the block is part of. It also works for scripts in the block editor, in which case it also includes the prototype hat. You can then save the PNG to your local computer simply by right-clicking on it and using your browser's "save as..." option. I'm hoping that this feature will make exporting pictures of scripts for documentation purposes a lot easier than having to take screenshots and cropping/editing them all the time.

Enjoy, and have a nice weekend!

Last edited by Jens (2012-05-04 05:02:45)


Jens Mönig

Offline

 

#5037 2012-05-04 06:06:54

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

i could help with the in-program help dialogs  smile

edit: why can't i enter '#' inside input names?  hmm

Last edited by roijac (2012-05-04 06:08:23)

Offline

 

#5038 2012-05-04 06:26:07

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hey guys,

I did Part VIII because it looked quick and easy, and I wanted to try it out. Here's the link to Google Docs: Part VIII.zip. Some blocks mentioned there were not found in Snap! What do I do about those? Make custom blocks for now?

P.S. Sorry to be raising so many problems, but I am really busy next week, so maybe someone else could take over my bit (just next week). Thanks.  smile

Last edited by Hardmath123 (2012-05-04 06:29:06)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#5039 2012-05-04 06:52:26

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

i could do I if you want @hardmath123  smile

Offline

 

#5040 2012-05-04 07:07:26

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

roijac wrote:

i could do I if you want @hardmath123  smile

We can share. There are parts 1,2,3,4,6,7 out of which shadow can do 1 and 2, you do 3 and 4, and I'll do 6 and 7 (I already did 8, and 5 isn't ready yet). How about that, bharvey and roijac?


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#5041 2012-05-04 12:42:14

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

Oh yes, and about sharing: I'll post a ZIP file on my Google Docs, if you don't mind. I don't want to share my email, if that's ok with you.

No problem.  I downloaded your zip file with no problem (once I worked out why Google Docs wasn't letting me open the individual pictures, duh).

Some blocks mentioned there were not found in Snap! What do I do about those? Make custom blocks for now?

Sure, making custom blocks would be fine.  (Be sure to get the input slot types right, if any.)

roijac wrote:

i could help with the in-program help dialogs

Oh, yes!  That would be awesome.  It's a big job, though, because they should all really be redone totally.  I used a bitmap graphics program, which was all I had back then, and so the font rendering is all ugly even though I used Baskerville, the most beautiful font ever.

Thanks, gang!


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#5042 2012-05-04 12:57:04

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

How about that, bharvey and roijac?

Whatever you guys work out is fine with me.


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#5043 2012-05-04 15:39:49

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Why does the manual have all the (the block) and (the script) blocks still in it? Snap! uses rings instead.


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#5044 2012-05-04 16:31:09

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Save failed: TypeError: Object a ArgMorph 0 [580@419|12@13] has no method 'toXML'

(You should really let users copy and paste these error messages - I had to copy that out by hand)

That has happened in ALL my projects. Why?

GRR, I can't post the images because their URLs exceed the scratch forum character limit! You should REALLY write a PHP script to generate the images!


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#5045 2012-05-04 16:48:10

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

joefarebrother wrote:

Why does the manual have all the (the block) and (the script) blocks still in it? Snap! uses rings instead.

I think I've updated the text to talk about rings.  But of course the pictures are still the old pictures -- that's one of the reasons we need new ones made.  Anything with either a THE BLOCK/SCRIPT or a grey border needs to have a ring instead.  Every picture of a solid grey input slot should be a ring instead.  If you find things in the text that need changing, give me a page number and I'll do it (although not in the online draftManual.pdf because I don't want to change the page numbers in the middle of this picture project).


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#5046 2012-05-05 01:40:54

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

joefarebrother wrote:

Why does the manual have all the (the block) and (the script) blocks still in it? Snap! uses rings instead.

I think I've updated the text to talk about rings.  But of course the pictures are still the old pictures -- that's one of the reasons we need new ones made.  Anything with either a THE BLOCK/SCRIPT or a grey border needs to have a ring instead.  Every picture of a solid grey input slot should be a ring instead.  If you find things in the text that need changing, give me a page number and I'll do it (although not in the online draftManual.pdf because I don't want to change the page numbers in the middle of this picture project).

Yes, It TALKS about rings, but SHOWS PICTURES OF (the block) and (the script)


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#5047 2012-05-05 01:53:04

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

joefarebrother wrote:

Yes, It TALKS about rings, but SHOWS PICTURES OF (the block) and (the script)

Umm... Yes, we know.  This is why, as we speak, shadow and Hardmath and roijac are making new illustrations based on Snap! instead of on BYOB.  Every picture will be redone; besides the rings, the block shapes are subtly different.  All the tutorials have to be redone, too, eventually.


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#5048 2012-05-05 02:44:46

xly
Scratcher
Registered: 2010-04-17
Posts: 100+

Re: BYOB 3 - Discussion Thread

@bharvey & Jens
I come back to the issue of block ownership.
Right now, there is only one possibility : a block is owned by a sprite. If this sprite is duplicated the new sprite "inherits" this block. But if a new sprite is created it has no access to this block. We have to re-write the same block over and over for each new sprite...So we have only "local" or inherited blocks,  I'm sure that you have "ideas behind your heads". In the past I had suggested to create global blocks owned by the toplevel (created from the palette like it was in the early days of Snap!). Thus, when you change this block, this change is available by all sprites using this block (which is not the case as far as remember in Byob).
Maybe that in a later stage this feature will by mimicked using Methods + attribute OF sprite ?
This toplevel feature would address the issue of "common libraries". When you save your project (with its "void" sprite) all toplevel blocks are saved and are available for a New project.

Offline

 

#5049 2012-05-05 04:48:12

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Yes, I haven't gotten around to implementing global custom blocks ("for all sprites") yet. It's on the list  smile


Jens Mönig

Offline

 

#5050 2012-05-05 07:28:30

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Jens wrote:

Yes, I haven't gotten around to implementing global custom blocks ("for all sprites") yet. It's on the list  smile

Maybe all blocks created for the stage are global?


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

Board footer