[kde-edu]: Custom Turtle / Re: Kturtle

Niels Slot nielsslot at gmail.com
Thu May 28 23:14:56 CEST 2009


2009/5/28 RalfGesellensetter <rgx at gmx.de>

> On Donnerstag 28 Mai 2009 17:07:22 Mauricio Piacentini wrote:
> > settheme "Egyptian"
> > setsprite 1, "Pharaoh"
> > setsprite 2, "Crocodile"
> > setbackground "Sand"
> > ... and make them run into each other :)
>
> grand idea! just ideal for kids!
> wasn't aware of these possibilities with multiple sprites.
>
> are sprites addressed in a oo way, then - or rather in name spaces?
>
> oo:
> pharao.turnright 90
> crocodile.turnleft 20
>
> name spaces:
> talkto crocodile
> turnleft 20
> forward 200
> talkto pharao
> turnright 90


My code from a few months ago allowed the usage of OO-like commands. You
could do something like:

turtle1 = turtle
turtle1.forward 100
turtle2 = turtle
turtle2.backward 100

This would create two additional turtles, and move them both by 100 steps.

We didn't continue this because Cies felt that we shouldn't do OO-like
things if we couldn't do OO completely.  And I can agree with him on that.
Maybe we should look at the 'talkto' syntax.


>
>
> paralelle scripts (as known from scratch/smalltalk)
> would mean to write one script each per sprite.
>
> this could solve the problem on how to adapt scripts to other themes.
> if you are in the forest and rabbits hunt after foxes, you just need to
> reassign your scripts to the sprites.
>
> but:
> parallele scripts might get out of sync if there is no action/event
> concept.


Parallel scripts seem to complicated to me. KTurtle is meant as a start
before learning a real programming language like Java, Ruby or Python. I
don't want to introduce something that's not going to be in the first few
lessons of the real programming language.


>
>
> till now, most use cases for kturtle focussed on the drawn pattern
> (squares,
> stars, fractals), and at more complex drawings, you will need max speed
> where
> you don't see the sprite at all.
>
> chasing foxes or crocodiles is a different - more gameish - approach that
> might call for action and event based input. Maybe not too compatible with
> logo concepts?


In the Logo variant I used as a child I could actually do action based
things. I could for example have a turtle running around the screen,
controlled with the arrow keys (this was in the last chapter of the book
though).

I'm not sure we want to be able to do such things in KTurtle. Having an
animation of two turtles chasing each other is fine. But if where adding
interaction and stuff, then we might have to reconsider what KTurtle is
meant for.


Niels


>
> _______________________________________________
> kde-edu mailing list
> kde-edu at mail.kde.org
> https://mail.kde.org/mailman/listinfo/kde-edu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-edu/attachments/20090528/ab4004e2/attachment.htm 


More information about the kde-edu mailing list