Offline
@n: I just downloaded SublimeText. It's not unpretty...
Offline
blob8108 wrote:
@n: I just downloaded SublimeText. It's not unpretty...
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 "["
Offline
I'm thinking it may be worth using just for the minimap...
Offline
@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
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...
Offline
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.)
Offline
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?
Offline
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!.
Offline
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.
Offline
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.
Offline
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?
Offline
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.
Offline
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?
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 (It is quite fun, though)
Last edited by nXIII (2013-04-16 17:45:40)
Offline
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?
Offline
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.
Ah, well, you could write a plugin
Hardmath123 wrote:
@nXIII: That sounds great. Any ideas for a patch right now to get this project working?
Eerrm…get a very powerful CPU?
Last edited by nXIII (2013-04-16 23:10:32)
Offline
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
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? )
EDIT: Here's the bookmarklet to run as sb2.js:
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! 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)
Offline