GRA0007



A Scratch 2.0 mod

———————————————————————————————————

What is Blue?


The beta has been released! Check it out here on the new website!

Blue is a mod for Scratch 2.0 that I am making with @NoMod-Programming.
The website (and beta version) can be viewed here.

Blue now has a Github repo! View it here.

Contents:
  • What will be in Blue?
  • What I have already coded in
  • Bugs
  • Changelog
  • How can you help?
———————————————————————————————————

What will be in Blue?

Here are some blocks that I will put into blue. (If they are grey in the beta, then I haven't coded them yet)
load file [ ] to list [list v] :: motion//Imports a txt file into a list
copy [ ] to clipboard :: motion//Copies text to the clipboard
(clipboard :: motion)//Returns the clipboard
move [variable v] to x: (10) y: (10) :: variables//Moves a variable watcher
set [variable v] color to [#0099ff] :: variables//Changes the color of a variable watcher
set [variable v] style to [normal v] :: variables//Changes the style of a variable watcher (normal, large, slider)
set [list v] color to [#0099ff] :: list//Changes the color of a list watcher
(internal volume :: sound)//Returns the internal volume of Scratch
(length of sound [sound v] :: sound)//Returns the length of a sound (in seconds)
(distance to x: (10) y: (10) :: sensing)//Returns the distance to a set of coordinates
point towards x: (10) y: (10) :: motion//Points towards a set of coordinates
<internet connection? :: motion>//Reports true or false (boolean)
<fullscreen mode? :: motion>//Reports true or false (boolean)
(read url [www.google.com] :: motion)//Returns the source code of a web page
(read line (1) of url [www.google.com] :: motion)//Returns a single line of a web pages' souce code
stop [all and press green flag v] :: control//Stops everything and then presses the green flag
define custom reporter
::custom cstart cap
(report[]::custom-arg cstart)::cend
define custom boolean
::custom cstart cap
(report<>::custom-arg cstart)::cend
As per here: http://tinyurl.com/pz8vxgo (they are here now! still working on the shapes though)
make [draggable v] :: motion//Makes the sprite draggable or not
<draggable? :: motion>//Reports if the sprite is draggable (boolean)
(dialog ask with title [ ] and message [ ] :: motion)//Asks the user a question, then reports the answer
(custom dialog [ ]◀ ▶ :: motion)//Coming soon!
———————————————————————————————————

What I have already coded in

(letters (1) to (3) of [world] :: operators)//Returns letters between two points in a string
open url [www.google.com] :: motion//Opens a url
for each [v v] in (10) :: control cstart//See http://scratch.mit.edu/projects/25582648/
while < > :: control cstart//Runs a script while a boolean is true
(clone count :: control)//Returns the total number of clones in a project
(counter :: control)//Basically acts as a variable controlled by the following two blocks
clear counter :: control//Clears the counter
incr counter :: control//Increases the counter by 1
hide all sprites :: looks//Hides all the sprites (only works from stage)
set cursor to [normal v] :: motion//Sets the cursor type (see the alpha for all cursors!)
save [ ] to text file :: motion//Saves text to a txt file
load text from text file :: motion//Saves the text from a txt file to the file contents variable below
(file contents :: motion)//Returns the contents of the last file loaded with the block above
([color v] effect :: looks)//Returns the effect value of the current object
([ ] ^ [ ] :: operators)//Index notation
([pi v] :: operators)//Reports the constant (pi, e or the golden ratio)
<true :: operators>//Reports true (boolean)
<false :: operators>//Reports false (boolean)
<(50) % chance of true :: operators>//A chance of reporting true or false (boolean)
[fullscreen v] mode :: motion//Sets the screen mode (fullscreen, normal, small stage)
([true] as a boolean:: operators)//Will always report true unless string is false
<visible? :: looks>//Reports if the sprite is visible (boolean)
<pen down? :: pen>//Reports if the pen is down or not (boolean)
(pen hue :: pen)//Reports the pen color (as an integer)
(pen shade :: pen)//Reports the pen shade
(pen size :: pen)//Reports the pen size
<[haystack] contains [needle] :: operators>//Reports if a string contains another string (boolean)
([uppercase v] [meow] :: operators)//Reports the altered string (uppercase, lowercase, reverse, shuffle and trim blanks of)
(times [a] is in [raincoat] :: operators)//Reports the number of instances of the first string in the second
(replace letters (2) to (4) of [crust] with [a] :: operators)//Replaces the letters between two points
(replace every [m] in [mat] with [c] :: operators)//Replaces every instance of a string with another string
(repeat [do] (2) times :: operators)//Repeats a string a given number of times
(ascii for [A] :: operators)//Returns the ascii code for a letter
(ascii [65] as string :: operators)//Returns the string for an ascii value
([ ] ≤ [ ] :: operators)//Self-explanatory
([ ] ≥ [ ] :: operators)//Self-explanatory
<[5] is [a number v] :: operators>//Reports true or false if the input is the type selected (number, string, boolean or color)
<case sensitive [meow] = [Meow] :: operators>//Reports if the strings match with case sensitivity enabled (boolean)
<if < > then [ ] else [ ] :: operators>//Acts like an if block, but as a single reporter
[activate v] turbo mode :: motion//Self-explanatory (activate, deactivate and toggle)
<turbo mode? :: motion>//Reports true or false if turbo mode is on (boolean)
set max. clone count to (300) :: motion//Sets the maximum clone count, and confirming with a dialog
(max. clone count :: motion)//Reports the maximum clone count
dialog notify with title [ ] and message [ ] :: motion//Notifies the user with a dialog box
<dialog confirm with title [ ] and message [ ] :: motion>//Confirms with the user using a dialog box, then reports true or false
———————————————————————————————————

Bugs

  • The custom cursor disappears when the mouse is clicked anywhere. There is a workaround that kind of works:
    when green flag clicked
    set cursor to [pencil v] :: motion
    forever
    if <mouse down?> then
    set cursor to [pencil v] :: motion
  • The ‘and wait’ function of the load file block doesn't work yet…
  • The rotation style reporter only works in the watcher, the actual block is broken
  • The replace letters between two points with string block replaces all instances of the string found between the two letters
  • All options on the fullscreen mode block turn on small stage mode, and the fullscreen option turns on turbo mode as well
  • The deactivate turbo mode block activates turbo mode instead of deactivating it
  • The confirm dialog boolean doesn't wait to report, so it reports ‘undefined’
  • The color blocks do not return color type variables
  • The custom reporter block must be run with a report block or Scratch hangs
———————————————————————————————————

Changelog (full changelog)

{1.2β} Sorry I probably won't keep updating this changelog, because all the updates are posted here. Nevertheless, 1.2 is here and you can see it in action on the website.
{1.1β} Yayy! Thanks heaps to @NoMod-Programming for pushing some updates! They are now going to help with the development. Also custom reporters are here! Still working on them, but you can test them in the beta now.
{1.0β} Finally! I have returned to finish my mod! A new website has been designed by me for the beta version of Blue.
{0.9α} This wasn't publicly released, and only made some minor changes.
{0.8α} See the update here. It was too big to fit in here!
{0.7α} The operator update! New operators: power (index notation), constants, true, false and a chance boolean. Also big website changes.
{0.6α} Added some file blocks, save to file, load from file, and file contents. (See bugs above) Also added the effect reporter block.
{0.5α} Added the change cursor block and save warning on the alpha page.
{0.4α} Added the Blue logo, the open url block and the clone count block.
{0.3α} Implemented some blocks that were only in beta Scratch. (Like foreach, while, counter and hideall)
{0.2α} Programmed my first block! (The ‘letters between block’)
{0.1α} I invented Blue and thought of some cool blocks to put in it.
———————————————————————————————————

How can you help?


Copy the following codes into your signature to help support Blue!

Big version:
[center][url=http://blue.gwiddle.co.uk][img]http://i67.tinypic.com/29cb6hg.jpg[/img][/url][/center]

Small version:
[url=http://blue.gwiddle.co.uk][img]http://i65.tinypic.com/jacm6c.jpg[/img][/url]

———————————————————————————————————

Feel free to post suggestions below, and don't forget to check out the beta!

DevanWolf

You should change the
for each[variable v]in[10]::control cstart//Number in string input is not necessary
block as this way: “for each %m.var in %n”
Then it should look like this when this is changed:
for each[variable v]in(10)::control cstart//Notice the number insert
That way, this change will make the variable dropdown work, rather than not working (because it's supposed to be “%m.var”, not“%m.varName”), and the number insert is a textbox for some reason, so that it must look like a number input, not a string input.

And also, please get rid of the “all at once” block. All it does is nothing but run normally.

GRA0007

DevanWolf wrote:

You should change the
for each[variable v]in[10]::control cstart//Number in string input is not necessary
block as this way: “for each %m.var in %s”
Then it should look like this when this is changed:
for each[variable v]in(10)::control cstart//Notice the number insert
That way, this change will make the variable dropdown work, rather than not working (because it's supposed to be “%m.var”, not“%m.varName”), and the number insert is a textbox for some reason, so that it must look like a number input, not a string input.

And also, please get rid of the “all at once” block. All it does is nothing but run normally.
I've fixed the foreach block

Thepuzzlegame

Looks cool, I'll be sure to test it out later!

Dmith

WOW

davidkt

None of the new blocks work

And some are impossible

GRA0007

davidkt wrote:

None of the new blocks work

And some are impossible
Which blocks? I know that some are impossible, (the touching color block) but I think that most of the other blocks could work.

DevanWolf

GRA0007 wrote:

DevanWolf wrote:

You should change the
for each[variable v]in[10]::control cstart//Number in string input is not necessary
block as this way: “for each %m.var in %n”
Then it should look like this when this is changed:
for each[variable v]in(10)::control cstart//Notice the number insert
That way, this change will make the variable dropdown work, rather than not working (because it's supposed to be “%m.var”, not“%m.varName”), and the number insert is a textbox for some reason, so that it must look like a number input, not a string input.

And also, please get rid of the “all at once” block. All it does is nothing but run normally.
I've fixed the foreach block
And you also forgot to fix the number insert. “for each %m.var in %n”

liam48D

Pretty cool, that actually works. I've gotta try out all the new blocks.. 3 new categories already?

Magnie

Would it be possible to add sockets (WebSockets, since some research on my end seems to indicate Flash doesn't support raw sockets)/networking into the project? Just simple "send “ and ”receive“ blocks and of course a ”connect to " block? I could give a better idea on what blocks to add and how it will all work on the backend if you are interested.

GRA0007

Magnie wrote:

Would it be possible to add sockets (WebSockets, since some research on my end seems to indicate Flash doesn't support raw sockets)/networking into the project? Just simple "send “ and ”receive“ blocks and of course a ”connect to " block? I could give a better idea on what blocks to add and how it will all work on the backend if you are interested.
Yes, sure! What exactly are you suggesting I add? Is this a bit like sending from one project and receiving in another?

Magnie

GRA0007 wrote:

Magnie wrote:

Would it be possible to add sockets (WebSockets, since some research on my end seems to indicate Flash doesn't support raw sockets)/networking into the project? Just simple "send “ and ”receive“ blocks and of course a ”connect to " block? I could give a better idea on what blocks to add and how it will all work on the backend if you are interested.
Yes, sure! What exactly are you suggesting I add? Is this a bit like sending from one project and receiving in another?
Yeah, something like that. Just basic networking capabilities and at the moment, I don't think you should worry about directly connecting from project to project starting out (those of us with the technical know how will figure out connecting projects together through other methods ), but maybe later that will be a possibility.

[connect “ip:port”], [disconnect], [send “data”], [hat when I receive data (x)] <– puts the data received into the variable x (or any defined one, like in the for each block), (connection status) (would return a string like “connected”, “not connected”, "error: ").

Does that make sense?

Dmith

New version!! Yap!!!

GRA0007

DevanWolf wrote:

GRA0007 wrote:

DevanWolf wrote:

You should change the
for each[variable v]in[10]::control cstart//Number in string input is not necessary
block as this way: “for each %m.var in %n”
Then it should look like this when this is changed:
for each[variable v]in(10)::control cstart//Notice the number insert
That way, this change will make the variable dropdown work, rather than not working (because it's supposed to be “%m.var”, not“%m.varName”), and the number insert is a textbox for some reason, so that it must look like a number input, not a string input.

And also, please get rid of the “all at once” block. All it does is nothing but run normally.
I've fixed the foreach block
And you also forgot to fix the number insert. “for each %m.var in %n”
Sorry! Fixed now in 0.6

DevanWolf

GRA0007 wrote:

define custom reporter (string1)//As per here: http://tinyurl.com/pz8vxgo
define custom boolean (string1)//As per here: http://tinyurl.com/pz8vxgo
You mean write these custom reporters/booleans like this:
define custom reporter//As per here: http://tinyurl.com/pz8vxgo
::custom cstart cap
{report[]::custom-arg cap}::cend
define custom boolean//As per here: http://tinyurl.com/pz8vxgo
::custom cstart cap
{report<>::custom-arg cap}::cend

TeslaTech

CHECK out Scratch tech My 2.0 mod We can work together
It has colored Vars, clonecount, color myblock inputs, evaluate, and so on

EMPedemonte20

Did you get the idea of a
<(50)% chance block>
from NoMod?

liam48D

Arr, more updates!

Tis', my mateys, is land lubbin' epic.

GRA0007

EMPedemonte20 wrote:

Did you get the idea of a
<(50)% chance block>
from NoMod?
Uh, yes! I did!

DevanWolf wrote:

GRA0007 wrote:

define custom reporter (string1)//As per here: http://tinyurl.com/pz8vxgo
define custom boolean (string1)//As per here: http://tinyurl.com/pz8vxgo
You mean write these custom reporters/booleans like this:
define custom reporter//As per here: http://tinyurl.com/pz8vxgo
::custom cstart cap
{report[]::custom-arg cap}::cend
define custom boolean//As per here: http://tinyurl.com/pz8vxgo
::custom cstart cap
{report<>::custom-arg cap}::cend
Thanks! I'm not that good at the scratchblocks plugin yet!

liam48D wrote:

Arr, more updates!

Tis', my mateys, is land lubbin' epic.
Version 0.8 is coming out in a few days! (It's going to be really big )

ArchieApple247

I'm Stunned on how many features this adds.
Can you get a download?