Is Scratch really viable on Raspberry Pi?


129 posts   Page 2 of 6   1, 2, 3, 4, 5, 6
by jackokring » Fri Aug 17, 2012 6:26 am
Maybe give the City HCID (Human Computer Interaction and Design) department a mail, they had some MIT connections some while back. http://www.city.ac.uk.

Cheers Jacko
Pi=B256R0USB CL4SD8GB Raspbian Stock. https://sites.google.com/site/rubikcompression/strictly-long
User avatar
Posts: 754
Joined: Tue Jul 31, 2012 8:27 am
Location: London, UK
by ctceismc » Fri Aug 17, 2012 12:51 pm
The roots of SCRATCH are with eToys ( http://www.squeakland.org ) which is still being actively used/developed throughout the world. It has recently been extended to Physical eToys that allows one to control a number of robots and external hardware. It would be quite interesting to see if Physical eToys runs any better on a Pi. They have a linux version available: http://tecnodacta.com.ar/gira/projects/physical-etoys/ Since I do not currently have a Pi can someone download and try it out? Since eToys uses the same underlying technology as SCRATCH I doubt it will make much difference but it is certainly worth a try.
Posts: 1
Joined: Fri Aug 17, 2012 12:43 pm
by antiloquax » Fri Aug 17, 2012 2:22 pm
I am glad to see the message from jamesh.

I totally agree with Clifford (and other posters!) Scratch is a great way to get younger children into programming.

I'm looking forward to an update!
:D
Posts: 406
Joined: Sun Nov 20, 2011 11:37 am
by simplesi » Wed Aug 22, 2012 7:37 pm
Progress :) http://scratch.mit.edu/forums/viewtopic.php?id=104467
If anyone who's posted on this thread fancies PMing me for a link to a modified Scratch.image to help test it out.

Please don't pass it on as the nice people at MIT don't like modded Scratch's on the loose so this is just for testing at the moment

Your Scratch.image file is at /usr/share/scratch. I suggest a sudo cp /usr/share/scratch/Scratch.image /usr/share/scratch/Scratch.orig.image to give you selves a backup first and then sudo cp /home/pi/ScratchM.image /usr/share/scratch/Scratch.image

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 1790
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
by dom » Wed Aug 22, 2012 10:51 pm
A quick test of the updated image looks good.
Asteroid Blaster was talking about 6.5 seconds for a shot to reach the corner of screen.
After the update it is about 2.5 seconds, so a big improvement.
The PC version takes about 1 second, so we're not running full speed, but closer.
Raspberry Pi Engineer
Raspberry Pi Engineer
Posts: 3864
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by simplesi » Wed Aug 22, 2012 10:58 pm
After the update it is about 2.5 seconds, so a big improvement.
The PC version takes about 1 second, so we're not running full speed, but closer.


Think relative CPU processor speed and then it looks like that is the correct ratio.

And go into presentation mode and I'll think you'll find its a properly playable game now :)
(About 1.5 secs for shot into corner - yes?)

Its the fact that its not maxing out the CPU when the program isn't running thats the crucial point as it made even editing scripts unworkable.

Thanks for testing :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 1790
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
by simplesi » Wed Aug 22, 2012 11:04 pm
In fact, if this does look like to be the cure for the issue, I think the RPi slower CPU speed will be an excellent "feature" in showing the youngsters that you have to think about speed issues when programming.

We can use examples that run fine on a 3Ghz PC and get them to modify code to get them to work fine on the RPi.

back to the days of getting StarTrek working on a 1K ZX81 :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 1790
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
by lightnin » Fri Aug 24, 2012 2:39 pm
simplesi wrote:Please don't pass it on as the nice people at MIT don't like modded Scratch's on the loose so this is just for testing at the moment


:) Thanks for that! To clarify, we've released Scratch under the GPL v2. So it's totally fine to modify the code, as long as you remove our trademarks. We just don't want people getting confused about what is and is not an "official" version of Scratch, with the official feature set.

And even if folks end up making a fork of Scratch for rPi, it can still use the marks as long as the features are the same. There's more about this here:

http://info.scratch.mit.edu/Source_Code

-Amos Blanton
Scratch Community coordinator

(By the way, we're in conversation with some rPi engineers to try to fix the bottle neck. We'll post about it soon when we know more.)
Posts: 10
Joined: Wed Jun 20, 2012 11:57 am
by simplesi » Fri Aug 24, 2012 3:31 pm
At last - the grown-ups have arrived :-)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 1790
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
by johnm » Sat Aug 25, 2012 1:46 am
The Scratch Team has been looking into these performance issues. There may be a bottleneck in the code that pushes pixels to the display; we're looking into that.

