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

#51 2013-04-12 11:45:33

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

Just a theory (please quote and check my logic)but I think:
All languages are originally written in binary.
All commands in all languages can translate back to binary.
Computers run everything in binary.
Squeak could call binary functions.
Squeak can call C++, jave e.t.c.!

Offline

 

#52 2013-04-13 02:48:44

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Mod development recruiting now!

shadowmouse wrote:

Just a theory (please quote and check my logic)but I think:
All languages are originally written in binary.
All commands in all languages can translate back to binary.
Computers run everything in binary.
Squeak could call binary functions.
Squeak can call C++, jave e.t.c.!

Binary > Assembly > Low Level Languages such as C++ > High Level Languages such as BASIC
Squeak can interact with other languages through plugins.
I figured out how to make blocks that only show on Windows/Mac. Here is a screenshot including the code I used: https://dl.dropboxusercontent.com/u/376 … 9%20PM.png


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#53 2013-04-13 03:37:04

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

That's what I was thinking but then I thought, surely you'd want to change either the settingsMorph (for different languages) or rebuildCategorySelctors so that certain languages only appear on certain OSs. I'm making squeak blocks at the moment but I'm encountering a few problems: my

 Squeak: [ ] 
doesn't work. The blockSpec for it is doSqueakCode: t1 (next line) t1, but I've also tried t1 asSymbol and neither work. Also, it's impossible to make a new line within a string input. Can you think of any way to solve eithe problem?

Offline

 

#54 2013-04-13 04:58:37

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Mod development recruiting now!

shadowmouse wrote:

That's what I was thinking but then I thought, surely you'd want to change either the settingsMorph (for different languages) or rebuildCategorySelctors so that certain languages only appear on certain OSs. I'm making squeak blocks at the moment but I'm encountering a few problems: my

 Squeak: [ ] 
doesn't work. The blockSpec for it is doSqueakCode: t1 (next line) t1, but I've also tried t1 asSymbol and neither work. Also, it's impossible to make a new line within a string input. Can you think of any way to solve eithe problem?

To run Squeak code:

Code:

runCode: code
    ^ Compiler evaluate: code for: self logged: false

Run the Squeak code and report result:

Code:

reportCode: code 
    ^ Compiler evaluate: code for: self logged: false

I found the code for a multiline input box a while ago. I think I copied it from Bingo.
Paste this into a Squeak workspace and file it in:

Code:

'From MIT Squeak 0.9.4 (June 1, 2003) [No updates present.] on 13 April 2013 at 6:49:48 pm'!
ExpressionArgMorph subclass: #ExpressionMultiArgMorph
    instanceVariableNames: 'toggleMorph '
    classVariableNames: ''
    poolDictionaries: ''
    category: 'Scratch-Blocks'!

!ExpressionMultiArgMorph methodsFor: 'event handling'!
toggleExpansion
    DialogBoxMorph inform: 'hi'! !


!ExpressionMultiArgMorph methodsFor: 'accessing'!
evaluate
    ^ labelMorph contents! !

!ExpressionMultiArgMorph methodsFor: 'accessing'!
fixArgLayout
    | t1 t2 |
    t1 _ self top.
    self extent: labelMorph extent + (2 @ -1).
    t2 _ 3.
    ScratchTranslator isRTL
        ifTrue: [labelMorph position: self right - (t2 + labelMorph width) @ t1]
        ifFalse: [labelMorph position: self left + t2 @ t1]! !

!ExpressionMultiArgMorph methodsFor: 'accessing'!
numExpression: t1 
    labelMorph contents: t1.
    self fixArgLayout! !

!ExpressionMultiArgMorph methodsFor: 'accessing'!
stringExpression: t1 
    labelMorph contents: t1.
    self fixArgLayout! !


