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

#5626 2012-07-19 07:10:36

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

Re: BYOB 3 - Discussion Thread

Jens wrote:

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

I read somewhere around here that Scratch does bounding box collision, then if the 2 boxes collide, it checks each pixel.


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

Offline

 

#5627 2012-07-19 07:48:08

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

Re: BYOB 3 - Discussion Thread

Jens wrote:

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

Ah, I see it! source-in! That's brilliant, Jens. I would never have thought that.  smile


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

Offline

 

#5628 2012-07-19 09:22:12

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

Re: BYOB 3 - Discussion Thread

this, right? That is indeed rather clever.  smile


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

Offline

 

#5629 2012-07-19 09:39:25

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

Re: BYOB 3 - Discussion Thread

I thought of using the same thing for JsScratch, but I didn't think it would be any better than just looping over the intersecting bounds and comparing the pixel transparency values.

I have to mention that color touching is a different story. You HAVE to loop over all the pixels in the costume every frame.  hmm  If you find a better way to do this, let me know.  wink

Last edited by MathWizz (2012-07-19 09:41:04)


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

Offline

 

#5630 2012-07-19 09:47:51

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

Re: BYOB 3 - Discussion Thread

Yes, I haven't found a better way to do color-collision, either. That's why I didn't yet implement it in Snap. We could make it more hue-tolerant and actually index those hues in every costume when it gets into the system (or changed). That way it would only take a little time once when you're editing the project, but afterwards it would be blazingly fast. Still undecided about this.

But, you know, I've implemented something else which covers many of those use-cases in which we'd otherwise have to check for color-collision: Pen trails collision. It's in today's update. I wonder if anyone found it yet  smile


Jens Mönig

Offline

 

#5631 2012-07-19 09:57:10

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

Re: BYOB 3 - Discussion Thread

I have found it now.  tongue

Have you seen my 'fisheye' filter in JavaScript? I know, one of the more useless blocks in Scratch, but here it is: https://dl.dropbox.com/u/6274273/awesome.htm WebGL is faster than Scratch itself.  big_smile

Last edited by MathWizz (2012-07-19 09:59:45)


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

Offline

 

#5632 2012-07-19 10:04:20

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

Re: BYOB 3 - Discussion Thread

Oh wow, that is fast and awesome, MathWizz! I love it, and might even steal it  big_smile


Jens Mönig

Offline

 

#5633 2012-07-19 10:11:53

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

Re: BYOB 3 - Discussion Thread

Jens wrote:

Oh wow, that is fast and awesome, MathWizz! I love it, and might even steal it  big_smile

big_smile  I still have to polish things up though.


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

Offline

 

#5634 2012-07-19 10:14:18

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

Re: BYOB 3 - Discussion Thread

MathWizz wrote:

Jens wrote:

Oh wow, that is fast and awesome, MathWizz! I love it, and might even steal it  big_smile

big_smile  I still have to polish things up though.

...

nothing happens for me (Safari 5.1)

Screenshot, please? I'm curious, now.  tongue


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

Offline

 

#5635 2012-07-19 10:27:32

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

MathWizz wrote:

Jens wrote:

Oh wow, that is fast and awesome, MathWizz! I love it, and might even steal it  big_smile

big_smile  I still have to polish things up though.

...

nothing happens for me (Safari 5.1)

Screenshot, please? I'm curious, now.  tongue

Trade error log for image? :3


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

Offline

 

#5636 2012-07-19 10:35:34

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

Re: BYOB 3 - Discussion Thread

MathWizz wrote:

Hardmath123 wrote:

MathWizz wrote:

big_smile  I still have to polish things up though.

...

nothing happens for me (Safari 5.1)

Screenshot, please? I'm curious, now.  tongue

Trade error log for image? :3

Deal. Nothing in my error log.  tongue

EDIT: More helpfully, I know that the image has loaded (big astronomical smiley face, right?), that the window onload has been triggered, and WebGL is enabled.

Last edited by Hardmath123 (2012-07-19 10:38:32)


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

