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.
Offline
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. 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.
Offline
I did get it!
but is there a way to "save new blocks" so it's always there?
Offline
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.
Offline
By the way, you're awesome for making a Settlers of Catan Scratch game.
[/offtopic]
Offline
bharvey, can you make sense of this output from my homemade Scheme interpreter?
(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)
Offline
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.
Offline
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 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...
Offline
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 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.
Offline
Snap! 4.0 doesn't work on my browser because it doesn't support canvas.
I think that means I need Google chrome...
Offline
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.
Offline
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? MS is catching up!
Offline
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? 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.
Offline
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
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! I read about it a while ago.
Last edited by Hardmath123 (2012-07-17 13:19:28)
Offline
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
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)
Offline
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
Clever... but you do end up checking each pixel, right? I was hoping for a more efficient way.
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?
Offline