!ExpressionMultiArgMorph methodsFor: 'initialization' stamp: 'NP 8/30/2012 20:18'!
initialize
    super initialize.
    self useRoundedCorners.
    isNumber _ false.
    self stringExpression: ''.
    labelMorph _ MultilineStringMorph new growWithText: true;
             extent: 150 @ 20;
             borderWidth: 0;
             useRoundedCorners;
             font: (ScratchFrameMorph getFont: #Arg);
             color: Color transparent.
    toggleMorph _ ImageMorph new form: (ScratchFrameMorph skinAt: #arrowOpenComment);
             position: labelMorph width - 15 @ 2.
    self addMorph: labelMorph! !

Add this code to Scratch-Blocks > CommandBlockMorph > private > uncoloredArgMorphFor:

Code:

$B = t2 ifTrue: [^ ExpressionMultiArgMorph new stringExpression: 'multiline!';
         extent: 70 @ 20].

Use %B in your block specs instead of using %s where you want to use multiline inputs.


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#55 2013-04-13 06:59:41

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

Thanks so much!  smile  Do you have any idea why the background of the scipting pane goes blank grey if I change the image in the scratchSkin (I haven't changed the name)?

Offline

 

#56 2013-04-13 07:05:31

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

And what's ExpressionMultiArgMorph, the source code doesn't have that one, it must have been put in by the maker(s) of bingo (LS97?)?

Offline

 

#57 2013-04-13 07:08:58

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

Oh, sorry. I tried to do the uncoloredArgMorphFor: before the bit that goes in a workspace. It accepts it now.

Offline

 

#58 2013-04-13 07:20:44

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Mod development recruiting now!

shadowmouse wrote:

Thanks so much!  smile  Do you have any idea why the background of the scipting pane goes blank grey if I change the image in the scratchSkin (I haven't changed the name)?

Did you save the image in the correct format? Sometimes when I mess around with the options in GIMP, it messes up the skin.

shadowmouse wrote:

And what's ExpressionMultiArgMorph, the source code doesn't have that one, it must have been put in by the maker(s) of bingo (LS97?)?

I exported ExpressionMultiArg from Bingo 2.0, but renamed it with "Morph" at the end, like all the other arg morphs have.

shadowmouse wrote:

Oh, sorry. I tried to do the uncoloredArgMorphFor: before the bit that goes in a workspace. It accepts it now.

Lol.


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#59 2013-04-13 07:38:11

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

I haven't changed the format. I've got several scratchSkin backups, only one of which I've changed and the file formats are the same. Mysterious! And do you know how the if else block is made. I'm trying to make an ifTrue: ifFalse: block but it only comes up wih one c shape even though the method is copied straight from if else?

Offline

 

#60 2013-04-13 07:48:37

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Mod development recruiting now!

shadowmouse wrote:

I haven't changed the format. I've got several scratchSkin backups, only one of which I've changed and the file formats are the same. Mysterious! And do you know how the if else block is made. I'm trying to make an ifTrue: ifFalse: block but it only comes up wih one c shape even though the method is copied straight from if else?

What do you mean by ifTrue: ifFalse: block?

BTW, What time zone are you in?


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#61 2013-04-13 08:47:21

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

nathanprocks wrote:

shadowmouse wrote:

I haven't changed the format. I've got several scratchSkin backups, only one of which I've changed and the file formats are the same. Mysterious! And do you know how the if else block is made. I'm trying to make an ifTrue: ifFalse: block but it only comes up wih one c shape even though the method is copied straight from if else?

What do you mean by ifTrue: ifFalse: block?

BTW, What time zone are you in?

I mean like the if else block but with the top line being ifTrue: and the second line being ifFalse:. I'm on British summer time at the moment. I'm not sure what my profile says, I'll go change it.

Offline

 

#62 2013-04-13 08:50:24

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

It was on -05 but I've changed it now, though it seemed to change back. Testing.

Offline

 

#63 2013-04-13 09:25:44

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Mod development recruiting now!

shadowmouse wrote:

nathanprocks wrote:

shadowmouse wrote:

I haven't changed the format. I've got several scratchSkin backups, only one of which I've changed and the file formats are the same. Mysterious! And do you know how the if else block is made. I'm trying to make an ifTrue: ifFalse: block but it only comes up wih one c shape even though the method is copied straight from if else?

What do you mean by ifTrue: ifFalse: block?

BTW, What time zone are you in?

I mean like the if else block but with the top line being ifTrue: and the second line being ifFalse:. I'm on British summer time at the moment. I'm not sure what my profile says, I'll go change it.

Is the ifTrue: ifFalse block going to be a Squeak block?
You can't change your time zone on these forums for some reason I don't know.

Last edited by nathanprocks (2013-04-13 09:26:39)


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#64 2013-04-13 09:44:47

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

nathanprocks wrote:

shadowmouse wrote:

nathanprocks wrote:


What do you mean by ifTrue: ifFalse: block?

BTW, What time zone are you in?

I mean like the if else block but with the top line being ifTrue: and the second line being ifFalse:. I'm on British summer time at the moment. I'm not sure what my profile says, I'll go change it.

Is the ifTrue: ifFalse block going to be a Squeak block?
You can't change your time zone on these forums for some reason I don't know.

Yes it will. I'm working on making the blocks to do the command self referencePosition: self referencePosition + (t1@t2) which will be

self referencePosition: ( )
<self referencePosition>
<( )@( )> 
.
I'm having problems with all of them at the moment, I think becuse of it trying to move a ScratchFrameMorph rather than the sprite, but I'm still working on it. Do you know how to do the ifTrue: ifFalse: block?

Offline

 

#65 2013-04-13 10:25:22

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Mod development recruiting now!

shadowmouse wrote:

nathanprocks wrote:

shadowmouse wrote:

I mean like the if else block but with the top line being ifTrue: and the second line being ifFalse:. I'm on British summer time at the moment. I'm not sure what my profile says, I'll go change it.

Is the ifTrue: ifFalse block going to be a Squeak block?
You can't change your time zone on these forums for some reason I don't know.

Yes it will. I'm working on making the blocks to do the command self referencePosition: self referencePosition + (t1@t2) which will be

self referencePosition: ( )
<self referencePosition>
<( )@( )> 
.
I'm having problems with all of them at the moment, I think becuse of it trying to move a ScratchFrameMorph rather than the sprite, but I'm still working on it. Do you know how to do the ifTrue: ifFalse: block?

I think I finally understand what you mean.
Is it like this?

Code:

[Smalltalk isWindows] ifTrue:
| "Self destruct code"
| "(Insert code to break Scratch here)"
| Smalltalk snapshot: true andQuit: true.
ifFalse:
| self forward 10.

EDIT: Also adding some security features later would be great too, so you don't break the mod with itself. Someone could easily make a script that breaks the mod and saves the image.

Last edited by nathanprocks (2013-04-13 10:27:47)


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&amp;display=small

Offline

 

#66 2013-04-13 10:40:53

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

nathanprocks wrote:

I think I finally understand what you mean.
Is it like this?

Code:

[Smalltalk isWindows] ifTrue:
| "Self destruct code"
| "(Insert code to break Scratch here)"
| Smalltalk snapshot: true andQuit: true.
ifFalse:
| self forward 10.

Yes.

nathanprocks wrote:

EDIT: Also adding some security features later would be great too, so you don't break the mod with itself. Someone could easily make a script that breaks the mod and saves the image.

I see what you mean. I'll keep regular backups in case any code that I do put on (e.g. that someone suggest) brakes it.A ban on certain commands such as the ability to send e-mails or the ability to download files and run them should probably also be done.

Offline

 

#67 2013-04-13 10:59:46

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Mod development recruiting now!

shadowmouse wrote:

nathanprocks wrote:

I think I finally understand what you mean.
Is it like this?

Code:

[Smalltalk isWindows] ifTrue:
| "Self destruct code"
| "(Insert code to break Scratch here)"
| Smalltalk snapshot: true andQuit: true.
ifFalse:
| self forward 10.

Yes.

nathanprocks wrote:

EDIT: Also adding some security features later would be great too, so you don't break the mod with itself. Someone could easily make a script that breaks the mod and saves the image.

I see what you mean. I'll keep regular backups in case any code that I do put on (e.g. that someone suggest) brakes it.A ban on certain commands such as the ability to send e-mails or the ability to download files and run them should probably also be done.

I will attempt to make the ifTrue: ifFalse: block "later is the day" because it is 1:02 AM here.
The ability to save the image and quit should be banned too.

Last edited by nathanprocks (2013-04-13 11:01:58)


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&amp;display=small

Offline

 

#68 2013-04-13 11:45:30

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

I've just been rooting around the browser and looking at the squeak tutorial on the wiki and I've found Morphic-Menus and Primitives-C Translator. These could be useful!

Offline

 

#69 2013-04-13 12:11:38

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Mod development recruiting now!

shadowmouse wrote:

I've just been rooting around the browser and looking at the squeak tutorial on the wiki and I've found Morphic-Menus and Primitives-C Translator. These could be useful!

I have seen those both both, but never understood what they do. I should really go to bed... It is 2:11 AM now.


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&amp;display=small

Offline

 

#70 2013-04-13 16:39:01

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

Primitives-C translator translates everything into C so that Scratch has the versatility of C but the awesomeness of squeak. I'm not sure specifically what Morchic-Menus does but I've been trying to make a language morph which has several pictures (one for each future language) that when pressed set a global variable to 1 or 0 but it's all very complicated so I'll go back to doing squeak blocks.

Offline

 

#71 2013-04-14 03:18:25

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

nathanprocks wrote:

Squeak can interact with other languages through plugins.

I've been looking at that and it seems that to build a plugin you need VMmaker, any other tools neded to make a VM at least some understanding of C, Squeak and possibly Slang (another dialect). Do you know anyone (either someone on the forums or in real life) who would have the skills to do this?

Offline

 

#72 2013-04-14 06:02:23

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Mod development recruiting now!

shadowmouse wrote:

nathanprocks wrote:

Squeak can interact with other languages through plugins.

I've been looking at that and it seems that to build a plugin you need VMmaker, any other tools neded to make a VM at least some understanding of C, Squeak and possibly Slang (another dialect). Do you know anyone (either someone on the forums or in real life) who would have the skills to do this?

No, I do not know anyone who has those skills.

I tried to make the ifTrue: ifFalse: block, but when I change the if else block spec, it turns into a normal c-shaped block.


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&amp;display=small

Offline

 

#73 2013-04-14 06:23:07

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

nathanprocks wrote:

I tried to make the ifTrue: ifFalse: block, but when I change the if else block spec, it turns into a normal c-shaped block.

Same. I asked LS97 for help with making plugins but even he/she can't do it. Trust me to come up with simple, easy to do ideas.

Offline

 

#74 2013-04-16 15:49:51

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Mod development recruiting now!

O.K. final two things, I'm on exam half-term at school so I'll have literaly no time.
1) Do we need an installer and if so how?
2)How do we make a compiler for GLOOP/edit an existing one?

Offline

 

#75 2013-04-17 01:22:33

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Mod development recruiting now!

shadowmouse wrote:

O.K. final two things, I'm on exam half-term at school so I'll have literaly no time.
1) Do we need an installer and if so how?
2)How do we make a compiler for GLOOP/edit an existing one?

