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

#7951 2013-04-16 04:56:06

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#7952 2013-04-16 06:05:20

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

@n: I just downloaded SublimeText. It's not unpretty...  big_smile


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#7953 2013-04-16 07:39:16

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: BYOB 3 - Discussion Thread

blob8108 wrote:

@n: I just downloaded SublimeText. It's not unpretty...  big_smile

big_smile

Play around with the keyboard shortcuts (I think these should all work even in vim emulation mode)
- ⌘D (and ⌘K, ⌘D)
- ⌘I
- ⌘L
- ⇧⌃Up/Down
- ⌘-Click (and drag)
- (⇧)⌘Return (or, I suppose O/o in vim mode)
- Select text and press "(", "[", or "["


nXIII

Offline

 

#7954 2013-04-16 09:19:31

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

I'm thinking it may be worth using just for the minimap...


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#7955 2013-04-16 10:04:38

Zygorithm
New Scratcher
Registered: 2012-08-17
Posts: 34

Re: BYOB 3 - Discussion Thread

@Hardmath123. I don't understand it. That new file crashed the browser tab when I imported it into Snap.
sad
Is it because of that sensing block variable of sprite you mentioned?

Offline

 

#7956 2013-04-16 10:09:53

Zygorithm
New Scratcher
Registered: 2012-08-17
Posts: 34

Re: BYOB 3 - Discussion Thread

@Hardmath123 Wait I think I see the problem. Snap has a "property of sprite" block but it only supports basic properties and does not include variables of that sprite. So ElementControl which relies on the type variable of the basePokemon and the baseMove, would not work.

Offline

 

#7957 2013-04-16 11:17:46

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

nXIII wrote:

Play around with the keyboard shortcuts...

Could you give a brief description for those? I don't get the advantage of a few of them...


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#7958 2013-04-16 12:00:57

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

Re: BYOB 3 - Discussion Thread

blob8108 wrote:

Did you even use Emacs to write that (a la QuickCursor)?

No, it was just a joke.


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

Offline

 

#7959 2013-04-16 12:04:45

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

Re: BYOB 3 - Discussion Thread

Zygorithm wrote:

Snap has a "property of sprite" block but it only supports basic properties and does not include variables of that sprite.

No, that's not true.  Only "for this sprite only" variables are included, and you have to filll in the input slots right to left, i.e., choose the sprite first and then choose the attribute, because the attribute menu depends on which sprite you choose.

(It could be that that's Snapin8r's problem, though; it may be a confusion about how to deserialize such a block.)


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

Offline

 

#7960 2013-04-16 12:44:32

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Actually, it's not the script—I tested it by removing all costumes from the XML, and it loaded fine (after over 3 minutes). It must be the (1000+) assets that are killing Snap!. n, any ideas?  smile


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#7961 2013-04-16 12:54:45

Zygorithm
New Scratcher
Registered: 2012-08-17
Posts: 34

Re: BYOB 3 - Discussion Thread

What happens to the sprites if they have no costumes? Is there a way to import them separately? If there is a simple way to restore the costumes, I'd be willing to just use the script only xml you made.

Offline

 

#7962 2013-04-16 13:33:47

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

Re: BYOB 3 - Discussion Thread

Zygorithm wrote:

What happens to the sprites if they have no costumes? Is there a way to import them separately? If there is a simple way to restore the costumes, I'd be willing to just use the script only xml you made.

Export (from BYOB) the costumes as image files.  Then import (or just drag) them into Snap!.


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

Offline

 

#7963 2013-04-16 13:51:59

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Just a suggestion, but maybe Snap! should throw an error when dealing with reporting a circular list. I froze up Snap! while messing around with adding a list to itself.


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

#7964 2013-04-16 14:12:22

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

Re: BYOB 3 - Discussion Thread

technoboy10 wrote:

Just a suggestion, but maybe Snap! should throw an error when dealing with reporting a circular list. I froze up Snap! while messing around with adding a list to itself.

Yeah.  Eventually we'll handle circular lists correctly, but for now we should probably disallow circularity.


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

Offline

 

#7965 2013-04-16 15:01:40

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

technoboy10 wrote:

Just a suggestion, but maybe Snap! should throw an error when dealing with reporting a circular list.

I still have a little patch for that... should I submit a github pull request?  tongue


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#7966 2013-04-16 15:03:50

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

blob8108 wrote:

Did you even use Emacs to write that (a la QuickCursor)?

No, it was just a joke.

I figured. I am disappoint.  tongue


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#7967 2013-04-16 17:32:34

Zygorithm
New Scratcher
Registered: 2012-08-17
Posts: 34

Re: BYOB 3 - Discussion Thread

@Hardmath123 can you post the "no costumes" version of the xml? I'll try what bharvey said and use BYOB to manually export then import the image files.

Offline

 

#7968 2013-04-16 17:43:38

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

Actually, it's not the script—I tested it by removing all costumes from the XML, and it loaded fine (after over 3 minutes). It must be the (1000+) assets that are killing Snap!. n, any ideas?  smile

Async FTW!

When I have time, I'll rewrite the serializer/deserializer from scratch (hehe…those unintentional puns never get old) and make it 1) run asynchronously and 2) have a determinate, reasonably-accurate progress bar.

