It's nice to be back "connected" after such a long break from the internet. However I haven't lost time twiddling my thumbs, and have been developing quite a few things in the meantime.
I dusted out that old book in the back of my head called "Squeak", and managed to make a great plugin for Scratch that will effectively convert your blocks to Squeak!
You can download it from my dropbox here.
To use, right click on a block.
Furthermore, I have continued and almost completed the development of Bingo 2.0! Here are some of the features I am really proud of:
- Improved blocks and fixed glitches
- Implemented object oriented programming and data types
- Updated interface translations and help dialogs
- Added a working theme manager along with a home made default skin overhaul
- Allowed browsing of Mod Share 3 from within the Bingo program
- Improved tooltips and scroll bars
- Added a one-click EXE compiler (made in VB.NET) that actually works, with options for how you want the EXE to look like!
- Implemented automatic uploading to Mod Share 3!
I didn't have internet when I coded Bingo though, so the uploading part still needs to be programmed server side. Expect a release within the month!
--
For those interested I have also developed a series of programs not related to Scratch which will be coming up soon on my site, Futuresight Tech.
Offline
Yay, you got the block-to-squeak working!
I'll download it this afternoon.
Offline
Hardmath123 wrote:
Yay, you got the block-to-squeak working!
I'll download it this afternoon.
Yeah, the wonders boredom can do...
Tell me how you think it is!
Offline
And bumpity...
Offline
Sorry, LS97, I got a new Mac recently and I don't have Scratch on it. I'll test it on my old one as soon as I can.
Offline
If you convert a script to squeak, does it run faster?

