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

#5601 2012-07-13 23:58:05

thebriculator
Scratcher
Registered: 2011-07-11
Posts: 500+

Re: BYOB 3 - Discussion Thread

I wish Scratch had everything in BYOB. It's like all my programming dreams come true!

And not just complex BYOB stuff scares away new scratchers; the () of () operators would also do that. Most scratchers don't even know what sin ans cos mean! Lists would also scare away new scratchers, as it did to me a year ago.

I'm thinking of getting it, just to play around with all the cool things.


.     http://tiny.cc/2cwgpw    http://tiny.cc/viwgpw    http://tiny.cc/iwwgpw

Offline

 

#5602 2012-07-14 14:24:52

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

Re: BYOB 3 - Discussion Thread

joefarebrother wrote:

Question: In BYOB 3.0, when you do ((the script {code}) of [sprite 2 v]) in sprite 1, if code refers to (object [myself v]), does that mean sprite 1 or sprite 2?

You mean 3.1.  smile   But, quibble aside, OBJECT [MYSELF] should mean Sprite2 in that situation.  You'd have to say

RUN (THE SCRIPT ... [ ] ...) OF Sprite2 WITH INPUTS (OBJECT [MYSELF])

where the [ ] is an empty input slot to be filled with (in your example) Sprite1.


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

Offline

 

#5603 2012-07-14 16:04:34

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

Re: BYOB 3 - Discussion Thread

thebriculator wrote:

I wish Scratch had everything in BYOB. It's like all my programming dreams come true!

Thanks!

I'm thinking of getting it

What are you waiting for??


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

Offline

 

#5604 2012-07-14 23:02:30

thebriculator
Scratcher
Registered: 2011-07-11
Posts: 500+

Re: BYOB 3 - Discussion Thread

I did get it!
but is there a way to "save new blocks" so it's always there?


.     http://tiny.cc/2cwgpw    http://tiny.cc/viwgpw    http://tiny.cc/iwwgpw

Offline

 

#5605 2012-07-15 10:21:33

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

Re: BYOB 3 - Discussion Thread

thebriculator wrote:

is there a way to "save new blocks" so it's always there?

If you export a sprite (control-/right-click on its picture in the sprite corral and choose "export" from the menu), it carries the custom blocks with it, so you can import it into another project.  Rename the sprite before exporting it so there isn't a name conflict with the new project.


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

Offline

 

#5606 2012-07-15 11:35:06

thebriculator
Scratcher
Registered: 2011-07-11
Posts: 500+

Re: BYOB 3 - Discussion Thread

ok, thanks!


.     http://tiny.cc/2cwgpw    http://tiny.cc/viwgpw    http://tiny.cc/iwwgpw

Offline

 

#5607 2012-07-15 14:53:21

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: BYOB 3 - Discussion Thread

By the way, you're awesome for making a Settlers of Catan Scratch game.
[/offtopic]

Offline

 

#5608 2012-07-15 16:02:11

thebriculator
Scratcher
Registered: 2011-07-11
Posts: 500+

Re: BYOB 3 - Discussion Thread

oh, thanks! it's not coming along very fast, though.


.     http://tiny.cc/2cwgpw    http://tiny.cc/viwgpw    http://tiny.cc/iwwgpw

Offline

 

#5609 2012-07-16 11:38:01

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

Re: BYOB 3 - Discussion Thread

bharvey, can you make sense of this output from my homemade Scheme interpreter?

Code:

(define (constr a) (lambda (b) (+ a b)))
[lambda] //good, expected

(constr 1)
[lambda] //still good, and expected

((constr 1) 2)
ERROR:Variable not found: a //whacky! expected: 3

