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

#501 2010-02-11 23:21:26

Jwosty
Scratcher
Registered: 2009-12-19
Posts: 500+

Re: ITopic: Build Your Own Blocks (BYOB)

Here's a weird bug; somehow, when I replaced an if with an if else in a boolean block, it reported "nil" instead of true or false. Any idea why?  hmm

Last edited by Jwosty (2010-02-11 23:22:26)


http://i39.tinypic.com/18ert5.png Google it.  smile

Offline

 

#502 2010-02-12 03:01:40

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Hi Jwosty,

I'm suspecting that you let your boolean block report some kind of answer (that's the field labelled "report" at the bottom of the Block Editor). Often what you do is create a block variable named "answer" or "result", and then set that variable's value in the block definition's script. Since block variables are always initialized to zero you have to make sure that you assign a boolean value to them in the definition script before letting the definition report them. I'd therefore recommend checking all conditionals for whether your return variable (provided that you use one) gets assigned a boolean value.

Oh, I might not be making myself overly clear here, sorry. Could you perhaps post either a screenshot or a textual description of your boolean block definition? I'd like to have a look at this. Thanks!


Jens Mönig

Offline

 

#503 2010-02-14 22:39:10

sapientsnail
Scratcher
Registered: 2009-04-09
Posts: 4

Re: ITopic: Build Your Own Blocks (BYOB)

I'm working on a strategy game about Alexander II of Macedon and I need to be able to copy and delete in the game itself. I had thought that someone had posted a forum about using your BYOB to make a block that could do this but after going through the entire Advanced Forums I was unable to find it.
   I realise that it's pobably laughably easy to do this and I probably sound like the biggest idiot asking this but if you (or anyone else on this forum) could help me out with doing this I would be hugely helpful.

Offline

 

#504 2010-02-14 22:47:39

Brass45
Scratcher
Registered: 2009-05-03
Posts: 500+

Re: ITopic: Build Your Own Blocks (BYOB)

sapientsnail wrote:

I'm working on a strategy game about Alexander II of Macedon and I need to be able to copy and delete in the game itself. I had thought that someone had posted a forum about using your BYOB to make a block that could do this but after going through the entire Advanced Forums I was unable to find it.
   I realise that it's pobably laughably easy to do this and I probably sound like the biggest idiot asking this but if you (or anyone else on this forum) could help me out with doing this I would be hugely helpful.

You could also use lists,if you mean using items.A list is often called an array in other languages,and it's just what it sounds like;a "list" you can add and subtract things from,even during a game.Combined with an ask block,you can create a basic inventory.


http://img412.imageshack.us/img412/4593/ubd1591.png<--Our website(click)
http://static.zooomr.com/images/8884671_b196719ffa_o.png<--If this image looks interesting,then click it to see an exclusive sneak peak of Evil Strings newest game:DarkLight

Offline

 

#505 2010-02-15 06:31:51

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Hi sapientsnail,

it's cool that you're checking out BYOB! However, if you're looking for a way to copy or delete sprites in a Scratch script (some call that "cloning") that's not yet part of BYOB. Instead I'd like to encourage you to try working with lists (thanks for pointing this out, Brass45!) in regular Scratch. It's a bit cumbersome, because Scratch lists cannot contain sprites, only their names, but I'm sure you'll find a way  smile

Please don't hesitate to ask again, if you get stuck with your history project!


Jens Mönig

Offline

 

#506 2010-02-16 12:01:20

TheGameMaster1231
Scratcher
Registered: 2009-07-24
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Hey Jens, Is There ANY Way To Get Blocks You Made From BYOB Onto The Scratch Website? I Want To Share The Blocks I Have Made In BYOB, Like The Previous Costume Block. Please Help!

Offline

 

#507 2010-02-16 12:08:01

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

TheGameMaster1231 wrote:

Hey Jens, Is There ANY Way To Get Blocks You Made From BYOB Onto The Scratch Website? I Want To Share The Blocks I Have Made In BYOB, Like The Previous Costume Block. Please Help!

I would just put the block you made in a sprite (Maybe use a screen capture as the costume) and export the sprite, then upload it to somewher elike www.mediafire.com and upload a project with a link or maybe have a thread on the forums containing all the links.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#508 2010-02-16 13:48:17