Offline
I finally got it working on my old Mac, and it's totally awesome.
when gf clicked set [rotation-x v] to [0] set [rotation-y v] to [0] forever clear set [repetition-n v] to [-3] pen up repeat ((length of [Coordinates v] ) / (3)) change [repetition-n v] by (3) if <[penup] = (item ((repetition-n) + (1)) of [Coordinates v] )> pen up else set [xcoord v] to ((0.01) + (item ((repetition-n) + (1)) of [Coordinates v] )) set [ycoord v] to ((0.01) + (item ((repetition-n) + (2)) of [Coordinates v] )) set [zcoord v] to ((0.01) + (item ((repetition-n) + (3)) of [Coordinates v] )) set [dist v] to ( [sqrt v] of (((xcoord) * (xcoord)) + ((zcoord) * (zcoord)))) set [angleFormed v] to (( [atan v] of ((xcoord) / (zcoord))) + (rotation-y)) if <(zcoord) < [0]> if <(xcoord) < [0]> set [angleFormed v] to ((-180) + (angleFormed)) else set [angleFormed v] to ((180) + (angleFormed)) end end set [new-x v] to ((dist) * ( [sin v] of (angleFormed))) set [new-z v] to ((dist) * ( [cos v] of (angleFormed))) set [dist v] to ( [sqrt v] of (((ycoord) * (ycoord)) + ((new-z) * (new-z)))) set [angleFormed v] to (( [atan v] of ((ycoord) / (new-z))) + (rotation-x)) if <(new-z) < [0]> if <(ycoord) < [0]> set [angleFormed v] to ((-180) + (angleFormed)) else set [angleFormed v] to ((180) + (angleFormed)) end end set [new-y v] to ((dist) * ( [sin v] of (angleFormed))) set pen shade to (new-z) go to x: (new-x) y: (new-y) pen down end end wait (0.1) secs if <key [left arrow v] pressed?> change [rotation-y v] by (-10) end if <key [right arrow v] pressed?> change [rotation-y v] by (10) end if <key [up arrow v] pressed?> change [rotation-x v] by (10) end if <key [down arrow v] pressed?> change [rotation-x v] by (-10) end end
whenGreenflagClicked
self setVar: 'rotation-x' to: '0'.
self setVar: 'rotation-y' to: '0'.
"forever was ignored: Squeak does not support them."
self clearPenTrails.
self setVar: 'repetition-n' to: '-3'.
self putPenUp.
self / timesRepeat: [
self changeVar: 'repetition-n' by: 3.
self = ifTrue: [
self putPenUp.
] ifFalse: [
self setVar: 'xcoord' to: self +.
self setVar: 'ycoord' to: self +.
self setVar: 'zcoord' to: self +.
self setVar: 'dist' to: (self computeFunction: 'sqrt' of: self + ).
self setVar: 'angleFormed' to: self +.
self < ifTrue: [
self < ifTrue: [
self setVar: 'angleFormed' to: self +.
] ifFalse: [
self setVar: 'angleFormed' to: self +.
].
].
self setVar: 'new-x' to: self *.
self setVar: 'new-z' to: self *.
self setVar: 'dist' to: (self computeFunction: 'sqrt' of: self + ).
self setVar: 'angleFormed' to: self +.
self < ifTrue: [
self < ifTrue: [
self setVar: 'angleFormed' to: self +.
] ifFalse: [
self setVar: 'angleFormed' to: self +.
].
].
self setVar: 'new-y' to: self *.
self setPenShadeTo: (self getVar: 'new-z').
self gotoX: (self getVar: 'new-x') y: (self getVar: 'new-y').
self putPenDown.
].
].
"wait block ignored; not allowed in Squeak".
(self keyPressed: 'left arrow' ) ifTrue: [
self changeVar: 'rotation-y' by: -10.
].
(self keyPressed: 'right arrow' ) ifTrue: [
self changeVar: 'rotation-y' by: 10.
].
(self keyPressed: 'up arrow' ) ifTrue: [
self changeVar: 'rotation-x' by: 10.
].
(self keyPressed: 'down arrow' ) ifTrue: [
self changeVar: 'rotation-x' by: -10.
].
"/end forever"EDIT: +/-/x/div operators' operands are all messed up...
Last edited by Hardmath123 (2012-09-11 09:20:14)
Offline
Hardmath123 wrote:
I finally got it working on my old Mac, and it's totally awesome.
when gf clicked set [rotation-x v] to [0] set [rotation-y v] to [0] forever clear set [repetition-n v] to [-3] pen up repeat ((length of [Coordinates v] ) / (3)) change [repetition-n v] by (3) if <[penup] = (item ((repetition-n) + (1)) of [Coordinates v] )> pen up else set [xcoord v] to ((0.01) + (item ((repetition-n) + (1)) of [Coordinates v] )) set [ycoord v] to ((0.01) + (item ((repetition-n) + (2)) of [Coordinates v] )) set [zcoord v] to ((0.01) + (item ((repetition-n) + (3)) of [Coordinates v] )) set [dist v] to ( [sqrt v] of (((xcoord) * (xcoord)) + ((zcoord) * (zcoord)))) set [angleFormed v] to (( [atan v] of ((xcoord) / (zcoord))) + (rotation-y)) if <(zcoord) < [0]> if <(xcoord) < [0]> set [angleFormed v] to ((-180) + (angleFormed)) else set [angleFormed v] to ((180) + (angleFormed)) end end set [new-x v] to ((dist) * ( [sin v] of (angleFormed))) set [new-z v] to ((dist) * ( [cos v] of (angleFormed))) set [dist v] to ( [sqrt v] of (((ycoord) * (ycoord)) + ((new-z) * (new-z)))) set [angleFormed v] to (( [atan v] of ((ycoord) / (new-z))) + (rotation-x)) if <(new-z) < [0]> if <(ycoord) < [0]> set [angleFormed v] to ((-180) + (angleFormed)) else set [angleFormed v] to ((180) + (angleFormed)) end end set [new-y v] to ((dist) * ( [sin v] of (angleFormed))) set pen shade to (new-z) go to x: (new-x) y: (new-y) pen down end end wait (0.1) secs if <key [left arrow v] pressed?> change [rotation-y v] by (-10) end if <key [right arrow v] pressed?> change [rotation-y v] by (10) end if <key [up arrow v] pressed?> change [rotation-x v] by (10) end if <key [down arrow v] pressed?> change [rotation-x v] by (-10) end endCode:
whenGreenflagClicked self setVar: 'rotation-x' to: '0'. self setVar: 'rotation-y' to: '0'. "forever was ignored: Squeak does not support them." self clearPenTrails. self setVar: 'repetition-n' to: '-3'. self putPenUp. self / timesRepeat: [ self changeVar: 'repetition-n' by: 3. self = ifTrue: [ self putPenUp. ] ifFalse: [ self setVar: 'xcoord' to: self +. self setVar: 'ycoord' to: self +. self setVar: 'zcoord' to: self +. self setVar: 'dist' to: (self computeFunction: 'sqrt' of: self + ). self setVar: 'angleFormed' to: self +. self < ifTrue: [ self < ifTrue: [ self setVar: 'angleFormed' to: self +. ] ifFalse: [ self setVar: 'angleFormed' to: self +. ]. ]. self setVar: 'new-x' to: self *. self setVar: 'new-z' to: self *. self setVar: 'dist' to: (self computeFunction: 'sqrt' of: self + ). self setVar: 'angleFormed' to: self +. self < ifTrue: [ self < ifTrue: [ self setVar: 'angleFormed' to: self +. ] ifFalse: [ self setVar: 'angleFormed' to: self +. ]. ]. self setVar: 'new-y' to: self *. self setPenShadeTo: (self getVar: 'new-z'). self gotoX: (self getVar: 'new-x') y: (self getVar: 'new-y'). self putPenDown. ]. ]. "wait block ignored; not allowed in Squeak". (self keyPressed: 'left arrow' ) ifTrue: [ self changeVar: 'rotation-y' by: -10. ]. (self keyPressed: 'right arrow' ) ifTrue: [ self changeVar: 'rotation-y' by: 10. ]. (self keyPressed: 'up arrow' ) ifTrue: [ self changeVar: 'rotation-x' by: 10. ]. (self keyPressed: 'down arrow' ) ifTrue: [ self changeVar: 'rotation-x' by: -10. ]. "/end forever"EDIT: +/-/x/div operators' operands are all messed up...
![]()
How so?
Offline
veggieman001 wrote:
Hardmath123 wrote:
I finally got it working on my old Mac, and it's totally awesome.
when gf clicked set [rotation-x v] to [0] set [rotation-y v] to [0] forever clear set [repetition-n v] to [-3] pen up repeat ((length of [Coordinates v] ) / (3)) change [repetition-n v] by (3) if <[penup] = (item ((repetition-n) + (1)) of [Coordinates v] )> pen up else set [xcoord v] to ((0.01) + (item ((repetition-n) + (1)) of [Coordinates v] )) set [ycoord v] to ((0.01) + (item ((repetition-n) + (2)) of [Coordinates v] )) set [zcoord v] to ((0.01) + (item ((repetition-n) + (3)) of [Coordinates v] )) set [dist v] to ( [sqrt v] of (((xcoord) * (xcoord)) + ((zcoord) * (zcoord)))) set [angleFormed v] to (( [atan v] of ((xcoord) / (zcoord))) + (rotation-y)) if <(zcoord) < [0]> if <(xcoord) < [0]> set [angleFormed v] to ((-180) + (angleFormed)) else set [angleFormed v] to ((180) + (angleFormed)) end end set [new-x v] to ((dist) * ( [sin v] of (angleFormed))) set [new-z v] to ((dist) * ( [cos v] of (angleFormed))) set [dist v] to ( [sqrt v] of (((ycoord) * (ycoord)) + ((new-z) * (new-z)))) set [angleFormed v] to (( [atan v] of ((ycoord) / (new-z))) + (rotation-x)) if <(new-z) < [0]> if <(ycoord) < [0]> set [angleFormed v] to ((-180) + (angleFormed)) else set [angleFormed v] to ((180) + (angleFormed)) end end set [new-y v] to ((dist) * ( [sin v] of (angleFormed))) set pen shade to (new-z) go to x: (new-x) y: (new-y) pen down end end wait (0.1) secs if <key [left arrow v] pressed?> change [rotation-y v] by (-10) end if <key [right arrow v] pressed?> change [rotation-y v] by (10) end if <key [up arrow v] pressed?> change [rotation-x v] by (10) end if <key [down arrow v] pressed?> change [rotation-x v] by (-10) end endCode:
whenGreenflagClicked self setVar: 'rotation-x' to: '0'. self setVar: 'rotation-y' to: '0'. "forever was ignored: Squeak does not support them." self clearPenTrails. self setVar: 'repetition-n' to: '-3'. self putPenUp. self / timesRepeat: [ self changeVar: 'repetition-n' by: 3. self = ifTrue: [ self putPenUp. ] ifFalse: [ self setVar: 'xcoord' to: self +. self setVar: 'ycoord' to: self +. self setVar: 'zcoord' to: self +. self setVar: 'dist' to: (self computeFunction: 'sqrt' of: self + ). self setVar: 'angleFormed' to: self +. self < ifTrue: [ self < ifTrue: [ self setVar: 'angleFormed' to: self +. ] ifFalse: [ self setVar: 'angleFormed' to: self +. ]. ]. self setVar: 'new-x' to: self *. self setVar: 'new-z' to: self *. self setVar: 'dist' to: (self computeFunction: 'sqrt' of: self + ). self setVar: 'angleFormed' to: self +. self < ifTrue: [ self < ifTrue: [ self setVar: 'angleFormed' to: self +. ] ifFalse: [ self setVar: 'angleFormed' to: self +. ]. ]. self setVar: 'new-y' to: self *. self setPenShadeTo: (self getVar: 'new-z'). self gotoX: (self getVar: 'new-x') y: (self getVar: 'new-y'). self putPenDown. ]. ]. "wait block ignored; not allowed in Squeak". (self keyPressed: 'left arrow' ) ifTrue: [ self changeVar: 'rotation-y' by: -10. ]. (self keyPressed: 'right arrow' ) ifTrue: [ self changeVar: 'rotation-y' by: 10. ]. (self keyPressed: 'up arrow' ) ifTrue: [ self changeVar: 'rotation-x' by: 10. ]. (self keyPressed: 'down arrow' ) ifTrue: [ self changeVar: 'rotation-x' by: -10. ]. "/end forever"EDIT: +/-/x/div operators' operands are all messed up...
![]()
How so?
self setVar: 'xcoord' to: self +.
self setVar: 'ycoord' to: self +.
self setVar: 'zcoord' to: self +.Offline
Ah, I missed that! Thank you for spotting it, I will update it as soon as possible
Offline
Just an idea - where you say forever isn't supported, can't you just do what the dialog box system does which is call "self world doOneCycle" every loop? (DialogBoxMorph getUserResponse)
E.g.
[true] whileTrue: ["code here" self world doOneCycle].
Offline
TheSuccessor wrote:
Just an idea - where you say forever isn't supported, can't you just do what the dialog box system does which is call "self world doOneCycle" every loop? (DialogBoxMorph getUserResponse)
E.g.
[true] whileTrue: ["code here" self world doOneCycle].
I could, but then there would be absolutely no way to stop it, whereas in a scratch project you can just press the stop button.
Offline
MrFlash67 wrote:
Could you please put the B2Squeak as a standalone .CS? Pleasssssssssssssse?
I could, but why don't you just navigate to:
Scratch-Blocks > CommandBlockMorph > rightButtonMenu
and find the entry that says "convert to scratchblocks" or something.
Delete that entry and you'll revert all effects of the Block2Scratchblocks
Offline
Awesome!
untitledMethod
self setVar: 'bleh' to: '0'.
(self keyPressed: 'left arrow' ) ifTrue: [
self changeVar: 'xv' by: -0.7.
].
(self keyPressed: 'right arrow' ) ifTrue: [
self changeVar: 'xv' by: 0.7.
].
self setVar: 'xv' to: self *.
self changeXposBy: (self getVar: 'xv').
(self touchingColor: ) ifTrue: [
self changeYposBy: 1.
self changeVar: 'bleh' by: 1.
(self touchingColor: ) ifTrue: [
self changeYposBy: 1.
self changeVar: 'bleh' by: 1.
(self touchingColor: ) ifTrue: [
self changeYposBy: 1.
self changeVar: 'bleh' by: 1.
(self touchingColor: ) ifTrue: [
self changeYposBy: 1.
self changeVar: 'bleh' by: 1.
(self touchingColor: ) ifTrue: [
self changeYposBy: 1.
self changeVar: 'bleh' by: 1.
(self touchingColor: ) ifTrue: [
self changeXposBy: self *.
self setVar: 'xv' to: '0'.
self changeYposBy: -5.
(self keyPressed: 'up arrow' ) ifTrue: [
self changeXposBy: 5.
self setVar: 'c n' to: '-5'.
(self touchingColor: ) ifTrue: [
self setVar: 'xv' to: '-10'.
self setVar: 'yv' to: '12'.
] ifFalse: [
self changeXposBy: -10.
self setVar: 'c n' to: '5'.
(self touchingColor: ) ifTrue: [
self setVar: 'xv' to: '10'.
self setVar: 'yv' to: '12'.
].
].
self changeXposBy: (self getVar: 'c n').
] ifFalse: [
self changeVar: 'xv' by: self -.
].
] ifFalse: [
].
].
].
].
].
].
self setVar: 'yv' to: self *.
self changeYposBy: (self getVar: 'yv').
(self touchingColor: ) ifTrue: [
self changeYposBy: self *.
self setVar: 'yv' to: '0'.
].
self changeYposBy: -1.
(self keyPressed: 'up arrow' ) ifTrue: [
(self touchingColor: ) ifTrue: [
self setVar: 'yv' to: '12'.
].
].
self changeYposBy: 1.
self < ifTrue: [
self changeYposBy: -1.
self not ifTrue: [
self changeVar: 'yv' by: -1.
].
self changeYposBy: 1.
].Offline
LS97 wrote:
MrFlash67 wrote:
Could you please put the B2Squeak as a standalone .CS? Pleasssssssssssssse?
I could, but why don't you just navigate to:
Scratch-Blocks > CommandBlockMorph > rightButtonMenu
and find the entry that says "convert to scratchblocks" or something.
Delete that entry and you'll revert all effects of the Block2Scratchblocks![]()
What I meant, is that the blocks2scratchblocks was a .cs (I think), and I could easily file it in, and I want a .cs file just for the blocks2squeak. Does the blocks2squeak change the right-click menu?
Offline
MrFlash67 wrote:
LS97 wrote:
MrFlash67 wrote:
Could you please put the B2Squeak as a standalone .CS? Pleasssssssssssssse?
I could, but why don't you just navigate to:
Scratch-Blocks > CommandBlockMorph > rightButtonMenu
and find the entry that says "convert to scratchblocks" or something.
Delete that entry and you'll revert all effects of the Block2Scratchblocks![]()
What I meant, is that the blocks2scratchblocks was a .cs (I think), and I could easily file it in, and I want a .cs file just for the blocks2squeak. Does the blocks2squeak change the right-click menu?
Of course!
However, the blocks3squeak will override any previously installed right menu buttons. That is why I have released both together.
Offline