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:
('open recording prompt' #- #recordSound) and ('open camera prompt' #- #takePicture)
Offline
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
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
Offline
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?
Offline
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.
Offline
Ok guys, my <Hosting mesh?> blocks broken. It keeps saying error. (Seems to be fixed now though...)
Offline
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.
Offline
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.
Offline
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' #- #?)
Offline
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)
Offline
I think I got it!!!!
Please try this in blockspecs:
('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:
('Activate turbo speed' #- #setSingleStepping: Turbo speed)
('Deactivate turbo speed' #- #setSingleStepping: Normal)
Last edited by Sperry (2010-04-12 07:13:34)
Offline
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.
Offline
dang... whats going wrong?
Offline
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)
Offline
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
('Activate turbo speed' #- #setSteppingTurbo) INSTANCE: setSteppingTurbo action: 0. ^ self
AND
('Deactivate turbo speed' #- #setSteppingNormal) INSTANCE: setSteppingNormal action: 1. ^ self
Could you see if these work?
Offline
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
Offline
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
Offline
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 -> steppingCode:
('Activate turbo speed' #- #setSteppingTurbo) INSTANCE: setSteppingTurbo action: 0. ^ selfAND
Code:
('Deactivate turbo speed' #- #setSteppingNormal) INSTANCE: setSteppingNormal action: 1. ^ selfCould 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?
Offline
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.
Offline
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.
Offline
Here is the instance setSingleStepping:
See if you can work out anything from it.
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.
Offline
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.
Offline
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!!!!!!
Last edited by Sperry (2010-04-12 07:47:04)
Offline