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

#3351 2010-07-06 14:36:16

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

Re: Panther development thread

WOW! so much has happened! The pitch block sounds amazing, thank you Jens, you're a magician!

bharvey, I'm not sure I agree with your comment to my "mockery of the forum system"... basically, I wanted to express why I thought people shouldn't use the blocks just to boost views, but failing to find a proper reason, I made one up  tongue

I don't mind it being stickied, I think that would be a great honour, and it has never left the front page since it was created several months ago, but equally I don't mind if it isn't stickied.


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

Offline

 

#3352 2010-07-06 14:38:00

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Panther development thread

It only left the front page once actually


You can now reach me on Twitter @johnnydean1_

Offline

 

#3353 2010-07-06 14:45:52

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Panther development thread

Oh and how big is blockshop now


You can now reach me on Twitter @johnnydean1_

Offline

 

#3354 2010-07-06 18:17:27

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

Re: Panther development thread

I want the make file blocks.


Check out my projects if you have a chance.

Offline

 

#3355 2010-07-06 19:53:33

N-Wear
Scratcher
Registered: 2007-08-13
Posts: 100+

Re: Panther development thread

I love Panther!


If bread crumbs are better than nothing. And nothing is better than cheese cake. Then, bread crumbs are better than cheese cake!  smile
The following sentence is true. The previous sentence is false.  hmm                              Treat others the way you want to be treated!  big_smile

Offline

 

#3356 2010-07-06 19:56:22

paulpsicle
Scratcher
Registered: 2008-10-12
Posts: 100+

Re: Panther development thread

johnnydean1 wrote:

paulpsicle wrote:

johnnydean1 wrote:

I just made a <File $String$ exists?> block  smile

I made a simpler one:

Code:

| t2 t3 |
t2 _  self numFileLines: (t1).
t3 _ t2 asString.
(t3 = '') ifTrue:[^ false].
^true

What if the file was empty...

then numFileLines: returns 0 not blank.


http://blocks.scratchr.org/API.php?user=paulpsicle&amp;action=onlineStatus&amp;online=http://fishery.dyndns.org/paulpsicle.png&amp;offline=http://fishery.dyndns.org/paulpsicle_o.png

Offline

 

#3357 2010-07-07 03:30:40

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Panther development thread

climber59 wrote:

I want the make file blocks.

Name:
make file $String$

Type:
r

Code:
| f contents exists other writing temp var dest|
(self askForFileIO = true)
ifFalse:
[
^ self
].


f_ t1.




dest_ t1.
writing_ 'I exist'.

contents_ self readFile: (dest).
self writeText: (writing) toFile: (dest).
other_ self readFile: (dest).

temp_ self stringLength: (writing).
var_ self stringLength: (other).
temp_ var - temp.
temp_ temp + 1.
temp_ self letters: (temp) through: (var) of: (other).

temp = writing
ifTrue: [
exists_ true.
self clearFile: (dest).

contents = ''
ifFalse: [
self writeText: (contents) toFile: (dest). 
].

]
ifFalse: [
exists_ false.
].


exists = false
ifTrue: [

FileStream newFileNamed: f .
].


----------------------

If you want to change where its saved put the file directory before it so:
MyDocuments\hi.txt

is a non-working example


You can now reach me on Twitter @johnnydean1_

Offline

 

#3358 2010-07-07 04:58:41

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

Re: Panther development thread

blockshop has about 30 shared blocks right now.


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

Offline

 

#3359 2010-07-07 05:03:36

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Panther development thread

sparks wrote:

blockshop has about 30 shared blocks right now.

Only 30? I thought it would have more...


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#3360 2010-07-07 05:13:27

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

Re: Panther development thread

hi Mp. Yeah, it's still working better than I thought even though it kinda broke... I guess people will share more once it's released.


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

Offline

 

#3361 2010-07-07 05:27:55

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Panther development thread

sparks wrote:

hi Mp. Yeah, it's still working better than I thought even though it kinda broke... I guess people will share more once it's released.

Has nXIII really shared 31 blocks?


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#3362 2010-07-07 05:44:11

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

Re: Panther development thread

markyparky56 wrote:

sparks wrote:

hi Mp. Yeah, it's still working better than I thought even though it kinda broke... I guess people will share more once it's released.

Has nXIII really shared 31 blocks?

