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

#1 2013-01-29 09:52:06

roscopeco
New Scratcher
Registered: 2012-11-18
Posts: 3

ScratchToAndroid - Convert Scratch projects to Android

Hi all!

Don't know if anyone's interested in this (I know that Scratch 2.0 is the next big thing right now) but I've been working on a little project that aims to convert Scratch 1.4 projects to Android projects.

I know Scratch on Android has been talked about here before, but this project is a little different in that it actually converts the project into Java code and packages it up as an Android ADT project, ready to be compiled and deployed.

It's only a proof of concept at the moment (the Android runtime only supports a subset Scratch's feature set) but it runs some (very simple) Scratch projects I put together for testing purposes.

It'd be great if anyone wants to take a look! The project's on GitHub at http://github.com/roscopeco/ScratchToAndroid (Sorry, I can't post links as a New Scratcher).

Cheers,
Ross

Offline

 

#2 2013-01-29 16:55:08

ZeroLuck
Scratcher
Registered: 2010-02-23
Posts: 500+

Re: ScratchToAndroid - Convert Scratch projects to Android

I tried this before you and it didn't work.
The big probleme is that the OS isn't able to handle so many threads.
(Some Scratch projects have over 100 scripts running at once.)
But it might work with very simply projects.

Last edited by ZeroLuck (2013-01-29 16:55:44)


http://3.bp.blogspot.com/-oL2Atzp0Byw/T465vIQ36dI/AAAAAAAAADo/1vqL4PvhkM0/s1600/scratchdachwiki.png

Offline

 

#3 2013-01-30 06:05:07

roscopeco
New Scratcher
Registered: 2012-11-18
Posts: 3

Re: ScratchToAndroid - Convert Scratch projects to Android

I  agree that it is a challenge, especially in an embedded environment with limited resources, and of course there will always be an upper limit on the projects that can be supported. In my experience though many projects do not have that many scripts running at once and I think, with careful design, Android can be made to support more scripts than one might expect.

How far did you get with this when you tried it before? Is your project anywhere online? And what limitations did you run up against ? I'd love to get your input on my project as someone who's been down that road before  smile

Offline

 

#4 2013-01-30 08:35:11

ZeroLuck
Scratcher
Registered: 2010-02-23
Posts: 500+

Re: ScratchToAndroid - Convert Scratch projects to Android

I had big speed problems with the "touching..." blocks and the sprite effects. (like whirl)
They were too slow compared to the other blocks.
Another problem is that the scripts (and the project) will run irregular.
Sometimes it is very slow and sometimes there are big lags. (the user "feels" how many scripts are running). More threads will also slow down the UI-thread.

My project isn't online but I am still working on the player.


http://3.bp.blogspot.com/-oL2Atzp0Byw/T465vIQ36dI/AAAAAAAAADo/1vqL4PvhkM0/s1600/scratchdachwiki.png

Offline

 

#5 2013-01-30 11:40:07

roscopeco
New Scratcher
Registered: 2012-11-18
Posts: 3

Re: ScratchToAndroid - Convert Scratch projects to Android

I do anticipate some potential performance issues with the graphical effects, but I think I may be able to mitigate them to some extent. I'm curious as to what problems you had with implemeting "touching" blocks though, as it's something I've yet to implement. Perhaps it will become clear when I do  smile 

At the moment I'm using a fairly crude global lock to synchronize threads and emulate Scratch's thread semantics. This seem (so far) to keep the block timings predictable while also being reasonably performant, but obviously the overhead it adds would be unacceptable with a large number of Scripts.

I'm going to be doing some stress testing once I have some more features implemented, to see what's a reasonable maximum number of threads. Obviously the device is a consideration here, and I'm developing on a quad core phone. I'll need to get testing done on a variety of devices before I can make a decision on that...

Offline

 

#6 2013-02-07 13:46:33

sonde9
New Scratcher
Registered: 2012-02-14
Posts: 1

Re: ScratchToAndroid - Convert Scratch projects to Android

I have it!!!!!!
You have to install Flash on your Andoid Device: http://www.chip.de/downloads/Adobe-Flash-Player-Android-App_47084648.html
Then you upload a project to schratch.mit.edu
and Play it!
Try it: http://scratch.mit.edu/projects/sonde9/2435842

Offline

 

Board footer