TheGameMaster1231
Scratcher
Registered: 2009-07-24
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

markyparky56 wrote:

TheGameMaster1231 wrote:

Hey Jens, Is There ANY Way To Get Blocks You Made From BYOB Onto The Scratch Website? I Want To Share The Blocks I Have Made In BYOB, Like The Previous Costume Block. Please Help!

I would just put the block you made in a sprite (Maybe use a screen capture as the costume) and export the sprite, then upload it to somewher elike www.mediafire.com and upload a project with a link or maybe have a thread on the forums containing all the links.

I Don't Want To Do That, Because I Actually Want People To Actually Be Able To Use It In Their Projects. But Thanks Anyway. I'm Gonna Have To Wait And See What Jens Has To Say About It.  sad

Offline

 

#509 2010-02-16 19:49:48

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Hi TheGameMaster1231,

I already answered this question directly, but since this seems to be an issue for many people I'll answer it once more here: BYOB is an experimental prototype. We're currently expanding it with first class procedures and first class lists and some other big ideas taken from LISP/Scheme, so it can be used in a university course. BYOB is, however, not supported by the online Scratch Java player of the website. Therefore you cannot post BYOB projects to the Scratch website. It's a big drawback, I know. You can, however, compile your BYOB projects into standalone Windows .exe's and share them elsewhere.


Jens Mönig

Offline

 

#510 2010-02-17 08:39:30

TheGameMaster1231
Scratcher
Registered: 2009-07-24
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Jens wrote:

Hi TheGameMaster1231,

I already answered this question directly, but since this seems to be an issue for many people I'll answer it once more here: BYOB is an experimental prototype. We're currently expanding it with first class procedures and first class lists and some other big ideas taken from LISP/Scheme, so it can be used in a university course. BYOB is, however, not supported by the online Scratch Java player of the website. Therefore you cannot post BYOB projects to the Scratch website. It's a big drawback, I know. You can, however, compile your BYOB projects into standalone Windows .exe's and share them elsewhere.

I Said ANY Way. That Includes Hacking It Into A Scratch Project Or Something. Does THAT Work?

Offline

 

#511 2010-02-19 20:25:15

blackbird1676
Scratcher
Registered: 2009-06-21
Posts: 20

Re: ITopic: Build Your Own Blocks (BYOB)

could you let it instead of upload convert to java (as scratch does) so we can tweak java script?


We must secure the existence of our people and a future for white children!! I am not skinhead nor any other Organization.

Offline

 

#512 2010-02-20 05:00:49

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

TheGameMaster1231 wrote:

markyparky56 wrote:

TheGameMaster1231 wrote:

Hey Jens, Is There ANY Way To Get Blocks You Made From BYOB Onto The Scratch Website? I Want To Share The Blocks I Have Made In BYOB, Like The Previous Costume Block. Please Help!

I would just put the block you made in a sprite (Maybe use a screen capture as the costume) and export the sprite, then upload it to somewher elike www.mediafire.com and upload a project with a link or maybe have a thread on the forums containing all the links.

I Don't Want To Do That, Because I Actually Want People To Actually Be Able To Use It In Their Projects. But Thanks Anyway. I'm Gonna Have To Wait And See What Jens Has To Say About It.  sad

But that way people could actualy use it in their projects by importing it into their projects and using the block from their.

Jens, does the chirp compiler work with BYOB blocks?


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#513 2010-02-20 10:05:42

Greenboi
Scratcher
Registered: 2010-01-30
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

markyparky56 wrote:

TheGameMaster1231 wrote:

markyparky56 wrote:

I would just put the block you made in a sprite (Maybe use a screen capture as the costume) and export the sprite, then upload it to somewher elike www.mediafire.com and upload a project with a link or maybe have a thread on the forums containing all the links.

I Don't Want To Do That, Because I Actually Want People To Actually Be Able To Use It In Their Projects. But Thanks Anyway. I'm Gonna Have To Wait And See What Jens Has To Say About It.  sad

But that way people could actualy use it in their projects by importing it into their projects and using the block from their.

Jens, does the chirp compiler work with BYOB blocks?

i don't think so.... *bump*

Offline

 

#514 2010-02-22 03:38:11

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Hi all,

Yes, the Chirp Compiler (Scratch2Exe) *does* work with BYOB blocks! You can share your BYOB projects as exe's by compiling them with Scratch2Exe. You can also use BYOB's internal compiler (under the SHARE menu), which really is the same.


