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

#2676 2011-02-08 15:16:41

14God
Scratcher
Registered: 2008-11-14
Posts: 100+

Re: BYOB 3 - Discussion Thread

https://sites.google.com/site/byobimages/_/rsrc/1297196161193/home/net-byob/NetBYOB.JPG
Sorry I seem to speak in picture.

Last edited by 14God (2011-02-08 15:19:23)


http://cs.berkeley.edu/~bh/sig4.png
Logic and reason have led me to atheism... but I'm stuck with the name  tongue

Offline

 

#2677 2011-02-08 15:30:12

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

14God wrote:

Sorry I seem to speak in picture.

Those look like good ideas.  Don't hold your breath, though -- we're going to have trouble getting OOP really ready by next month.


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#2678 2011-02-08 17:57:57

14God
Scratcher
Registered: 2008-11-14
Posts: 100+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

14God wrote:

Sorry I seem to speak in picture.

Those look like good ideas.  Don't hold your breath, though -- we're going to have trouble getting OOP really ready by next month.

Next month... that is pretty close.


http://cs.berkeley.edu/~bh/sig4.png
Logic and reason have led me to atheism... but I'm stuck with the name  tongue

Offline

 

#2679 2011-02-08 18:05:47

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

14God wrote:

Next month... that is pretty close.

Yeah.  The good news is that Jens is a miracle worker.  The bad news is that he has to finish before I can start on the help screens!


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#2680 2011-02-08 19:35:02

14God
Scratcher
Registered: 2008-11-14
Posts: 100+

Re: BYOB 3 - Discussion Thread

My dad has made kinda a cool agreement with me: If I can program something I can use it from time to time to help with my school work. He says its good practice since I want to be a programmer and it makes me think through a process more thoroughly. (forgive any typing/spelling errors I might have made I feel dizzy and borderline sick)


http://cs.berkeley.edu/~bh/sig4.png
Logic and reason have led me to atheism... but I'm stuck with the name  tongue

Offline

 

#2681 2011-02-08 19:45:46

xly
Scratcher
Registered: 2010-04-17
Posts: 100+

Re: BYOB 3 - Discussion Thread

@ bharvey & Jens

Some hints from the tinkery ...
1- if you <Clone> a sprite with one Initialization script you have a better control than using <Duplicate>
2 - by doing so you can precisely define which method you like to implement into the New cloned sprite
3 - The scripts defining a Class library are Set into "method variables" .
4 - When you instantiate a New sprite, the initialization script CLONE + ATTRIBUTE sets and defines methods used by New.
5 - "method" variables allow a better control than with blocks.
5 - the initialization script of a new sprite can use methods coming from several Class libraries.
etc

Offline

 

#2682 2011-02-08 22:17:46

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Today's exciting experimental version getting us closer to the ultimate design goal:

Jens wrote:

