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

#976 2010-04-12 06:34:27

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

Re: Panther development thread

yes, I was thinking that because we now have the ability to actaully scan, store and re-render images, even sending them over mesh, we might want nice graphics when a person interacts with the project, but want it as fast as possible when they download or scan an image. if that's the case, a block that could switch between turrbo-speed and normal speed would be very useful indeed. the instance probably already exists, you might even be able to guess.

here's one I made that I completely guesssed the instance and it worked first time:

Code:

('open recording prompt' #- #recordSound)
and
('open camera prompt' #- #takePicture)

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

Offline

 

#977 2010-04-12 06:35:17

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

Re: Panther development thread

markyparky56 wrote:

Sperry wrote:

sparks wrote:

I'm sorry, I'd dearly love to give you the files for panther, and you have helped alot but I have a feeling nXIII would like to know too, and if you ask nicely he's sure to say yes. It's just not my call  sad

I really think we should publicly release it now anyway, it's several days after we said we would.

Don't worry. I'm in no rush to get it. I'd just thought it would be nice, thats all.

At the moment I was trying to think of some new blocks that I could code. I need something to practice my instance coding on. Any ideas for new blocks?

how about a block that checks if someone has joined the mesh? I think that would be a good block to have.

Yikes!!! I havent got to mesh blocks yet. I have never coded with mesh........
I can't do that one because I don't know the code or the behaviour of mesh


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

Offline

 

#978 2010-04-12 06:39:24

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

Re: Panther development thread

Sperry wrote:

markyparky56 wrote:

Sperry wrote:


Don't worry. I'm in no rush to get it. I'd just thought it would be nice, thats all.

At the moment I was trying to think of some new blocks that I could code. I need something to practice my instance coding on. Any ideas for new blocks?

how about a block that checks if someone has joined the mesh? I think that would be a good block to have.

Yikes!!! I havent got to mesh blocks yet. I have never coded with mesh........
I can't do that one because I don't know the code or the behaviour of mesh

Good point... well then... try making those turbospeed blocks sparks just said.
They would be very good for fast in game rendering wouldn't they?


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

 

#979 2010-04-12 06:44:28

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

Re: Panther development thread

sparks wrote:

yes, I was thinking that because we now have the ability to actaully scan, store and re-render images, even sending them over mesh, we might want nice graphics when a person interacts with the project, but want it as fast as possible when they download or scan an image. if that's the case, a block that could switch between turrbo-speed and normal speed would be very useful indeed. the instance probably already exists, you might even be able to guess.

here's one I made that I completely guesssed the instance and it worked first time:

Code:

('open recording prompt' #- #recordSound)
and
('open camera prompt' #- #takePicture)

Whats the block for? I don't get it.

If it's something to do with presentation mode, I don't think theres anything you could do, without messing with the ScratchFrameMorph code - which isn't nice.


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

Offline

 

#980 2010-04-12 06:46:11

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

Re: Panther development thread

Ok guys, my <Hosting mesh?> blocks broken. It keeps saying error. (Seems to be fixed now though...)


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

 

#981 2010-04-12 06:51:05

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

Re: Panther development thread

Sperry wrote:

sparks wrote:

yes, I was thinking that because we now have the ability to actaully scan, store and re-render images, even sending them over mesh, we might want nice graphics when a person interacts with the project, but want it as fast as possible when they download or scan an image. if that's the case, a block that could switch between turrbo-speed and normal speed would be very useful indeed. the instance probably already exists, you might even be able to guess.

here's one I made that I completely guesssed the instance and it worked first time:

Code:

('open recording prompt' #- #recordSound)
and
('open camera prompt' #- #takePicture)

Whats the block for? I don't get it.

If it's something to do with presentation mode, I don't think theres anything you could do, without messing with the ScratchFrameMorph code - which isn't nice.

if you go to edit > set stepping speed, there is an option called turbo speed. What it does, when selected, is not render the images on the stage as often. this allows things to preform a lot faster because less time is spent drawing the image on the stage over and over. So when you want nice, smooth graphics, you set the speed to mormal, and when you want to scan something, measure something, render a mathematical piece of art, any of those things that take ages, but it's only the end product you want, that's when you want to use turbo-speed as it takes a LOT less time to complete the action. If a block could be made to toggle between turbo-speed and normal speed, a project would be able to have the best of both. Great graphics when it is needed, but great speed when that is more important.


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

Offline

 

#982 2010-04-12 06:56:49

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

Re: Panther development thread

sparks wrote:

if you go to edit > set stepping speed, there is an option called turbo speed. What it does, when selected, is not render the images on the stage as often. this allows things to preform a lot faster because less time is spent drawing the image on the stage over and over. So when you want nice, smooth graphics, you set the speed to mormal, and when you want to scan something, measure something, render a mathematical piece of art, any of those things that take ages, but it's only the end product you want, that's when you want to use turbo-speed as it takes a LOT less time to complete the action. If a block could be made to toggle between turbo-speed and normal speed, a project would be able to have the best of both. Great graphics when it is needed, but great speed when that is more important.

Ah ha! I get it now. Although I have no idea where the instance for that would be, but I think it could be FrameMorph so I'll have a look.

So you think a block like this: (Set stepping speed to %s) %s being where you insert Turb0-speed or normal.


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

Offline

 

#983 2010-04-12 07:02:23

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

Re: Panther development thread

Sperry wrote:

sparks wrote:

if you go to edit > set stepping speed, there is an option called turbo speed. What it does, when selected, is not render the images on the stage as often. this allows things to preform a lot faster because less time is spent drawing the image on the stage over and over. So when you want nice, smooth graphics, you set the speed to mormal, and when you want to scan something, measure something, render a mathematical piece of art, any of those things that take ages, but it's only the end product you want, that's when you want to use turbo-speed as it takes a LOT less time to complete the action. If a block could be made to toggle between turbo-speed and normal speed, a project would be able to have the best of both. Great graphics when it is needed, but great speed when that is more important.

Ah ha! I get it now. Although I have no idea where the instance for that would be, but I think it could be FrameMorph so I'll have a look.

So you think a block like this: (Set stepping speed to %s) %s being where you insert Turb0-speed or normal.

well no, I'm pretty sure if you typed something other than that, it would freeze the block, as it's a stack and can't report ERROR. Better to either have a drop down list, or two blocks called [set speed to normal] and [set speed to turbo]

come to think of it, though I don't know how, if there was a block called frame rate or something, you could choose exactly how many frames per second there were. If it set back to the normal value when the project was stopped that would be great I think, though I hav no idea how that would be done.

('set frame rate to %n' #- #?)


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

Offline

 

#984 2010-04-12 07:03:22

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

Re: Panther development thread

Sperry wrote:

sparks wrote:

if you go to edit > set stepping speed, there is an option called turbo speed. What it does, when selected, is not render the images on the stage as often. this allows things to preform a lot faster because less time is spent drawing the image on the stage over and over. So when you want nice, smooth graphics, you set the speed to mormal, and when you want to scan something, measure something, render a mathematical piece of art, any of those things that take ages, but it's only the end product you want, that's when you want to use turbo-speed as it takes a LOT less time to complete the action. If a block could be made to toggle between turbo-speed and normal speed, a project would be able to have the best of both. Great graphics when it is needed, but great speed when that is more important.

Ah ha! I get it now. Although I have no idea where the instance for that would be, but I think it could be FrameMorph so I'll have a look.

So you think a block like this: (Set stepping speed to %s) %s being where you insert Turb0-speed or normal.

Maybe one where its like:
(Activate turbo speed)
and
(Deactivate turbo speed)


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

 

#985 2010-04-12 07:04:05

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

Re: Panther development thread

I think I got it!!!!

Please try this in blockspecs:

Code:

('Set stepping to %s' #- #setSingleStepping: 'Turbo speed OR Normal')

Where it says: 'Turbo speed OR Normal' on the block, insert which one you want.

Hope this works!

Edit:

Also as suggested by markyparky:

Code:

('Activate turbo speed' #- #setSingleStepping: Turbo speed)

Code:

('Deactivate turbo speed' #- #setSingleStepping: Normal)

Last edited by Sperry (2010-04-12 07:13:34)


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

Offline

 

#986 2010-04-12 07:14:54

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

Re: Panther development thread

Sperry wrote:

I think I got it!!!!

Please try this in blockspecs:

Code:

('Set stepping to %s' #- #setSingleStepping: 'Turbo speed OR Normal')

Where it says: 'Turbo speed OR Normal' on the block, insert which one you want.

Hope this works!

Edit:

Also as suggested by markyparky:

Code:

('Activate turbo speed' #- #setSingleStepping: Turbo speed)

Code:

('Deactivate turbo speed' #- #setSingleStepping: Normal)

I tried it, but it froze on both occasions.


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

Offline

 

#987 2010-04-12 07:17:27

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

Re: Panther development thread

I'm afraid all three of them froze when I tried to use them.


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

Offline

 

#988 2010-04-12 07:22:31

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

Re: Panther development thread

dang... whats going wrong?


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

 

#989 2010-04-12 07:24:32

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

Re: Panther development thread

are you sure "setSingleStepping:" is already an instance and you got the name right?

what's the difference between an instance and an instance that ends with a :?

Last edited by sparks (2010-04-12 07:25:10)


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

Offline

 

#990 2010-04-12 07:25:49

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

Re: Panther development thread

sparks wrote:

I tried it, but it froze on both occasions.

Oh...

I think I came up with another idea:

Put the instances under: Scratch-UI-Panes -> ScratchFrameMorph -> stepping

Code:

('Activate turbo speed' #- #setSteppingTurbo)
INSTANCE:
setSteppingTurbo
action: 0.
^ self

AND

Code:

('Deactivate turbo speed' #- #setSteppingNormal)
INSTANCE:
setSteppingNormal
action: 1.
^ self

Could you see if these work?


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

Offline

 

#991 2010-04-12 07:26:55

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

Re: Panther development thread

sparks wrote:

are you sure "setSingleStepping:" is already an instance and you got the name right?

what's the difference between an instance and an instance that ends with a :?

setSingleStepping is an instance

: means you are passing a value through no : means your not


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

Offline

 

#992 2010-04-12 07:27:37

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

Re: Panther development thread

sparks wrote:

are you sure "setSingleStepping:" is already an instance and you got the name right?

what's the difference between an instance and an instance that ends with a :?

I think an instance with a colon (":") is one that has more than one method in it? Am I right? This is me comparing it to an understandable programming language with classes and methods, the instance is the class and the method is the parts with in the instance/class


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

 

#993 2010-04-12 07:30:25

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

Re: Panther development thread

Sperry wrote:

sparks wrote:

I tried it, but it froze on both occasions.

Oh...

I think I came up with another idea:

Put the instances under: Scratch-UI-Panes -> ScratchFrameMorph -> stepping

Code:

('Activate turbo speed' #- #setSteppingTurbo)
INSTANCE:
setSteppingTurbo
action: 0.
^ self

AND

Code:

('Deactivate turbo speed' #- #setSteppingNormal)
INSTANCE:
setSteppingNormal
action: 1.
^ self

Could you see if these work?

I'll see if they do. what would happen if the number after action: was changed to 2 or 3? if that would change the speed even more, could that number be changed using a %n on the block?


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

Offline

 

#994 2010-04-12 07:32:50

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

Re: Panther development thread

this comes up in the browser:
setSteppingTurbo
Nothing more expected ->action: 0.
^ self

do you need to declare any temporary variables?

Last edited by sparks (2010-04-12 07:33:35)


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

Offline

 

#995 2010-04-12 07:35:01

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

Re: Panther development thread

sparks wrote:

this comes up in the browser:
setSteppingTurbo
Nothing more expected ->action: 0.
^ self

do you need to declare any temporary variables?

No, you don't It sets action: to 0 and then returns.

Hmm? I'll have a look at another method- I'm getting to something.


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

Offline

 

#996 2010-04-12 07:35:33

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

Re: Panther development thread

sparks wrote:

this comes up in the browser:
setSteppingTurbo
Nothing more expected ->action: 0.
^ self

do you need to declare any temporary variables?

Maybe thats a good way around it.


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

 

#997 2010-04-12 07:38:19

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

Re: Panther development thread

Here is the instance setSingleStepping:

See if you can work out anything from it.

Code:

setSingleStepping
    "Ask whether script should be single-stepped."

    | menu mSecs |
    menu _ CustomMenu new title: 'Single-step speed?'.
    menu add: 'Turbo speed' action: 0.
    menu add: 'Normal' action: 1.
    menu add: 'Flash blocks (fast)' action: 30.
    menu add: 'Flash blocks (slow)' action: 200.
    mSecs _ menu localize startUp.
    mSecs ifNil: [^ self].
    ScratchProcess blockHighlightMSecs: mSecs.

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

Offline

 

#998 2010-04-12 07:44:10

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

Re: Panther development thread

Sperry wrote:

Here is the instance setSingleStepping:

See if you can work out anything from it.

Code:

setSingleStepping
    "Ask whether script should be single-stepped."

    | menu mSecs |
    menu _ CustomMenu new title: 'Single-step speed?'.
    menu add: 'Turbo speed' action: 0.
    menu add: 'Normal' action: 1.
    menu add: 'Flash blocks (fast)' action: 30.
    menu add: 'Flash blocks (slow)' action: 200.
    mSecs _ menu localize startUp.
    mSecs ifNil: [^ self].
    ScratchProcess blockHighlightMSecs: mSecs.

well the scripts shows that unless the value "action" can be a negatice figure ( i don't think so) then turbo speed is as fast as is possible for scratch?

I think | menu msecs | are variables? I don't really know.


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

Offline

 

#999 2010-04-12 07:46:14

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

Re: Panther development thread

sparks wrote:

Sperry wrote:

Here is the instance setSingleStepping:

See if you can work out anything from it.

Code:

setSingleStepping
    "Ask whether script should be single-stepped."

    | menu mSecs |
    menu _ CustomMenu new title: 'Single-step speed?'.
    menu add: 'Turbo speed' action: 0.
    menu add: 'Normal' action: 1.
    menu add: 'Flash blocks (fast)' action: 30.
    menu add: 'Flash blocks (slow)' action: 200.
    mSecs _ menu localize startUp.
    mSecs ifNil: [^ self].
    ScratchProcess blockHighlightMSecs: mSecs.

well the scripts shows that unless the value "action" can be a negatice figure ( i don't think so) then turbo speed is as fast as is possible for scratch?

I think | menu msecs | are variables? I don't really know.

Ah ha  -  i found out what its for - its then menu to set the stepping speed!!!

EDIT: THOUSANDTH TOPIC POST!!!!!!  big_smile   big_smile   big_smile   big_smile

Last edited by Sperry (2010-04-12 07:47:04)


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

Offline

 

#1000 2010-04-12 07:55:44

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

Re: Panther development thread

It looks like mSecs is what we need to edit.


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

Offline

 

Board footer