For Windows computers, we could use iexpress.exe, which is hidden in Windows computers. I think NSIS would be a better idea though. It also isn't really a "compiler". It packs all the required files into an executable file that runs the program inside the package.
1. The package must contain the Squeak VM (GLOOP.exe), GLOOP.image, the GLOOP project, and any other files required by the mod. In this case, we would have to pack any compilers/interpreters for other programming languages that your mod needs. We can't pack Visual Basic. We should be able to pack a C/C++ compiler such as GCC. If can pack Python, the packed .exe file would be a big. I think that Python should be installed manually by the user, so that he/she does not fill their hard disk with GLOOP files.
2. The mod should exit when the exit presentation mode button is clicked. We should be able to do this so that we don't need two separate .image files. I think that GLOOP's presentation mode should not be in full-screen and it should fill the window.
3. The packed .exe file should run something like "GLOOP.exe GLOOP.image project-file.gloop presentation". (I can't remember if that's how to do it or not)

For Mac, I could find a way to do that, but I haven't got time to do that right now.

For the installer: We can make a GLOOP installer for Windows using NSIS. Most Mac apps that are not from the App Store are downloaded as a disk image (.dmg) that is mounted by opening the file. The disk image contains the app and a shortcut to the Applications folder (/Applications). The app is simply installed by dragging the app on to the Applications shortcut. Most disk images have a background image telling the user to drag the app into Applications. Unsigned Mac apps must be run by control-clicking (right-clicking) the .app and clicking Open, unless the user has changed their security settings or are using a version of Mac lower than 10.8 (Mountain Lion).

Last edited by nathanprocks (2013-04-17 01:23:53)


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&amp;display=small

Offline

 

Board footer