haha! NO! he's done about 4 or 5? we have a submission section for people to send us blocks on the site, remember  tongue


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

Offline

 

#3363 2010-07-07 05:47:32

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Panther development thread

sparks wrote:

markyparky56 wrote:

sparks wrote:

hi Mp. Yeah, it's still working better than I thought even though it kinda broke... I guess people will share more once it's released.

Has nXIII really shared 31 blocks?

haha! NO! he's done about 4 or 5? we have a submission section for people to send us blocks on the site, remember  tongue

Thats what the project says anyway.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#3364 2010-07-07 07:59:37

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

Re: Panther development thread

Hey, sparks! Don't you think we need to add a 'write file ___ to ___' block to 1.1?


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

Offline

 

#3365 2010-07-07 08:19:52

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

Re: Panther development thread

erm... I don't personally think so, you can use

write[content of file[read file]]to file[write file] as I have explained before.

where have you been? I've heard nothing from you in ages!


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

Offline

 

#3366 2010-07-07 08:31:41

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

Re: Panther development thread

Doing stuff. Not panther.

No, I meant something like:

create file ___ in folder ___


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

Offline

 

#3367 2010-07-07 08:44:21

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Panther development thread

SeptimusHeap wrote:

Doing stuff. Not panther.

No, I meant something like:

create file ___ in folder ___

I've got a custom block (Made by jd1) that does that.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#3368 2010-07-07 11:49:22

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

Re: Panther development thread

how do you get a .cs file like jen's pitch thing to work with Panther?


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

Offline

 

#3369 2010-07-07 12:28:59

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Panther development thread

I did it by coping the code, then opening a workspace. Then select all then select file in. Allthough you need to save a copy of your blockspecs as it alters them.


You can now reach me on Twitter @johnnydean1_

Offline

 

#3370 2010-07-07 22:52:06

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: Panther development thread

can someone tell me what's wrong with this script? (I made it in CYOB and it's supposed to convert 24 bit binary numbers to hexadecimal values.)

Code:

| n1 n2 n3 n4 n5 n6 num hex |
n1 _ self letters: 21 through: 24 of: t1.
n2 _ self letters: 17 through: 20 of: t1.
n3 _ self letters: 13 through: 16 of: t1.
n4 _ self letters: 9 through: 12 of: t1.
n5 _ self letters: 5 through: 8 of: t1.
n6 _ self letters: 1 through: 4 of: t1.
num _ self concatenate num with: self letter: 4 of n1 +  self letter: 3 of: n1 * 2 + self letter: 2 of: n1 * 4 + self letter: 1 of: n1 * 8.
num _ self concatenate: num with: self letter: 4 of n2 +  self letter: 3 of: n2 * 2 + self letter: 2 of: n2 * 4 + self letter: 1 of: n2 * 8.
num _ self concatenate: num with: self letter: 4 of n3 +  self letter: 3 of: n3 * 2 + self letter: 2 of: n3 * 4 + self letter: 1 of: n3 * 8.
num _ self concatenate: num with: self letter: 4 of n4 +  self letter: 3 of: n4 * 2 + self letter: 2 of: n4 * 4 + self letter: 1 of: n4 * 8.
num _ self concatenate: num with: self letter: 4 of n5 +  self letter: 3 of: n5 * 2 + self letter: 2 of: n5 * 4 + self letter: 1 of: n5 * 8.
num _ self concatenate: num with: self letter: 4 of n6 +  self letter: 3 of: n6 * 2 + self letter: 2 of: n6 * 4 + self letter: 1 of: n6 * 8.
^ num

EDIT: That's not the whole thing, I've only got the first part of it done and it gives me an error.

Last edited by ScratchReallyROCKS (2010-07-07 22:53:12)


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#3371 2010-07-08 03:32:54

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Panther development thread

Code:

| n1 n2 n3 n4 n5 n6 num hex x1 m1 c1 h1|

n1_ self letters: (1) through: (6) of: (t1).
n1_ n1 asString.

x1_ self letter: (4) of: (n1).
x1_ x1 asNumber.
x1_ x1 * 1.
c1_ self letter: (3) of: (n1).
c1_ c1 asNumber.
c1_ c1 * 2.
m1_ self letter: (2) of: (n1).
m1_ m1 asNumber.
m1_ m1 * 4.
h1_ self letter: (1) of: (n1).
h1_ h1 asNumber.
h1_ h1 * 8.