Jens Mönig

Offline

 

#515 2010-02-22 04:48:02

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

Jens i was making an experimental converter for BYOB actually it converts BYOBs file into C++ just wanted to ask that will you like to help with the squeak and Image processing part it till now works like this
Theory:
it sees the code say its reading the say block so it will do like it will use the out text function from GRAPHICS.h

it makes each sprite a class and its functions and variables (private ) as class function and variables the global are the globals and it could be called an interpreter will you help  smile


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#516 2010-02-22 10:55:12

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

fanofcena wrote:

Theory:
it sees the code say its reading the say block so it will do like it will use the out text function from GRAPHICS.h

That bit makes no sense to me, it might just be my lack of programming knoledge, but it seems to be lacking in grammer.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#517 2010-02-23 06:11:14

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

markyparky56 wrote:

fanofcena wrote:

Theory:
it sees the code say its reading the say block so it will do like it will use the out text function from GRAPHICS.h

That bit makes no sense to me, it might just be my lack of programming knoledge, but it seems to be lacking in grammer.

Ah not grammer problem

it uses outtext() function from  graphics.h


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#518 2010-02-23 11:55:34

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

fanofcena wrote:

markyparky56 wrote:

fanofcena wrote:

Theory:
it sees the code say its reading the say block so it will do like it will use the out text function from GRAPHICS.h

That bit makes no sense to me, it might just be my lack of programming knoledge, but it seems to be lacking in grammer.

Ah not grammer problem

it uses outtext() function from  graphics.h

You dont need the Like in there is what i think is confusing me.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#519 2010-02-23 17:13:42

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: ITopic: Build Your Own Blocks (BYOB)

fanofcena wrote:

Jens i was making an experimental converter for BYOB actually it converts BYOBs file into C++

Fanofcena, I'm very interested in what you are developping. Would like to share your code?

Offline

 

#520 2010-02-24 09:13:06

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Offline

 

#521 2010-02-24 09:48:16

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

s_federici wrote:

fanofcena wrote:

Jens i was making an experimental converter for BYOB actually it converts BYOBs file into C++

Fanofcena, I'm very interested in what you are developping. Would like to share your code?

Yes for sure i would like to share but its like a new version of scratch on C++ till now  smile


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#522 2010-02-25 06:20:51

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: ITopic: Build Your Own Blocks (BYOB)

fanofcena wrote:

Yes for sure i would like to share but its like a new version of scratch on C++ till now  smile

Very good. Do you have a link from where I can download it? If not, just go to http://www.sitibs.com/branches/moodle/mod/assignment/view.php?id=3281, login as user studente221 (password studente221) and upload it. Thanks!

Offline

 

#523 2010-02-25 06:28:10

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

s_federici wrote:

fanofcena wrote:

Yes for sure i would like to share but its like a new version of scratch on C++ till now  smile

Very good. Do you have a link from where I can download it? If not, just go to http://www.sitibs.com/branches/moodle/mod/assignment/view.php?id=3281, login as user studente221 (password studente221) and upload it. Thanks!

Well if u know C++ and has a c++ compiler then i can upload it else its of no use as i havent compiled it due to lack of squeak file support in the applet > (SOME ONE PLZ HELP WITH .sb part i will do the rest)


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#524 2010-02-25 07:04:50

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: ITopic: Build Your Own Blocks (BYOB)

fanofcena wrote:

if u know C++ and has a c++ compiler then i can upload it else its of no use

Yes, I'm much more proficient in C++ than Smalltalk.

Offline

 

#525 2010-02-25 22:53:45

somelia
Scratcher
Registered: 2009-09-13
Posts: 1000+

Re: ITopic: Build Your Own Blocks (BYOB)

fanofcena wrote:

somelia wrote:

Paddle2See wrote:

Jens, this is simply amazing!  Astounding!  Incredible!  The first routine I made was "Previous Costume" - it felt so good to be able to hide that ugly equation neatly away in a routine where it belongs!  From my first baby steps, I will now stride forth confidently.  Thank you!

How on earth did you do a "previous costume" block?!?!

Its simple make a block in byob and enter the command.
switch to costume (costume - 1)

Oh!

Offline

 

Board footer