Offline

 

#5637 2012-07-19 10:40:41

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

MathWizz wrote:

Hardmath123 wrote:


...

nothing happens for me (Safari 5.1)

Screenshot, please? I'm curious, now.  tongue

Trade error log for image? :3

Deal. Nothing in my error log.  tongue

Dangit. xD

https://dl.dropbox.com/u/6274273/resour … MEFACE.png with a real-time fisheye effect.


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

Offline

 

#5638 2012-07-19 10:43:11

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

Re: BYOB 3 - Discussion Thread

... I meant with the fisheye effect...


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

Offline

 

#5639 2012-07-19 10:44:13

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

... I meant with the fisheye effect...

You make things so difficult. Hang on a second.


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

Offline

 

#5640 2012-07-19 10:46:10

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

Re: BYOB 3 - Discussion Thread

Well I had the smiley already, how do you think I knew it was a smiley?

Oh, and I ran every possible Safari dev diagnostic I could find, nothing happened. I also used the console to manually refresh via window.onload(), and the (oversized) canvas blinked. So I'm guessing something to do with the image rendering is off. Lemme go read up on Safari's webgl support.

Last edited by Hardmath123 (2012-07-19 10:47:59)


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

Offline

 

#5641 2012-07-19 10:51:57

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

Well I had the smiley already, how do you think I knew it was a smiley?

Oh, and I ran every possible Safari dev diagnostic I could find, nothing happened. I also used the console to manually refresh via window.onload(), and the (oversized) canvas blinked. So I'm guessing something to do with the image rendering is off. Lemme go read up on Safari's webgl support.

Wwwwaaaaiittt... I think it has to do with the animation. I had a similar problem recently...
http://stackoverflow.com/questions/1141 … ot-working


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

Offline

 

#5642 2012-07-19 10:57:22

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

Re: BYOB 3 - Discussion Thread

Ok. I changed it so now you have to click on the canvas for animation. I think this first frame may work fine.


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

Offline

 

#5643 2012-07-19 11:03:53

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

Re: BYOB 3 - Discussion Thread

Lemme see... hang on.


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

Offline

 

#5644 2012-07-19 11:05:33

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

Re: BYOB 3 - Discussion Thread

Zilch.  sad


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

Offline

 

#5645 2012-07-19 11:08:50

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

Re: BYOB 3 - Discussion Thread

hmm


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

Offline

 

#5646 2012-07-19 11:10:14

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

Re: BYOB 3 - Discussion Thread

Oh yes, and empty console. Can we stop cluttering the BYOB thread with this, BTW? Should we discuss on that other one you made?


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

Offline

 

#5647 2012-07-21 14:11:24

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

Debating whether or not to learn Python. 40% convinced

Not such a big decision!  You already know all the semantics of the language; you just have to spend a weekend on the syntax.


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

Offline

 

#5648 2012-07-21 14:34:02

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Hardmath123 wrote:

Debating whether or not to learn Python. 40% convinced

Not such a big decision!  You already know all the semantics of the language; you just have to spend a weekend on the syntax.

See?  tongue  Learn Python already!


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

Offline

 

#5649 2012-07-21 17:12:53

scspaeth
Scratcher
Registered: 2010-02-14
Posts: 20

Re: BYOB 3 - Discussion Thread

We learned much at the Connecticut CSTA Workshop. I especially appreciated the attention to ways to help people learn CS Principles and pedagogy.

Collectively, we discovered and reported several bugs, e. g.:
http://byobugs.com/bugzilla/attachment.cgi?id=336
And they are generally fixed by the next day!

Thanks Brian, Jens, and the CCSTA for the opportunities.

Offline

 

#5650 2012-07-21 18:02:15

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

Re: BYOB 3 - Discussion Thread

scspaeth wrote:

Thanks Brian, Jens, and the CCSTA for the opportunities.

You're very welcome!  It was great meeting you, and you found an incredible number of bugs!  smile

@everyone else:  He also figured out how to embed a Snap! project in a web page!


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

Offline

 

Board footer