n1_ x1 + c1.
n1_ n1 + m1.
n1_ n1 + h1.

^ n1

This works. So just do that with them all

Last edited by johnnydean1 (2010-07-08 03:36:53)


You can now reach me on Twitter @johnnydean1_

Offline

 

#3372 2010-07-08 10:07:20

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

Re: Panther development thread

johnnydean1 wrote:

I did it by coping the code, then opening a workspace. Then select all then select file in. Allthough you need to save a copy of your blockspecs as it alters them.

when I did this, is broke all the blocks and the control blocks all vanished. there weren't any pitch blocks either...


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

Offline

 

#3373 2010-07-08 10:32:27

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

Re: Panther development thread

You can edit the changeset either in a workspace or in a browser (open a FileList select the .cs file right blick and select "browse"). Then you can just copy the one line with the spec for the pitch block to another workspace or to the clipboard and delete the #blockSpecs method from the changeset. That way filing in the - modified - changeset will not overwrite your existing specs. Afterwards edit Panther's block specs and paste the pitch block's spec into it.

If that doesn't work, holler and I'll be glad to help  smile

Last edited by Jens (2010-07-08 10:33:00)


Jens Mönig

Offline

 

#3374 2010-07-08 17:44:18

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Panther development thread

ScratchReallyROCKS wrote:

can someone tell me what's wrong with this script? (I made it in CYOB and it's supposed to convert 24 bit binary numbers to hexadecimal values.)

Code:

| n1 n2 n3 n4 n5 n6 num hex |
n1 _ self letters: 21 through: 24 of: t1.
n2 _ self letters: 17 through: 20 of: t1.
n3 _ self letters: 13 through: 16 of: t1.
n4 _ self letters: 9 through: 12 of: t1.
n5 _ self letters: 5 through: 8 of: t1.
n6 _ self letters: 1 through: 4 of: t1.
num _ self concatenate num with: self letter: 4 of n1 +  self letter: 3 of: n1 * 2 + self letter: 2 of: n1 * 4 + self letter: 1 of: n1 * 8.
num _ self concatenate: num with: self letter: 4 of n2 +  self letter: 3 of: n2 * 2 + self letter: 2 of: n2 * 4 + self letter: 1 of: n2 * 8.
num _ self concatenate: num with: self letter: 4 of n3 +  self letter: 3 of: n3 * 2 + self letter: 2 of: n3 * 4 + self letter: 1 of: n3 * 8.
num _ self concatenate: num with: self letter: 4 of n4 +  self letter: 3 of: n4 * 2 + self letter: 2 of: n4 * 4 + self letter: 1 of: n4 * 8.
num _ self concatenate: num with: self letter: 4 of n5 +  self letter: 3 of: n5 * 2 + self letter: 2 of: n5 * 4 + self letter: 1 of: n5 * 8.
num _ self concatenate: num with: self letter: 4 of n6 +  self letter: 3 of: n6 * 2 + self letter: 2 of: n6 * 4 + self letter: 1 of: n6 * 8.
^ num

EDIT: That's not the whole thing, I've only got the first part of it done and it gives me an error.

I remade all of that and it works:

Code:

|length n1 n2 n3 n4 n5 n6 num hex x1 m1 c1 h1|
n1_ 0000.
n2_ 0000.
n3_ 0000.
n4_ 0000.
n5_ 0000.
n6_ 0000.

length_ self stringLength: (t1).
length >  23
ifTrue: [
n1_ self letters: (21) through: (24) of: (t1).
n1_ n1 asString.
].
length > 19
ifTrue: [
n2_ self letters: (17) through: (20) of: (t1).
n2_ n2 asString.
].

length > 15
ifTrue: [
n3_ self letters: (13) through: (16) of: (t1).
n3_ n3 asString.
].

length > 11
ifTrue: [
n4_ self letters: (9) through: (12) of: (t1).
n4_ n4 asString.
].

length > 7
ifTrue: [
n5_ self letters: (5) through: (8) of: (t1).
n5_ n5 asString.
].

length > 3
ifTrue: [
n6_ self letters: (1) through: (4) of: (t1).
n6_ n6 asString.
].