The Squeak computation benchmarks run at about 1/20th the speed that they run on my MacBook Pro. (But the Raspberry Pi is about 1/60 the price, so it's delivering 3 times the CPU cycles per Euro...)

One tip: Scratch games seem to run faster and more smoothly in "full screen" mode.

With the latest updates, sound is now working from Scratch. You might need use the amixer cset command to make the audio go to the correct place. (I discovered this by running the Python games shell script on the desktop.)

We'll keep digging in the performance issue.

-- John (lead Scratch developer)
Posts: 2
Joined: Sat Aug 25, 2012 1:17 am
by dom » Sat Aug 25, 2012 11:17 am
johnm wrote:We'll keep digging in the performance issue.

-- John (lead Scratch developer)


@johnm and @lightnin
That's great news. Thanks.
Raspberry Pi Engineer
Raspberry Pi Engineer
Posts: 3864
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by jbeale » Sun Aug 26, 2012 5:20 am
For what it's worth: my brother and his two kids, ages 11 and 14, dropped by today. I showed them my R-Pi, and my brother asked how to program it. I talked about C but the kids didn't know that. Then I mentioned it comes with Scratch and they were all over it, being already familiar with Scratch on Windows PCs. In about 10 minutes, no more, they had coded up a working 'pong' game. I apologized for how slow the R-Pi surely was compared with what they were used to, but they said actually no, Scratch ran faster on the Pi than on the 11-yo's computer! (not sure what its specs were, they said it was old). They had a lot of fun tweaking the game and playing it, and it did seem playable to me (if you like that sort of thing).

At any rate that is 'viable' and suited for intended purpose, from my point of view.

FatherSon-pong.jpg
FatherSon-pong.jpg (55.13 KiB) Viewed 1963 times
User avatar
Posts: 1886
Joined: Tue Nov 22, 2011 11:51 pm
by Clifford » Sun Aug 26, 2012 11:10 am
jbeale wrote:At any rate that is 'viable' and suited for intended purpose, from my point of view.


My original tests were with the un-updated distribution. With each apt-get update/apt-get upgrade the situation seems to have improved. It also seems that certain constructs or features cause 100% CPU usage. There is no doubt a large subset of Scratch features that work fine, but kids progressing that fast will probably soon encounter those that don't, ant that may be when the loose interest.
Posts: 30
Joined: Fri May 04, 2012 3:19 pm
by simplesi » Mon Sep 03, 2012 11:03 am
With each apt-get update/apt-get upgrade the situation seems to have improved

Well, I've just updated to the 2012-08-16 distribution and done a full update and I don't see any improvement yet.

The current provided Scratch image still has the variable hogging CPU effect.

Like I say, if anyone wants my modified version please feel free to PM me for it

regards
Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 1790
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
by Clifford » Mon Sep 03, 2012 5:38 pm
simplesi wrote:Well, I've just updated to the 2012-08-16 distribution and done a full update and I don't see any improvement yet.


May have been my imagination. I just did an apt-get dist-upgrade, which certainly installed a scratch replacement and it seems almost as bad as it was originally. Additionally it stopped the WiFi from working again and I really cannot be bothered to go through all that again at the moment!
Posts: 30
Joined: Fri May 04, 2012 3:19 pm
by drmcw » Fri Sep 14, 2012 12:54 pm
I've just received and run up my first rpi and am disappointed with the Scratch performance too.
@SimpleSi Is the updated version you mention the MathWhizz patch for monitors only updating on a change?
My guess is that the squeakvm needs some work. Just downloaded the source but don't hold your breath!
Posts: 13
Joined: Fri Sep 14, 2012 9:23 am
by simplesi » Fri Sep 14, 2012 9:22 pm
Yep - this is the Scratch forum thread http://scratch.mit.edu/forums/viewtopic.php?id=104467

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 1790
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
by proxima » Tue Sep 18, 2012 3:24 pm
simplesi wrote:Like I say, if anyone wants my modified version please feel free to PM me for it
Simon


Hello,

I've just joined the forum, having plugged my (sorry: my son's) Pi in during the last couple of hours.

Overall it seems great, but like the others here I'm very disappointed with the Scratch performance (for example, the 'marbleracer' game is really not usable at all, and is the sort of thing I was hoping to be helping my son learn to write). So, could I have your modified version please - and any pointer to a clue as to how to install it would be appreciated). I tried to PM you but apparently I have to use the board a bit first...

Thanks.
Posts: 30
Joined: Tue Sep 18, 2012 3:16 pm
by simplesi » Tue Sep 18, 2012 8:00 pm
Instructions are further back in this thread
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=77&t=12522&start=25#p156366

PM sent with link to image

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 1790
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
by simplesi » Wed Sep 19, 2012 9:09 pm
Check out the new turbo boost mode and see the effect it has had on Scratch
http://www.raspberrypi.org/archives/2008
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 1790
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
by sdmeijer » Thu Sep 20, 2012 12:58 pm
I've updated my Raspbian and have set the overclockingmode to turbo (1GHz).
Scratch runs much faster. There's almost no lag between clicking and dragging-and-dropping (which I noticed on the old image.
Posts: 13
Joined: Thu Jun 21, 2012 6:13 pm
by simplesi » Thu Sep 20, 2012 2:30 pm
@johnm and @lightin
I was wondering if there has been any progress on an updated Scratch image for the RaspberryPI please?

regards

Simon
PS PM sent as well in case you don't see this :)
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 1790
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
by asb » Thu Sep 20, 2012 2:34 pm
simplesi wrote:@johnm and @lightin
I was wondering if there has been any progress on an updated Scratch image for the RaspberryPI please?


We're working with the Scratch folks on this. We'll update the thread when there's more to report.
Forum Moderator
Forum Moderator
Posts: 758
Joined: Fri Sep 16, 2011 7:16 pm
by simplesi » Thu Sep 20, 2012 2:36 pm
@asb

Ta :)

We'll take any news BTW - even if its not signed, sealed and delivered :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 1790
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
by simplesi » Thu Sep 20, 2012 9:25 pm
I just had a PM from lightin that basically said that the Scratch team think its an X driver issue on the RPi and not much can be done at their end :(

I've asked if we could have some of the actual bugs fixed ( no jpg backgrounds loading - keypress locking down) and for an "official" fix for the variable display issue.

regards

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter
Posts: 1790
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK