Discuss Scratch

bharvey
Scratcher
1000+ posts

Snap! user discussion

bdilloughery wrote:

However when they submit their shared URL and I run it, they are SUPER choppy.
Are you by any chance reviewing several student projects in different browser tabs at the same time? Because of Snap!'s always-live nature, I've found that running several copies at once slows my computer, even if most of them “aren't doing anything.”

Jens
Scratcher
100+ posts

Snap! user discussion

So strange! Maybe they are using color collision detection a lot? In this case running the projects in presentation mode can slow them down…
bdilloughery
New to Scratch
3 posts

Snap! user discussion

bharvey wrote:

bdilloughery wrote:

However when they submit their shared URL and I run it, they are SUPER choppy.
Are you by any chance reviewing several student projects in different browser tabs at the same time? Because of Snap!'s always-live nature, I've found that running several copies at once slows my computer, even if most of them “aren't doing anything.”

No, I mean I have done that. But I'm talking about running pretty basic projects by themselves in their own tab. I mean I have a normal 3-5 tabs of misc open that don't affect any other browsing experience (excel sheet of projects, school gradebook, gmail, etc). This is always on going. Just this morning with pretty simple hangman games that had moving sprites as background was SUPER choppy. This has been the case with most every project students turn in.

Is there any other common thing that I could tell them to avoid other than color detection? However, in hangman that was definitely not happening.
bharvey
Scratcher
1000+ posts

Snap! user discussion

bdilloughery wrote:

This has been the case with most every project students turn in.
This definitely sounds like something wrong with your computer setup. You say you've tried multiple computers. Are those school computers? When you try this, are you logged in as yourself? Could there be something about your user profile that's different from the students' that might cause this? What happens if you try it from home? (I'm always suspicious of school IT setups.)

djdolphin
Scratcher
1000+ posts

Snap! user discussion

Some threads with Snap! questions popped up:
https://scratch.mit.edu/discuss/topic/279150/
https://scratch.mit.edu/discuss/topic/279152/

Google to find someone else's posts: ae2d2bcb-e9e3-4f9c-a847-290d71bd8bfd 222ec087-6694-42cf-8c41-064e9066f004
aWFtbml0cm9jaXBoZXI=80d463228430e6da3d72d989f4a27aca 80d463228430e6da3d72d989f4a27aca : 228430e6da3d72d989f4a27aca bf97b44a7fbd33db070f6ade2b7dc549 Vm0wd2QyVkZOVWRpUm1SWFYwZG9WbFl3WkRSV1ZsbDNXa1JTVjFadGVG
bharvey
Scratcher
1000+ posts

Snap! user discussion

djdolphin wrote:

Some threads with Snap! questions popped up:
Thanks, answered.

xly
Scratcher
100+ posts

Snap! user discussion

@ jens &bharvey

I'm going to dig out my 6 years old (!!!) Byop Oop Examples.
Each example start using SPAWN function, which is not an user block.
As far as I remember this block was used to make a clone of a sprite.
Is it possible to get a copy ?
I'm currently using Byob 3.1 Alpha 22-Mar-2011
bharvey
Scratcher
1000+ posts

Snap! user discussion

xly wrote:

Each example start using SPAWN function, which is not an user block.
I don't remember a SPAWN block. And I can't find it in BYOB 3.1.1, including its tools library. There's a CLONE reporter in Operators; could that be what you're looking for?

Dale_Mahalko
New to Scratch
66 posts

Snap! user discussion

It needed to be done, so I've gone and done it.

I have implemented scrolling text and automatic word wrap, using pen trails and sprites. (The text is a bit blurry but apparently there is nothing I can do about that.)

For my next act, I shall build a full CLI with simulated file storage in lists, and simulated file handles. (Okay, maybe not.)

Also I seem to have made a variable and the Snap script editor extremely unhappy, because I decided to paste the entire contents of the book Alice in Wonderland into the variable, from the Gutenberg project.

Oh well, at least I can still set it to fullscreen, click Go, and read the book.

http://snap.berkeley.edu/snapsource/snap.html#present:Username=lhs-dmahalko&ProjectName=Scrolly%20v1.0.2%20-%20Alice%20in%20Wonderland%20-%20Gutenberg
bharvey
Scratcher
1000+ posts

Snap! user discussion

Dale_Mahalko wrote:

Also I seem to have made a variable and the Snap script editor extremely unhappy, because I decided to paste the entire contents of the book Alice in Wonderland into the variable, from the Gutenberg project.
Snap! is, we believe, happy for you to have large amounts of text in a variable while your project is active. (I admit I haven't tried it with an entire book.) But you can't save such a project to the cloud; you can only save it on your own computer (with “export project”).

Can you use the HTTP block (soon named the URL block) after loading your project to initialize the variable? If so, you could right-click on the variable in the palette and check the “transient” block so the variable will be set to zero before saving the project.

Dale_Mahalko
New to Scratch
66 posts

Snap! user discussion

My Alice word wrap / scroller / book reader is only about 350kb and seems to be stored in the Snap cloud without any problems, though the script viewer is having an utter heart attack dealing with about 140,000 characters in a variable string.

Snap either needs better handling for huge data in a variable such as putting it inside a scrolling window within the variable block, or it should impose some sort of maximum string limit for sanity. Anyway, it's impossible to edit an unwrapped variable string that shoots off to the right of the script window by 50 meters.

The maximum Snap cloud save size is 10 megabytes, as has been discovered by students I am working with, importing MP3 sounds and songs into their projects.

,

Here is my word-wrap scroller with a small text input block, which is not driving the script editor bonkers, so that you can actually see how the code works to scroll text using pen trails:

http://snap.berkeley.edu/snapsource/snap.html#present:Username=lhs-dmahalko&ProjectName=Scrolly%20v1.0.1%20-%20Auto%20Word%20Wrap
Dale_Mahalko
New to Scratch
66 posts

Snap! user discussion

Also, something else I discovered, which you can see in the scroller project, is that I discovered blocks don't need to have names to work properly.

For comments and multiline text input blocks, is fine by me, because I find it extremely annoying how the block name + code constantly jumps around in a block depending on how much text has been entered.

Comment block without any block name on it. Steps to reproduce:

New script
Variables -> Make a Block -> Name it Foo, Command block for All sprites (default) - Click OK
Block Editor -> add an input name, call it Bar - Click OK
Block Editor -> click on “Foo” -> Edit label fragment, click Delete
Block Editor now shows this: + (Bar) + -> Click OK
This now appears on the block palette as a block with no name and an input box.

Libraries -> Import -> Multi-line -> OK
Right-click on Multiline command block -> Edit
Block Editor -> Click on “multiline” -> Edit label fragment, click Delete, OK
This appears on the block palette as a green block with no name and an input box.

In the script, drop in the gray block with no name
In the script, drop the green block with no name in the gray block

Voila, we now have a multi-line comment block with no name on it. Just copy and paste this as needed to insert comments inline in your script…

https://imgur.com/xSvs5hY

,

And if you still want a multiline block with the name multiline on it, after editing the original block in this manner, you can go back and re-import it and it appears below the nameless block as it looks normally.
Dale_Mahalko
New to Scratch
66 posts

Snap! user discussion

I don't know if I mentioned it already (hate this single thread / million-post communication), but something else I have found is that by default Snap does not see any difference between uppercase and lowercase characters. This to me is teaching kids really bad programming practice as no normal language works like this.

Fortunately I have found a workaround, via the Unicode operators. Rather than doing direct string comparisons, instead convert characters to their unicode value, and then compare them based on that. So now Snap finally recognizes that ‘A’ does not equal ‘a’.

Also for this scroller project, I am relieved to see that CR/LF are preserved in pasted string data, even when not using the “multiline” entry block, and that yes, it is possible to detect these control codes in string data, via char to unicode value conversion.

,

Though the next challenge is figuring out how to do text input without that annoying script-freezing input box, and which will accept input from “any key” into a variable, similar to INKEY$ or X = PEEK(-16368) on the old Apple II…. and properly handles uppercase, lowercase, control characters, and symbols.
bharvey
Scratcher
1000+ posts

Snap! user discussion

Case sensitivity: I strongly disagree. What's “bad programming practice” is having two different things named “foo” and “Foo” in a program. I don't care if C-derived programming languages have case-sensitive symbols. Our raison d'être isn't training future C programmers, or future programmers at all. It's lowering the barriers to entry for kids who want to explore programming.

What's more, in a visual language, it's unusual to compare symbols, since variables and procedures are embodied in blocks, not text strings. People use text comparison for, you know, text, such as people's names, or answers to quiz questions, or “type Yes or No.” Almost all of those are easier with case-insensitive comparison.

Better handling for long strings: Ah, I've finally gotten around to running your project and now I understand where the problem arises. I thought you were joining another complaint, about SAYing long strings, but you're concerned with input text boxes. Yes, that's a bug and we'll fix it at some point, although non-showstopper bug fixes are currently on hold until 4.1 is out. (Meanwhile, in the dev version, click on the keyboard button and your code will reappear.)

Blocks without names: Yes, this is a technique well known among the cognoscenti.

cupOfJava2014
New to Scratch
1 post

Snap! user discussion

Is it possible that hardware-acceleration could be added in the future? My larger projects have very high CPU usage and can become a slideshow at times.
bharvey
Scratcher
1000+ posts

Snap! user discussion

cupOfJava2014 wrote:

Is it possible that hardware-acceleration could be added in the future?
I'm pretty sure that this is up to your browser, not under our control. Am I wrong about that?

comp09
Scratcher
1000+ posts

Snap! user discussion

bharvey wrote:

cupOfJava2014 wrote:

Is it possible that hardware-acceleration could be added in the future?
I'm pretty sure that this is up to your browser, not under our control. Am I wrong about that?
WebGL?

Thanks, Obama. You've been a great president.

Visit the website of Andrew Sun!



Play with a preview of the new Scratch Blocks: Horizontal | Vertical | Scratch VM | Scratch Render | Scratch GUI
bharvey
Scratcher
1000+ posts

Snap! user discussion

comp09 wrote:

WebGL?
Oh. That looks too complicated for my simple mind. Maybe some 12-year-old could write a library using JSFunction blocks? It sounds like it would be a change to Morphic rather than to Snap!.

But we use a 2D canvas, not 3D. Would it really make enough speed difference to be worth the hassle?

Powered by DjangoBB

Standard | Mobile