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

#751 2010-04-11 09:39:39

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Panther development thread

markyparky56 wrote:

SeptimusHeap wrote:

I got 3 new blocks: average of _ and _ and _ ; average of _ and _; and distance between _ and _...

I geuss your very good at maths then.

Math.

And yes, I am advanced 2(.5? I'm in honors) years in my math class.

Last edited by SeptimusHeap (2010-04-11 09:40:01)


http://i46.tinypic.com/dw7zft.png

Offline

 

#752 2010-04-11 09:45:09

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

SeptimusHeap wrote:

markyparky56 wrote:

SeptimusHeap wrote:

I got 3 new blocks: average of _ and _ and _ ; average of _ and _; and distance between _ and _...

I geuss your very good at maths then.

Math.

And yes, I am advanced 2(.5? I'm in honors) years in my math class.

Hmmm, Mathsand I don't get along. I'm taking physics and robotics courses, both of which need it, but I really do have to concentrate... too bad, I love the non-maths bit  big_smile


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#753 2010-04-11 09:48:13

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Panther development thread

sparks wrote:

SeptimusHeap wrote:

markyparky56 wrote:


I geuss your very good at maths then.

Math.

And yes, I am advanced 2(.5? I'm in honors) years in my math class.

Hmmm, Mathsand I don't get along. I'm taking physics and robotics courses, both of which need it, but I really do have to concentrate... too bad, I love the non-maths bit  big_smile

I'm american. We like math. Although I don't understand both ways of saying it.

Maths: More than one math?

Math: What's a math?


http://i46.tinypic.com/dw7zft.png

Offline

 

#754 2010-04-11 09:48:58

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

SeptimusHeap wrote:

I got 3 new blocks: average of _ and _ and _ ; average of _ and _; and distance between _ and _.

blockSpecs for average of _ and _ and _:

Code:

('average of %n and %n and %n' #r #average:and:and: 1 3 5)

Code for average:and:and: (In scratchmorph, other ops)

Code:

average: t1 and: t2 and: t3
|t4|
t4 _ t1 + t2 + t3 / 3.
^t4

blockSpecs for average of _ and _:

Code:

('average of %n and %n' #r #average:and: 1 3)

Code for average:and: (In scratchmorph, other ops)

Code:

average: t1 and: t2
|t3|
t3 _ t1 + t2 / 2.
^t3

blockSpecs for distance between _ and _:

Code:

('distance between %n and %n' #r #difference:and: 1 10)

Code for difference:and: (In scratchmorph, other ops)

Code:

difference: t1 and: t2
|t3|
t1 < t2 ifTrue: [t3 _ t2 - t1].
t2 < t1 ifTrue: [t3 _ t1 - t2].
t2 = t1 ifTrue: [t3 _ 0].
^t3

Good blocks! Allthough i have an idea for it! How about:
"Claculate average of items in list: [lists]"
AND
"Claculate average of items: (%n) to (%n) in list: [lists]"

What do you think?

Oh - and instead of distance between _ and _ I think it should be difference


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#755 2010-04-11 09:52:27

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

Oh - and instead of distance between _ and _ I think it should be difference
Er. there's a difference?


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#756 2010-04-11 09:53:48

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Panther development thread

Sperry wrote:

Good blocks! Allthough i have an idea for it! How about:
"Claculate average of items in list: [lists]"
AND
"Claculate average of items: (%n) to (%n) in list: [lists]"

What do you think?

Oh - and instead of distance between _ and _ I think it should be difference

I'm on it.


http://i46.tinypic.com/dw7zft.png

Offline

 

#757 2010-04-11 09:57:45

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

hey, I have a stage that (because of a toolbar) has a width of 415 and the usual height of 360. if I want to divide that into squares, what sizes of whole square could I fit into that space? I want it to be around 30*30 size... any ideas?


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#758 2010-04-11 09:58:44

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

sparks wrote:

Oh - and instead of distance between _ and _ I think it should be difference
Er. there's a difference?

Well, the calculations to me seemed like it was calculating the difference between to numbers.
Allthought with a bit of ajustment they could be used to calculate the difference between the x and y posistions of two sprites like this:

Difference between X pos and X pos of sprite: [Sprite]

EDIT:: You could do 15x15

Last edited by Sperry (2010-04-11 09:59:58)


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#759 2010-04-11 10:00:19

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Panther development thread

Oh, just to note, the distance between block reports the absolute value, so it's never a negitive.


http://i46.tinypic.com/dw7zft.png

Offline

 

#760 2010-04-11 10:00:22

climber59
Scratcher
Registered: 2009-12-15
Posts: 100+

Re: Panther development thread

I'm not totally sure if Panther needs a starting sprite but I'll post it anyways.
http://img232.imageshack.us/img232/1729/pantherstartsprite.jpg
A simple recolor of the Scratch sprite but I think it looks pretty good. Also I'm not sure if the original is copyrighted.

Last edited by climber59 (2010-04-11 10:00:58)


Check out my projects if you have a chance.

Offline

 

#761 2010-04-11 10:00:46

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

wait, nm, calculation no longer needed.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#762 2010-04-11 10:01:37

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Panther development thread

Grr... I'm not very good at list programming.


http://i46.tinypic.com/dw7zft.png

Offline

 

#763 2010-04-11 10:02:47

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

climber59 wrote:

I'm not totally sure if Panther needs a starting sprite but I'll post it anyways.
http://img232.imageshack.us/img232/1729 … sprite.jpg
A simple recolor of the Scratch sprite but I think it looks pretty good. Also I'm not sure if the original is copyrighted.

thank you very much for the image. Unfortunately, you are right, the image is copyrightedin the Terms of Service so cannot be used by us, either in Panther or promotionally. Thank you all the same  smile


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#764 2010-04-11 10:05:31

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

SeptimusHeap wrote:

Grr... I'm not very good at list programming.

Could you use the getLine:ofList: function at all to help?

Code for getLine:ofList:

Code:

getLine: t1 ofList: t2 
    | t3 |
    t3 _ self listNamed: t2 ifNone: [^ ''].
    ^ t3 lineAt: (self lineNum: t1 forList: t3)

http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#765 2010-04-11 10:05:45

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Panther development thread

Is there any way to make a repeat command in Smalltalk?


http://i46.tinypic.com/dw7zft.png

Offline

 

#766 2010-04-11 10:06:48

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Panther development thread

Sperry wrote:

SeptimusHeap wrote:

Grr... I'm not very good at list programming.

Could you use the getLine:ofList: function at all to help?

Code for getLine:ofList:

Code:

getLine: t1 ofList: t2 
    | t3 |
    t3 _ self listNamed: t2 ifNone: [^ ''].
    ^ t3 lineAt: (self lineNum: t1 forList: t3)

All I need is a repeat command for Smalltalk.


http://i46.tinypic.com/dw7zft.png

Offline

 

#767 2010-04-11 10:07:35

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

Re: Panther development thread

sparks wrote:

nXIII, please read this! why does the (contents of file [ ]) not read a webpage if the path to the page is given, and how easy would it be to change it so it do so? I was thinking that would let us (for example) release a project that reads text from the Panther site so that people can hear the latest news and updates through the Scratch project! it would notify changes as well as naming featured projects, people, news and suchlike. It would also let projects read weather, news and other info off pages for use in project manipulation!^_^

EDIT: There would be no risk of a virus download seeing as it is only reading text, and not connecting in any other way to the internet, and it would be extremely useful.

COOL! Then we could make SWC MORE powerful! (You'd better know what that is.  tongue )


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

Offline

 

#768 2010-04-11 10:08:21

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Panther development thread

Math, do you know of a smalltalk repeat command?


http://i46.tinypic.com/dw7zft.png

Offline

 

#769 2010-04-11 10:11:09

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

SeptimusHeap wrote:

Is there any way to make a repeat command in Smalltalk?

I skimmed through a wikipedia article but couldn't find one
Have a look yourself and see if that helps: http://en.wikipedia.org/wiki/Smalltalk-80


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#770 2010-04-11 10:12:51

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

MathWizz wrote:

sparks wrote:

nXIII, please read this! why does the (contents of file [ ]) not read a webpage if the path to the page is given, and how easy would it be to change it so it do so? I was thinking that would let us (for example) release a project that reads text from the Panther site so that people can hear the latest news and updates through the Scratch project! it would notify changes as well as naming featured projects, people, news and suchlike. It would also let projects read weather, news and other info off pages for use in project manipulation!^_^

EDIT: There would be no risk of a virus download seeing as it is only reading text, and not connecting in any other way to the internet, and it would be extremely useful.

COOL! Then we could make SWC MORE powerful! (You'd better know what that is.  tongue )

oh I know  tongue  I saw it a while back, and it would be perfect for that! I hope nXIII is up to the challange of getting that to work... might be too hard.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#771 2010-04-11 10:14:41

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Panther development thread

Sperry wrote:

SeptimusHeap wrote:

Is there any way to make a repeat command in Smalltalk?

I skimmed through a wikipedia article but couldn't find one
Have a look yourself and see if that helps: http://en.wikipedia.org/wiki/Smalltalk-80

There HAS to be one... How would the repeat block be programmed? Only problem - I can't find coding for it.


http://i46.tinypic.com/dw7zft.png

Offline

 

#772 2010-04-11 10:15:43

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Panther development thread

I found the coding, and don't understand it. Yay.


http://i46.tinypic.com/dw7zft.png

Offline

 

#773 2010-04-11 10:18:44

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Panther development thread

SeptimusHeap wrote:

I found the coding, and don't understand it. Yay.

If you post it, I might be able to help


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#774 2010-04-11 10:20:48

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

Re: Panther development thread

I just make a 'file %s exists?' block!


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

Offline

 

#775 2010-04-11 10:23:50

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Panther development thread

MathWizz wrote:

I just make a 'file %s exists?' block!

yes! nXIII, PLEEEEEEEEEZ put this one in Panther!


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

Board footer