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

#51 2013-02-17 16:07:10

FanMarioPL
Scratcher
Registered: 2011-04-14
Posts: 52

Re: Branch Development Thread

We need something unique to our mod.

Offline

 

#52 2013-02-17 17:29:33

Interest
Scratcher
Registered: 2011-12-25
Posts: 43

Re: Branch Development Thread

here's a little code for easier dropdowns:
CommandBlockMorph»uncoloredArgMorphFor:

Code:

…
uncoloredArgMorphFor: t1
    | t2 t3 t4 |
    t3 _ t1 size.
    (spec includesSubString: '||') ifTrue: [
        t4 _ spec findTokens: '||'.
        ^ ChoiceOrExpressionArgMorph new choices: t4;
            choice: (self specsWArgs at: t4 asArray
                    ifAbsent: [t4 at: 1])].
    (spec includesSubString: '&&') ifTrue: [
        t4 _ spec findTokens: '&&'.
        ^ ChoiceArgMorph new choices: t4;
            choice: (self specsWArgs at: t4 asArray
                    ifAbsent: [t4 at: 1])].
    (spec includesSubString: '$') ifTrue: [
        t4 _ spec findTokens: '$'.
        ^ ExpressionArgMorphWithMenu new choices: t4;
            stringExpression: (self specsWArgs at: t4 asArray
                              ifAbsent: [t4 at: 1])].
    (spec includesSubString: '@') ifTrue: [
        t4 _ spec findTokens: '@'.
        ^ ExpressionArgMorphWithMenu new choices: t4;
            numExpression: (self specsWArgs at: t4 asArray
                            ifAbsent: [t4 at: 1])].
…

CommandBlockMorph»specsWArgs

whatever default args other than the first item of the choices you want

CommandBlockMorph class»parseCommandSpec:

Code:

parseCommandSpec: t1 
    | t2 t3 t4 t5 t6 t7 |
    t2 _ OrderedCollection new.
    t6 _ t1.
    (t6 isKindOf: UTF8)
        ifTrue: [t6 _ String withAll: t6].
    t3 _ t1 size.
    t4 _ 1.
    [t4 < t3 and: [(t6 at: t4) isSeparator]]
        whileTrue: [t4 _ t4 + 1].
    [t4 <= t3]
        whileTrue: 
            [t5 _ t6 indexOf: $% startingAt: t4.
            t5 > 0
                ifTrue: 
                    [t5 > t4 ifTrue: [t2 addLast: (t6 copyFrom: t4 to: t5 - 1)].
                    t5 < t3
                        ifTrue: 
                            [t7 _ t5 + 1.
                            (t6 at: t7) isLetter
                                ifTrue: 
                                    [[t7 + 1 <= t3 and: [(t6 at: t7 + 1) isDigit | (t6 at: t7 + 1) isLetter | (#($& $| $@ $$ ) includes: (t6 at: t7 + 1))]]
                                        whileTrue: [t7 _ t7 + 1].
                                    t7 >= t3
                                        ifTrue: 
                                            [t2 addLast: (t6 copyFrom: t5 to: t3).
                                            t4 _ t3 + 1]
                                        ifFalse: 
                                            [t2 addLast: (t6 copyFrom: t5 to: t7).
                                            t4 _ t7 + 1]]
                                ifFalse: 
                                    [t2 addLast: '%'.
                                    t4 _ t5 + 1]]
                        ifFalse: 
                            [t2 addLast: '%'.
                            t4 _ t5 + 2]]
                ifFalse: 
                    [t2 addLast: (t6 copyFrom: t4 to: t3).
                    t4 _ t3 + 1]].
    t2 _ t2 select: [:t8 | t8 ~= ' '].
    ^ t2 asArray collect: [:t8 | t8 withBlanksTrimmed]

sorry if that was a little long, but I can't just post without context

Most credit goes to Dream

Last edited by Interest (2013-02-18 13:46:44)

Offline

 

#53 2013-02-17 21:31:47

SFollis
Scratcher
Registered: 2012-03-04
Posts: 76

Re: Branch Development Thread

I like the test version... but i think you should make the 'arrow keys move with speed ()' and 'wasd move with speed ()' my dropdown version, it would not take up as much space and fancy! ( tongue ) move the operators that have something to do with lists (the 'split [] using [] into [list v]' and 'join [list v] using [,]') into the list section. Also you might want to organize the blocks so they are by blocks they are like. Plus you forgot to and me into the team now that i 'officially' joined.


http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=image&amp;num=1 is a picture of my project http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=text&amp;num=1 which has http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=views&amp;num=1 views

Offline

 

#54 2013-02-18 07:48:32

FanMarioPL
Scratcher
Registered: 2011-04-14
Posts: 52

Re: Branch Development Thread

I know, dropdown movement will be in 1.1.

Offline

 

#55 2013-02-18 08:00:50

FanMarioPL
Scratcher
Registered: 2011-04-14
Posts: 52

Re: Branch Development Thread

Hey! Does someone know how to remove that:
http://i47.tinypic.com/314y102.png

Offline

 

#56 2013-02-18 11:23:30

powerpoint56
Scratcher
Registered: 2012-04-19
Posts: 500+

Re: Branch Development Thread

FanMarioPL wrote:

We need something unique to our mod.

I have an idea!

We can have a tab next to Scripts/Costumes/Sounds that's called "Movies". You would be able to record a movie through a webcam or import it from your computer. Then it would be added to a list of movies, like the way Sounds are listed in that tab.

Then, there would be a Movie tab, and these blocks would be used to run the movies:

play movie [movie v]
pause movie [movie v]
resume movie [movie v]
close movie [movie v]
import movie
add recorded movie
(last added movie)
(length of movie [movie v]) // [movie v] is dropdown
show webcam image // would be like "add recorded movie", but wouldn't save it
hide webcam image
Hmm, what color would the blocks be?... a bronze color?

Last edited by powerpoint56 (2013-02-18 11:25:13)


http://i48.tinypic.com/2072ctw.gif

Offline

 

#57 2013-02-18 11:34:18

FanMarioPL
Scratcher
Registered: 2011-04-14
Posts: 52

Re: Branch Development Thread

Okay, but it`s very hard to code.

Offline

 

#58 2013-02-18 11:36:20

powerpoint56
Scratcher
Registered: 2012-04-19
Posts: 500+

Re: Branch Development Thread

FanMarioPL wrote:

Okay, but it`s very hard to code.

Yeah, I thought so.  tongue

But it may be worth trying anyway... We could get even more people to help, and they could submit code pieces. Then you can piece them all together, or something like that.

Last edited by powerpoint56 (2013-02-18 11:44:33)


http://i48.tinypic.com/2072ctw.gif

Offline

 

#59 2013-02-18 11:46:21

FanMarioPL
Scratcher
Registered: 2011-04-14
Posts: 52

Re: Branch Development Thread

However, there will be file support in 1.1. To release new version, i need only 3 things that i can`t do:
- remove the http://i47.tinypic.com/314y102.png
- compiler is almost done, but the compiled game runs branch, and i want to make it open game  tongue
- multi-line field(for file category)
Can someone help me?

btw. here`s a 1.1 screenie:
http://i45.tinypic.com/15mi4nn.png

Last edited by FanMarioPL (2013-02-18 11:54:28)

Offline

 

#60 2013-02-18 11:58:12

SFollis
Scratcher
Registered: 2012-03-04
Posts: 76

Re: Branch Development Thread

FanMarioPL wrote:

However, there will be file support in 1.1. To release new version, i need only 3 things that i can`t do:
- remove the http://i47.tinypic.com/314y102.png
- compiler is almost done, but the compiled game runs branch, and i want to make it open game  tongue
- multi-line field(for file category)
Can someone help me?

for #1, goto Scratch-Blocks >> CommandBlockMorph >> private >> canBecomeWatcher. Add #yourSelector:GoesHere: before ") includes: selector)". Accept. (from your local block library)


http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=image&amp;num=1 is a picture of my project http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=text&amp;num=1 which has http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=views&amp;num=1 views

Offline

 

#61 2013-02-18 11:59:27

powerpoint56
Scratcher
Registered: 2012-04-19
Posts: 500+

Re: Branch Development Thread

FanMarioPL wrote:

However, there will be file support in 1.1. To release new version, i need only 3 things that i can`t do:
- remove the http://i47.tinypic.com/314y102.png
- compiler is almost done, but the compiled game runs branch, and i want to make it open game  tongue
- multi-line field(for file category)
Can someone help me?

btw. here`s a 1.1 screenie:
http://i45.tinypic.com/15mi4nn.png

Below pic: Cool!  big_smile

About the compiler: Do you have the code to open the project with Branch.exe running Branch.image, or just to open Branch.exe running Branch.image? If the first is true, I don't know how to help.  hmm

Last edited by powerpoint56 (2013-02-18 12:03:33)


http://i48.tinypic.com/2072ctw.gif

Offline

 

#62 2013-02-18 12:17:28

FanMarioPL
Scratcher
Registered: 2011-04-14
Posts: 52

Re: Branch Development Thread

SFollis wrote:

FanMarioPL wrote:

However, there will be file support in 1.1. To release new version, i need only 3 things that i can`t do:
- remove the http://i47.tinypic.com/314y102.png
- compiler is almost done, but the compiled game runs branch, and i want to make it open game  tongue
- multi-line field(for file category)
Can someone help me?

for #1, goto Scratch-Blocks >> CommandBlockMorph >> private >> canBecomeWatcher. Add #yourSelector:GoesHere: before ") includes: selector)". Accept. (from your local block library)

Thanks dude!

@powerpoint56: the first one ;/

Offline

 

#63 2013-02-18 12:19:05

powerpoint56
Scratcher
Registered: 2012-04-19
Posts: 500+

Re: Branch Development Thread

FanMarioPL wrote:

SFollis wrote:

FanMarioPL wrote:

However, there will be file support in 1.1. To release new version, i need only 3 things that i can`t do:
- remove the http://i47.tinypic.com/314y102.png
- compiler is almost done, but the compiled game runs branch, and i want to make it open game  tongue
- multi-line field(for file category)
Can someone help me?

for #1, goto Scratch-Blocks >> CommandBlockMorph >> private >> canBecomeWatcher. Add #yourSelector:GoesHere: before ") includes: selector)". Accept. (from your local block library)

Thanks dude!

@powerpoint56: the first one ;/

rats.  sad  Maybe you could search around and ask someone who has made a compiler, like the creators of BYOB or Bingo...?


http://i48.tinypic.com/2072ctw.gif

Offline

 

#64 2013-02-18 12:23:14

FanMarioPL
Scratcher
Registered: 2011-04-14
Posts: 52

Re: Branch Development Thread

I am using the Insanity compiler  smile
btw. one more new feature - fake 3d!
http://i50.tinypic.com/23vkm75.png

Offline

 

#65 2013-02-18 12:27:08

powerpoint56
Scratcher
Registered: 2012-04-19
Posts: 500+

Re: Branch Development Thread

FanMarioPL wrote:

I am using the Insanity compiler  smile
btw. one more new feature - fake 3d!
http://i50.tinypic.com/23vkm75.png

cool!


http://i48.tinypic.com/2072ctw.gif

Offline

 

#66 2013-02-18 12:51:47

FanMarioPL
Scratcher
Registered: 2011-04-14
Posts: 52

Re: Branch Development Thread

Branch 1.1 will be released tomorrow, i hope someone will help me with compiler...

Offline

 

#67 2013-02-18 13:20:51

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

Re: Branch Development Thread

Sorry I haven't posted but I've ben on holiday. Anyway, I've had an idea like byob's script variables: script lists. These could be useful if someone wanted to store something with more than one value (such as a vector, which has direction and magnitude) and edit it easily. If this and script variables could be implemented I think that people would find it useful.

Offline

 

#68 2013-02-18 13:31:36

powerpoint56
Scratcher
Registered: 2012-04-19
Posts: 500+

Re: Branch Development Thread

FanMarioPL wrote:

Branch 1.1 will be released tomorrow, i hope someone will help me with compiler...

Do all of your files contain the files belonging to Branch? If not it wouldn't work. But also, I think that the Insanity2EXE code would only work with the specific Insanity files, not the Branch ones.  hmm


http://i48.tinypic.com/2072ctw.gif

Offline

 

#69 2013-02-18 13:32:37

FanMarioPL
Scratcher
Registered: 2011-04-14
Posts: 52

Re: Branch Development Thread

powerpoint: it contains all branch files and game files, but when i launch the compiled game, Branch opens and i want make game open .

Offline

 

#70 2013-02-18 13:34:06

SFollis
Scratcher
Registered: 2012-03-04
Posts: 76

Re: Branch Development Thread

powerpoint56 wrote:

FanMarioPL wrote:

Branch 1.1 will be released tomorrow, i hope someone will help me with compiler...

Do all of your files contain the files belonging to Branch? If not it wouldn't work. But also, I think that the Insanity2EXE code would only work with the specific Insanity files, not the Branch ones.  hmm

It would be much easier if you just used .sb files instead of .branch Then you could use Scratch2exe instead.


http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=image&amp;num=1 is a picture of my project http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=text&amp;num=1 which has http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=views&amp;num=1 views

Offline

 

#71 2013-02-18 13:35:46

SFollis
Scratcher
Registered: 2012-03-04
Posts: 76

Re: Branch Development Thread

Glitch: remove the clone and delete me blocks in stage, you can delete the stage!


http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=image&amp;num=1 is a picture of my project http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=text&amp;num=1 which has http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=views&amp;num=1 views

Offline

 

#72 2013-02-18 13:40:44

powerpoint56
Scratcher
Registered: 2012-04-19
Posts: 500+

Re: Branch Development Thread

FanMarioPL wrote:

powerpoint: it contains all branch files and game files, but when i launch the compiled game, Branch opens and i want make game open.

Maybe the Insanity2EXE program doesn't recognize the .branch file format, so it just opens Branch and nothing else. I mean, Ins2EXE is pointed originally to .ins files, not .branch.


http://i48.tinypic.com/2072ctw.gif

Offline

 

#73 2013-02-18 13:42:58

powerpoint56
Scratcher
Registered: 2012-04-19
Posts: 500+

Re: Branch Development Thread

Another strange thing. If I make and save a project in Branch, the file shows as "Project Name".sb.branch, not "Project Name".branch. Could that also be part of the problem?

Last edited by powerpoint56 (2013-02-18 13:43:21)


http://i48.tinypic.com/2072ctw.gif

Offline

 

#74 2013-02-18 13:43:05

SFollis
Scratcher
Registered: 2012-03-04
Posts: 76

Re: Branch Development Thread

FanMarioPL wrote:

I am using the Insanity compiler  smile
btw. one more new feature - fake 3d!
http://i50.tinypic.com/23vkm75.png

Is that what you programmed or want it to do?


http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=image&amp;num=1 is a picture of my project http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=text&amp;num=1 which has http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=views&amp;num=1 views

Offline

 

#75 2013-02-18 13:44:11

powerpoint56
Scratcher
Registered: 2012-04-19
Posts: 500+

Re: Branch Development Thread

SFollis wrote:

FanMarioPL wrote:

I am using the Insanity compiler  smile
btw. one more new feature - fake 3d!
http://i50.tinypic.com/23vkm75.png

Is that what you programmed or want it to do?

think so. Should be...

Last edited by powerpoint56 (2013-02-18 13:44:24)


http://i48.tinypic.com/2072ctw.gif

Offline

 

Board footer