x1_ self letter: (4) of: (n1).
x1_ x1 asNumber.
x1_ x1 * 1.
c1_ self letter: (3) of: (n1).
c1_ c1 asNumber.
c1_ c1 * 2.
m1_ self letter: (2) of: (n1).
m1_ m1 asNumber.
m1_ m1 * 4.
h1_ self letter: (1) of: (n1).
h1_ h1 asNumber.
h1_ h1 * 8.

n1_ x1 + c1.
n1_ n1 + m1.
n1_ n1 + h1.




x1_ self letter: (4) of: (n2).
x1_ x1 asNumber.
x1_ x1 * 1.
c1_ self letter: (3) of: (n2).
c1_ c1 asNumber.
c1_ c1 * 2.
m1_ self letter: (2) of: (n2).
m1_ m1 asNumber.
m1_ m1 * 4.
h1_ self letter: (1) of: (n2).
h1_ h1 asNumber.
h1_ h1 * 8.

n2_ x1 + c1.
n2_ n2 + m1.
n2_ n2 + h1.


x1_ self letter: (4) of: (n3).
x1_ x1 asNumber.
x1_ x1 * 1.
c1_ self letter: (3) of: (n3).
c1_ c1 asNumber.
c1_ c1 * 2.
m1_ self letter: (2) of: (n3).
m1_ m1 asNumber.
m1_ m1 * 4.
h1_ self letter: (1) of: (n3).
h1_ h1 asNumber.
h1_ h1 * 8.

n3_ x1 + c1.
n3_ n3 + m1.
n3_ n3 + h1.


x1_ self letter: (4) of: (n4).
x1_ x1 asNumber.
x1_ x1 * 1.
c1_ self letter: (3) of: (n4).
c1_ c1 asNumber.
c1_ c1 * 2.
m1_ self letter: (2) of: (n4).
m1_ m1 asNumber.
m1_ m1 * 4.
h1_ self letter: (1) of: (n4).
h1_ h1 asNumber.
h1_ h1 * 8.

n4_ x1 + c1.
n4_ n4 + m1.
n4_ n4 + h1.

x1_ self letter: (4) of: (n5).
x1_ x1 asNumber.
x1_ x1 * 1.
c1_ self letter: (3) of: (n5).
c1_ c1 asNumber.
c1_ c1 * 2.
m1_ self letter: (2) of: (n5).
m1_ m1 asNumber.
m1_ m1 * 4.
h1_ self letter: (1) of: (n5).
h1_ h1 asNumber.
h1_ h1 * 8.

n5_ x1 + c1.
n5_ n5 + m1.
n5_ n5 + h1.


x1_ self letter: (4) of: (n6).
x1_ x1 asNumber.
x1_ x1 * 1.
c1_ self letter: (3) of: (n6).
c1_ c1 asNumber.
c1_ c1 * 2.
m1_ self letter: (2) of: (n6).
m1_ m1 asNumber.
m1_ m1 * 4.
h1_ self letter: (1) of: (n6).
h1_ h1 asNumber.
h1_ h1 * 8.

n6_ x1 + c1.
n6_ n6 + m1.
n6_ n6 + h1.

num_ ''.
num_ self concatenate: (num) with: (n1).

num_ self concatenate: (num) with: (n2). 

num_ self concatenate: (num) with: (n3). 

num_ self concatenate: (num) with: (n4). 

num_ self concatenate: (num) with: (n5). 

num_ self concatenate: (num) with: (n6).

^ num

You owe me big time this took me about 1 hour!


You can now reach me on Twitter @johnnydean1_

Offline

 

#3375 2010-07-08 19:45:56

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: Panther development thread

johnnydean1 wrote:

I remade all of that and it works:

Code:

|length n1 n2 n3 n4 n5 n6 num hex x1 m1 c1 h1|
n1_ 0000.
n2_ 0000.
n3_ 0000.
n4_ 0000.
n5_ 0000.
n6_ 0000.

length_ self stringLength: (t1).
length >  23
ifTrue: [
n1_ self letters: (21) through: (24) of: (t1).
n1_ n1 asString.
].
length > 19
ifTrue: [
n2_ self letters: (17) through: (20) of: (t1).
n2_ n2 asString.
].

length > 15
ifTrue: [
n3_ self letters: (13) through: (16) of: (t1).
n3_ n3 asString.
].

length > 11
ifTrue: [
n4_ self letters: (9) through: (12) of: (t1).
n4_ n4 asString.
].

length > 7
ifTrue: [
n5_ self letters: (5) through: (8) of: (t1).
n5_ n5 asString.
].