Also, @Jens: Snap! is now totally broken on my ancient FF3.1 (I just love trying stuff out on i; it's so amazing how it beats the latest IE at practically everything). Did you change anything drastic recently?

Last edited by Hardmath123 (2012-07-16 11:39:53)


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

Offline

 

#5610 2012-07-16 11:44:22

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

(constr 1)
[lambda] //still good, and expected

The value of a lambda expression is not a lambda expression, but a procedure, which includes both the lambda expression and the current environment at the time the lambda is evaluated.

Thus, the value of (constr 1) has to be a procedure that includes an environment with A bound to 1.  When the procedure is called, as in ((constr 1) 2), the body of the procedure has to be evaluated in a new environment, extending the one in the procedure, that also binds B to 2.


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

Offline

 

#5611 2012-07-16 14:30:37

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

@Jens: Snap! is now totally broken on my ancient FF3.1 (I just love trying stuff out on i; it's so amazing how it beats the latest IE at practically everything). Did you change anything drastic recently?

Well, I change Snap! drastically about every three hours  smile  but you're probably just suffering from having oder versions in your browser's cache collide with newer versions elsewhere. You do need to constantly (and manually, for now at least) flush your browser's cache. Also, don't rely on old browsers...


Jens Mönig

Offline

 

#5612 2012-07-16 21:04:08

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

Re: BYOB 3 - Discussion Thread

Jens wrote:

Hardmath123 wrote:

@Jens: Snap! is now totally broken on my ancient FF3.1 (I just love trying stuff out on it; it's so amazing how it beats the latest IE at practically everything). Did you change anything drastic recently?

Well, I change Snap! drastically about every three hours  smile  but you're probably just suffering from having oder versions in your browser's cache collide with newer versions elsewhere. You do need to constantly (and manually, for now at least) flush your browser's cache. Also, don't rely on old browsers...

Ah. I'll try it out a while later. Also, I don't rely on my 3.1, I use Safari 5.1 for everything. My FF3.1 is just for fun to see what happens to old stuff. It's holding up brilliantly; I can honestly Scratch entirely with this if I needed to (except for security issues).

@bharvey: That makes sense. I'll try it out an a little while when I get some time.  smile


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

Offline

 

#5613 2012-07-16 23:31:44

thebriculator
Scratcher
Registered: 2011-07-11
Posts: 500+

Re: BYOB 3 - Discussion Thread

Snap! 4.0 doesn't work on my browser because it doesn't support canvas.
I think that means I need Google chrome...


.     http://tiny.cc/2cwgpw    http://tiny.cc/viwgpw    http://tiny.cc/iwwgpw

Offline

 

#5614 2012-07-17 01:16:56

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

Re: BYOB 3 - Discussion Thread

thebriculator wrote:

Snap! 4.0 doesn't work on my browser because it doesn't support canvas.
I think that means I need Google chrome...

You can use any current version of any browser, really: Chrome, Firefox, Safari, Opera, Internet Explorer. They all support canvas. Chrome has by far the fastest JavaScript engine (V8), therefore it's the most fun. But, personally, I also like Safari very much.


Jens Mönig

Offline

 

#5615 2012-07-17 06:27:38

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

Re: BYOB 3 - Discussion Thread

Jens wrote:

thebriculator wrote:

Snap! 4.0 doesn't work on my browser because it doesn't support canvas.
I think that means I need Google chrome...

You can use any current version of any browser, really: Chrome, Firefox, Safari, Opera, Internet Explorer. They all support canvas. Chrome has by far the fastest JavaScript engine (V8), therefore it's the most fun. But, personally, I also like Safari very much.

IE supports canvas now?  big_smile  MS is catching up!


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

Offline

 

#5616 2012-07-17 06:55:32

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

Jens wrote:

thebriculator wrote:

Snap! 4.0 doesn't work on my browser because it doesn't support canvas.
I think that means I need Google chrome...

You can use any current version of any browser, really: Chrome, Firefox, Safari, Opera, Internet Explorer. They all support canvas. Chrome has by far the fastest JavaScript engine (V8), therefore it's the most fun. But, personally, I also like Safari very much.

IE supports canvas now?  big_smile  MS is catching up!

Have you tried IE10? It says "Internet Explorer has stopped working" every couple of minutes even though it is working fine.


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

Offline

 

#5617 2012-07-17 10:05:15

thebriculator
Scratcher
Registered: 2011-07-11
Posts: 500+

Re: BYOB 3 - Discussion Thread

I have IE 8, and it doen't work.


.     http://tiny.cc/2cwgpw    http://tiny.cc/viwgpw    http://tiny.cc/iwwgpw

Offline

 

#5618 2012-07-17 13:07:31

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: BYOB 3 - Discussion Thread

thebriculator wrote:

I have IE 8, and it doen't work.

Microsoft didn't add canvas support until IE 9.

Jens, if you want a quick hot fix for that, I'd recommend explorercanvas.

Last edited by shadow_7283 (2012-07-17 13:09:33)

Offline

 

#5619 2012-07-17 13:19:13

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

Re: BYOB 3 - Discussion Thread

shadow_7283 wrote:

thebriculator wrote:

I have IE 8, and it doen't work.

Microsoft didn't add canvas support until IE 9.

Jens, if you want a quick hot fix for that, I'd recommend explorercanvas.

I remember explorercanvas!  big_smile  I read about it a while ago.

Last edited by Hardmath123 (2012-07-17 13:19:28)


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

Offline

 

#5620 2012-07-18 09:28:01

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

Re: BYOB 3 - Discussion Thread

Jens wrote:

"if on edge bounce" is probably the most controversial primitive in all of Scratch. You don't have to use it (in Snap it also is still buggy and doesn't behave right), instead you can check using the TOUCHING ? predicate from the sensors category, whether a sprite is touching the edge of the stage, and disambiguify which one it is touching using the sprite's coordinates yourself.

You can define a sprite having a shape of a frame around the screen and then use IF TOUCHING frame

Offline

 

#5621 2012-07-18 10:34:29

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

Re: BYOB 3 - Discussion Thread

Good idea, Xavier. You could even define four sprites - one for each side - which would solve having to find out which edge is touched by checking coordinates.


Jens Mönig

Offline

 

#5622 2012-07-18 10:48:02

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

Re: BYOB 3 - Discussion Thread

Jens, how does if touching work efficiently? Don't you have to check each pixel of the sprite?

Last edited by Hardmath123 (2012-07-18 10:49:01)


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

Offline

 

#5623 2012-07-18 12:15:00

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

Re: BYOB 3 - Discussion Thread

Ah, IF TOUCHING is actually something clever, which I'm proud about. It's a Morphic primitive, you can look it up in Morphic.js  smile


Jens Mönig

Offline

 

#5624 2012-07-19 06:48:53

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

Re: BYOB 3 - Discussion Thread

Jens wrote:

Ah, IF TOUCHING is actually something clever, which I'm proud about. It's a Morphic primitive, you can look it up in Morphic.js  smile

Clever... but you do end up checking each pixel, right? I was hoping for a more efficient way.  sad

P.S. getImageData has some browser permissions problems, if I remember correctly. Have you checked if it works for non-BYOB-hosted images, say https://www.google.com/images/srpr/logo3w.png?


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

Offline

 

#5625 2012-07-19 06:57:32

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

Re: BYOB 3 - Discussion Thread

no, it's not checking each pixel! Look more closely  smile


Jens Mönig

Offline

 

Board footer