This experimental release includes the bugfix from 3.0.9 and features a complete pass through all built-in attributes except costumes and sounds (but including the costume #).

If a sprite is the instance of another one you can use the DELETE block to remove the instance's attribute, in which case two things happen:

    - the instance's reporter block for the deleted attribute becomes "ghosted" in the palette
    - the instance now dynamically (!) inherits the deleted attribute's /value/ from its prototype

You can also disable most built-in attributes through their corresponding reporter block's context menu in the palette by selecting "inherit" or "disinherit".

If the inherited attribute is a visual one, such as X POSITION, SIZE, DIRECTION or COSTUME # etc., any changes which occur in the prototype are automatically propagated to all instances, regardless whether through the GUI or via blocks or scripts.

The dynamic value look-up/propagation link gets broken once the instance again shadows the attribute, by assigning a value to it (again either through the GUI or via a script).

This allows for surprisingly complex dependencies and turtle movements, so it'll hopefully take you a while to play through all levels :-)

Enjoy!
--Jens


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#2683 2011-02-08 22:34:29

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

14God wrote:

If I can program something I can use it from time to time to help with my school work.

Now all you need is BYOB on your cell phone for the exams!  smile

Get well soon.


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#2684 2011-02-09 00:12:20

14God
Scratcher
Registered: 2008-11-14
Posts: 100+

Re: BYOB 3 - Discussion Thread

Jens wrote:

If a sprite is the instance of another one you can use the DELETE block to remove the instance's attribute, in which case two things happen:

    - the instance's reporter block for the deleted attribute becomes "ghosted" in the palette
    - the instance now dynamically (!) inherits the deleted attribute's /value/ from its prototype

Not sure what DELETE block your talking about or how to do that.


http://cs.berkeley.edu/~bh/sig4.png
Logic and reason have led me to atheism... but I'm stuck with the name  tongue

Offline

 

#2685 2011-02-09 00:40:08

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

14God wrote:

Not sure what DELETE block your talking about or how to do that.

http://cs.berkeley.edu/~bh/ghost.png
Clone a sprite and do this in the clone.

EDIT: But I'm having trouble getting the inheriting to remain active when the parent's attribute is changed.

EDIT2: New version in post below fixes that bug.

Last edited by bharvey (2011-02-09 10:48:41)


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#2686 2011-02-09 05:24:00

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: BYOB 3 - Discussion Thread

What is new in BYOB 3.0.9?

Offline

 

#2687 2011-02-09 06:49:06

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: BYOB 3 - Discussion Thread

I remade the (list->sentence) block!  big_smile
http://www.freeimagehosting.net/uploads/3e776b0cef.jpg
What do you think?

EDIT: The background of the block editor is the same color as the forum.  yikes

EDIT2: Alternate code:

Code:

list->sentence (L)
script variables (a)>
set [a] to (copy of (L))
replace item (last) of (a) with (join (item (last) of (a) [ ])
report (letters (1) through ((length of ((a) as text)) - (1) of ((a) as text))

The (letters () through () of []) can be made like this: (variables are shown with * on each side unless it is clearly obvious that it is a variable. (*var*) )

Code:

letters (1) through (2) of (text)
script variables (report)(count)<>
set [report] to []
set [count] to (*1*)
repeat until <(*count*) = ((*2*) + (1)>
  set [report] to (join (*report*)(letter (*count*) of (*text*))
  change [count] by (1)
report (*report*)

EDIT3: Just realized I uploaded a picture of the (letters () through () of [] ) block:
http://www.freeimagehosting.net/uploads/5b6cded326.gif
But it's slightly primitive, use the above script.  wink

Last edited by scimonster (2011-02-09 07:03:43)

Offline

 

#2688 2011-02-09 10:52:04

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

New experimental version fixes bug in last night's version:

Jens wrote:

Take this one instead of last night's :-)

This version fixes a bug in last night's experimental release's sprite cloning mechanism that would prevent inherited attributes from staying inherited.

I'm also including your "sine-wave drawing by inheritance" experiment as demo project in the zip file.

Enjoy!
--Jens

Last edited by bharvey (2011-02-09 14:43:39)


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#2689 2011-02-09 11:05:42

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

scimonster wrote:

I remade the (list->sentence) block!

Huh, good point, I'd forgotten that "as text" puts spaces between the words.  You can just use it instead of list->sentence.  I don't see why you have to do all that copying and stuff.

And by a remarkable coincidence, to answer your other message, 3.0.9 fixes a bug in list->sentence.  smile


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#2690 2011-02-09 11:28:47

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

scimonster wrote:

I remade the (list->sentence) block!

Huh, good point, I'd forgotten that "as text" puts spaces between the words.  You can just use it instead of list->sentence.  I don't see why you have to do all that copying and stuff.

And by a remarkable coincidence, to answer your other message, 3.0.9 fixes a bug in list->sentence.  smile

tongue
The copying is in case they are all 1 character.

Offline

 

#2691 2011-02-09 14:38:25

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

scimonster wrote:

The copying is in case they are all 1 character.

Oh, how interesting!  I had no idea AS TEXT did that!  Too clever for its own good.  smile


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#2692 2011-02-09 14:44:56

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

scimonster wrote:

The copying is in case they are all 1 character.

Oh, how interesting!  I had no idea AS TEXT did that!  Too clever for its own good.  smile

It is exactly the same as the scratch block (list), no?

Offline

 

#2693 2011-02-09 14:46:45

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

yet another sine wave project

Jens wrote:

This one creates the clone, deletes its yPos property and starts it off drawing in a single script. It even makes the clone delete itself upon hitting the wall.

I'm beginning to enjoy this!

P.S. The zip file in #2688  now contains this new version so if you see this message in the same session as that one, you already have the new project and don't have to download it from this message!

Last edited by bharvey (2011-02-09 14:48:19)


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#2694 2011-02-09 15:34:54

rubiks_cube_guy238
Scratcher
Registered: 2009-07-02
Posts: 100+

Re: BYOB 3 - Discussion Thread

Hello everyone, I thought you might all be interested in my new project, FractalDesigner. This project not only creates (almost) any fractal, but it does so with simulated recursion! This is even more impressive when you consider that I made this in a program like BYOB called Scratch which doesn't have any custom procedures.  tongue


The glass is never half full nor half empty; it is twice as large as it needs to be.

Offline

 

#2695 2011-02-09 16:24:06

Lightning1234
Scratcher
Registered: 2010-12-02
Posts: 5

Re: BYOB 3 - Discussion Thread

Is there a way to make BYOB projects into EXE's?


http://www.nodiatis.com/pub/1.jpg

Offline

 

#2696 2011-02-09 16:36:53

14God
Scratcher
Registered: 2008-11-14
Posts: 100+

Re: BYOB 3 - Discussion Thread

Lightning1234 wrote:

Is there a way to make BYOB projects into EXE's?

Not actual exe but yeah there called exe and they are not editable and go straight to presentation mode. Under share click compile this project.


http://cs.berkeley.edu/~bh/sig4.png
Logic and reason have led me to atheism... but I'm stuck with the name  tongue

Offline

 

#2697 2011-02-09 16:45:55

Lightning1234
Scratcher
Registered: 2010-12-02
Posts: 5

Re: BYOB 3 - Discussion Thread

Thanks a lot! It works!


http://www.nodiatis.com/pub/1.jpg

Offline

 

#2698 2011-02-09 17:23:00

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: BYOB 3 - Discussion Thread

lol, the everyday life of a BYOB forum thread.
Helping others,
Compressing projects,
This is what we want.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#2699 2011-02-09 18:09:26

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

scimonster wrote:

bharvey wrote:

Oh, how interesting!  I had no idea AS TEXT did that!  Too clever for its own good.  smile

It is exactly the same as the scratch block (list), no?

Yes.  But I never used that Scratch list block!  smile


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#2700 2011-02-09 18:58:07

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

rubiks_cube_guy238 wrote:

my new project, FractalDesigner.

O. M. G!  That's incredible.


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

Board footer