length > 3
ifTrue: [
n6_ self letters: (1) through: (4) of: (t1).
n6_ n6 asString.
].


x1_ self letter: (4) of: (n1).
x1_ x1 asNumber.
x1_ x1 * 1.
c1_ self letter: (3) of: (n1).
c1_ c1 asNumber.
c1_ c1 * 2.
m1_ self letter: (2) of: (n1).
m1_ m1 asNumber.
m1_ m1 * 4.
h1_ self letter: (1) of: (n1).
h1_ h1 asNumber.
h1_ h1 * 8.

n1_ x1 + c1.
n1_ n1 + m1.
n1_ n1 + h1.




x1_ self letter: (4) of: (n2).
x1_ x1 asNumber.
x1_ x1 * 1.
c1_ self letter: (3) of: (n2).
c1_ c1 asNumber.
c1_ c1 * 2.
m1_ self letter: (2) of: (n2).
m1_ m1 asNumber.
m1_ m1 * 4.
h1_ self letter: (1) of: (n2).
h1_ h1 asNumber.
h1_ h1 * 8.

n2_ x1 + c1.
n2_ n2 + m1.
n2_ n2 + h1.


x1_ self letter: (4) of: (n3).
x1_ x1 asNumber.
x1_ x1 * 1.
c1_ self letter: (3) of: (n3).
c1_ c1 asNumber.
c1_ c1 * 2.
m1_ self letter: (2) of: (n3).
m1_ m1 asNumber.
m1_ m1 * 4.
h1_ self letter: (1) of: (n3).
h1_ h1 asNumber.
h1_ h1 * 8.

n3_ x1 + c1.
n3_ n3 + m1.
n3_ n3 + h1.


x1_ self letter: (4) of: (n4).
x1_ x1 asNumber.
x1_ x1 * 1.
c1_ self letter: (3) of: (n4).
c1_ c1 asNumber.
c1_ c1 * 2.
m1_ self letter: (2) of: (n4).
m1_ m1 asNumber.
m1_ m1 * 4.
h1_ self letter: (1) of: (n4).
h1_ h1 asNumber.
h1_ h1 * 8.

n4_ x1 + c1.
n4_ n4 + m1.
n4_ n4 + h1.

x1_ self letter: (4) of: (n5).
x1_ x1 asNumber.
x1_ x1 * 1.
c1_ self letter: (3) of: (n5).
c1_ c1 asNumber.
c1_ c1 * 2.
m1_ self letter: (2) of: (n5).
m1_ m1 asNumber.
m1_ m1 * 4.
h1_ self letter: (1) of: (n5).
h1_ h1 asNumber.
h1_ h1 * 8.

n5_ x1 + c1.
n5_ n5 + m1.
n5_ n5 + h1.


x1_ self letter: (4) of: (n6).
x1_ x1 asNumber.
x1_ x1 * 1.
c1_ self letter: (3) of: (n6).
c1_ c1 asNumber.
c1_ c1 * 2.
m1_ self letter: (2) of: (n6).
m1_ m1 asNumber.
m1_ m1 * 4.
h1_ self letter: (1) of: (n6).
h1_ h1 asNumber.
h1_ h1 * 8.

n6_ x1 + c1.
n6_ n6 + m1.
n6_ n6 + h1.

num_ ''.
num_ self concatenate: (num) with: (n1).

num_ self concatenate: (num) with: (n2). 

num_ self concatenate: (num) with: (n3). 

num_ self concatenate: (num) with: (n4). 

num_ self concatenate: (num) with: (n5). 

num_ self concatenate: (num) with: (n6).

^ num

You owe me big time this took me about 1 hour!

It may have taken you an hour, but it's still not what I want. I need a code that converts a a 24 bit binary number into a hexadecimal value. Use this to see how binary and hexadecimal numbers line up:

Binary    |    Hexadecimal
0000       |    0
0001       |    1
0010       |    2
0011       |    3
0100       |    4
0101       |    5
0110       |    6
0111       |    7
1000       |    8
1001       |    9
1010       |    A
1011       |    B
1100       |    C
1101       |    D
1110       |    E
1111       |    F

so that means that hexadecimal FFFFFF or white, would be 111111111111111111111111 in binary, and hexadecimal 0000FF or blue, would be 000000000000000011111111 in binary.


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

Board footer