[Edu-sig] re-doing GvR in xturtle

Scott Chapman scott_list at mischko.com
Sat Aug 12 23:00:39 CEST 2006


Andre Roberge wrote:
> On 8/11/06, Scott Chapman <scott_list at mischko.com> wrote:
>> Andre Roberge wrote:
>> > I started developping Crunchy for that very purpose: to have a
>> > web-based version of RUR-PLE.  I still plan to do that, eventually...
>> > For the foreseeable future, Crunchy will continue to be developped to
>> > run locally, however with the ability of "fetching" tutorials located
>> > elsewhere on the web.  The work lately has focused on doing this part
>> > in a secure way. The next release (soon!) should be secure that way.
>>
>> Andre,
>> I'm thinking of what all is needed to get Crunchy to do RUR-PLE.  One 
>> thing is
>> the ability to click on the canvas (to build the walls in the 
>> "worlds").  Is
>> there any capability to do this yet?
>>
> 
> There isn't. This would involve some javascript coding of the kind
> I've never done (finding where on a page a click has occurred, etc.).
> It might be straightforward to do.  However, another approach I have
> been thinking about is to have the world-builder being a Tkinter or
> wxPython based app that is launched from Crunchy; this would mean only
> Python programming (no javascript) and totally doable *today* within
> Crunchy. (not in the last public released version, but in the svn.)

Andre,

I'd suggest making world building work in the browser without an external 
application.  This should be easily done with information from these examples:

I found a simple example of painting on a canvas at:
http://blog.monstuff.com/archives/images/JS-graffiti.html

and one with a cute little train animation at:
http://www.xml.com/lpt/a/1639

A fairly simple puzzle example:
http://nic-nac-project.de/~jcm/index.php?nav=puzzle

There is a set of slides from OSCON2006 that have quite a bit of information, 
including a more serious painting program:
http://conferences.oreillynet.com/presentations/os2006/doughtie_gavin.zip
Inside the zip file is oscon_2006\oscon_examples\demos\canvaspainter.html.

http://developer.mozilla.org/en/docs/Canvas_tutorial has lots of great 
information.

Lots of goodies here:
http://andrewwooldridge.com/canvas/

>> What else needs to be done to Crunchy to begin doing RUR-PLE in it?
>>
> Actually, before the world-builder, some means to have the robot moves
> within a canvas.
>
> The first thing to do would be to load an image and have it move on the 
> canvas!

The examples above include this functionality.

> My original plan was to use, as a first prototype, the existing Python
> from rur-ple create a "list" of moves coming from running a user
> program.  This could be passed to a little javascript program with
> each move executed by a setTimeout call with a suitable delay.
 >
> At this point, any "toy" program that simulates robot motion within an
> html canvas would be useful to have to play with and explore ideas.
> 
> To go back to Crunchy, I'd like to replace the html textarea by an
> editor with syntax colouring, like editarea
> (http://cdolivet.net/index.php?page=editArea ).  I've already
> contacted the author and there's a possibility that the current
> limitation (one instance per page) might be removed soon, making it
> suitable to be adapted for Crunchy.  There's a few more things I want
> to implement before I'm ready to move on to rur-ple within Crunchy.
> My (ambitious?) goal is to get there by mid-Fall.
> 
> Any help of any kind (even creating little toy programs/samples) would
> be appreciated!

I'll see what I can do!

Scott


More information about the Edu-sig mailing list