blob8108 wrote:

nXIII wrote:

Play around with the keyboard shortcuts...

Could you give a brief description for those? I don't get the advantage of a few of them...

⌘D — selects the word on which each insertion point is placed; pressing it again selects the next instance as well; ⌘K, ⌘D skips selecting an instance
- ⌘I — interactive search; I usually do something like ⌘I, ⇧–, A, P, P, L, Y, V, A, L, U, E, ⇧;, Return; that would find the first occurrence going forward of "_applyValue:", select it, and close the find panel
- ⌘L — That was supposed to be ⌃L; it scrolls the first insertion point into the center of the viewport
- ⇧⌃Up/Down — adds an insertion point on the line above each insertion point; if I have a row of similar lines, I can edit them simultaneously by pressing ⇧⌃Down a few times and then editing the first one.
- ⌘Click (and drag) — multiple selection is awesome
- (⇧)⌘Return (or, I suppose O/o in vim mode) — Appends or prepends a line without the need to go to the EOL
- Select text and press "(", "[", or "[" — Automatically wrap stuff in parentheses

EDIT: Oh right, you use vim, so you're probably pretty used to append, prepend, and interactive search. Multiple selection is still so awesome, though.

Oh, and a few more
⌃G — go to line number
(I can't believe I forgot to mention these!)
⇧⌘P — open the command palette
⌘P — go to file in project (add a folder to the sidebar first)
⌘R — go to symbol in file

blob8108 wrote:

I'm thinking it may be worth using just for the minimap...

I turned it off—I don't actually find it that useful  tongue  (It is quite fun, though)

Last edited by nXIII (2013-04-16 17:45:40)


nXIII

Offline

 

#7969 2013-04-16 21:30:06

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

Re: BYOB 3 - Discussion Thread

blob8108 wrote:

should I submit a github pull request?  tongue

Sure!  Just don't put any colon-Ps in the code or Jens will get mad...


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

Offline

 

#7970 2013-04-16 21:33:09

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

Re: BYOB 3 - Discussion Thread

@n:  Yeah, but does it have C-M-U to go up a level of parentheses?

Not to mention M-x doctor.  tongue


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

Offline

 

#7971 2013-04-16 22:54:18

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Zygorithm wrote:

@Hardmath123 can you post the "no costumes" version of the xml? I'll try what bharvey said and use BYOB to manually export then import the image files.

Well, considering there are almost a thousand images, are you really sure you want to do it? I would suggest making a "lite" version for now which removes many of the redundant costumesor different creatures, so that Snap! can handle it. Good luck!

@nXIII: That sounds great. Any ideas for a patch right now to get this project working?


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#7972 2013-04-16 23:10:20

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

@n:  Yeah, but does it have C-M-U to go up a level of parentheses?

No, but it has ⇧⌃M, which does that.

Not to mention M-x doctor.  tongue

Ah, well, you could write a plugin  tongue

Hardmath123 wrote:

@nXIII: That sounds great. Any ideas for a patch right now to get this project working?

Eerrm…get a very powerful CPU?  tongue

Last edited by nXIII (2013-04-16 23:10:32)


nXIII

Offline

 

#7973 2013-04-17 00:15:50

Zygorithm
New Scratcher
Registered: 2012-08-17
Posts: 34

Re: BYOB 3 - Discussion Thread

Well, considering there are almost a thousand images, are you really sure you want to do it? I would suggest making a "lite" version for now which removes many of the redundant costumesor different creatures, so that Snap! can handle it. Good luck!

If that's what it takes to make a cross platform mobile and desktop friendly game, I'm willing to do it. Unless the Snap team is somehow able to improve performance so that it can handle large projects. Are there any gigantic performance leaps planned?

Offline

 

#7974 2013-04-17 01:03:28

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Well, if directly importing images crashes Snap!, I'm pretty sure dragging in lots of images will, too. Also, mobile-friendly is dubious considering how desktops can barely handle it. I wonder how Scratch gets it so fast—I'm guessing (as n said) they use asynchronous loading.

That said, my suggestion to you know would be to check out sb2.js and jsscratch. Both are libraries to directly play Scratch 2.0 projects without converting them. I am sure they will be much faster, but I don't know whether they will be able to handle it. If you need help, feel free to ask.

(n, weren't you on the jsscratch team at some point?  smile  )

EDIT: Here's the bookmarklet to run as sb2.js:

Code:

javascript:(function(){document.body.appendChild(document.createElement('script')).src='http://sb2js.tk/inject.js';})();

Try it out—copy and paste that into the address bar on your project's page.

EDIT2: It works!  smile  Now you need to figure out how to embed sb2.js into your own site—I doubt it's harder than converting the project internally.

EDIT3: I forgot—here's the link: sb2.js

Last edited by Hardmath123 (2013-04-17 01:11:30)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#7975 2013-04-17 01:34:36

Zygorithm
New Scratcher
Registered: 2012-08-17
Posts: 34

Re: BYOB 3 - Discussion Thread

@Hardmath123, thank you so much! I'll have to figure out how to embed a .js bookmarklet, but this seems like the ideal solution. Heck it even has full screen mode!

Offline

 

Board footer