[kde-edu]: KTurtle and Akademy
cies
cies.breijs at gmail.com
Wed Aug 13 11:59:02 CEST 2008
hi all!
nice to see the results of the session ;) i try to answer what i can..
> -Console is basically a one line script
> -No history and variables
> Q: Is there a way to make it integrated into the currently loaded script?
that would be quite difficult, but of course possible.
with difficult i mean: you can make a patch that will implement this
functionality in 5 minutes, but it has quite a few strings attached
(error handling, context help, highlighting), i feel some things have
to change in the interpreter code to do this properly.
> -No syntax highlight in the console (maybe Qt limitation)?
not so easy to implement, and not much 'gain'.
> -Execute button on console ?
> Niels's idea is to put an execute button next to the console, so people
> could either press enter or hit the button. I think it is nice.
i remember i put a button there once but i removed it for simplicity's
sake. but i had not much against it.
> -Icons for direction chooser and color picker
> I will ask Johann or Eugene from the kdegames team for help
i think a colorpicker icon should be somewhere in koffice, maybe we
can also reuse some icon (like an arrow) from koffice for the
direction chooser.
> - Cleaning command when executed (already done by Niels and committed)
you mean to clear the command after i press enter in the console?
that's a pitty, i like to hit commands a few times with i write them.
;)
(no problem with the commit though)
on documentation: yes the definitions.rb file is the place to be for
function documentation i think. currently there is no code to parse
the docbook, but that should be easy.
documentation, and a good contextual help are in my opinion very good
features for kturtle to have -- they make it easier to start
programming for people who never did it before.
> -Maybe a doc section for children and another for adults?
i think kturtle documentation should be direct user documentation. a
'teachers manual' could follow of course.
> -Saving image
important feature i think, possible in png and svg ;)
with this feature implemented adding a print feature is a no-brainer.
> -Adding goal oriented scenarios
sound nice! but i feel this is more for the "machine" kde app. adding
scenarios will add a load of code to kturtle and needs hooks all over
the codebase.
> -Add integration with KNewStuff to download and upload scripts
good feature!
finally there is the multi-turtle-feature, the background feature, the
sound feature, and many other features.. i dont see the benefit to
someone learing how to program to have all these fancy features, i
think we better keep is very, _VERY_, simple. but then again if
someone really wants to implement it, feel free to do so. ;)
the syntax of complexer functions is one issue that is very
interesting. if we go for a dot notation (sprite.load_from_svg
"fish.svg") that would kind of suggest we are going in an OO
direction. the interpreter of kturtle is not ready at all for going
OO. we could easily allow the dot notation for a few build-in cases,
but i dont think that is a beautifull solution. so far i have allways
told myself that kturtle shouldn't need advanced feature that need a
dot notation, so it can stay super-simple (TM). yet i can be wrong.
again thanks for letting me know the outcome of yr discussion!
take care,
_c.
On Wed, Aug 13, 2008 at 4:14 AM, Mauricio Piacentini <piacentini at kde.org> wrote:
> Hi, people. Niels and I had a nice session today talking about KTurtle, and
> we want to share some of the ideas with Cies to decide on how to implement
> them. I am also cc'ing kde-edu, so anyone is invited to join us in this
> discussion. So here are some of our ideas and action itens, and some
> questions for Cies:
>
> KTurtle ideas and todo
>
> -Console is basically a one line script
> -No history and variables
> Q: Is there a way to make it integrated into the currently loaded script?
>
> -No syntax highlight in the console (maybe Qt limitation)?
> -Execute button on console ?
> Niels's idea is to put an execute button next to the console, so people
> could either press enter or hit the button. I think it is nice.
>
> -Icons for direction chooser and color picker
> I will ask Johann or Eugene from the kdegames team for help
>
> - Cleaning command when executed (already done by Niels and committed)
>
> Documentation improvements:
> =Documentation for math functions
> -Round function documentation
> -definitions.rb generates docbook section, possible?
> -Maybe a doc section for children and another for adults?
> -Document the console
> - Ask Albert about possible documentation bugfixes (missing commands for
> example), can they get into 4.1.1, or only into 4.2?
>
> Big new feature: multiple and customizable sprites, and background
> -Adding customization of Turtle sprite
> setSprite?
> setSpriteSize?
> -Adding background
> setBackground?
> -Add more sprites and movable sprites
> -Playing sounds
> playSound?
>
> More features:
> -Saving image
> -Adding goal oriented scenarios
> -Add integration with KNewStuff to download and upload scripts
> Need some sprite art and maybe background art
> Work on the idea of a Resource manager that can collect sounds and
> scripts and art
> Maybe use the Plasmagik framework - talk to Ricardo Iaconelli
>
> ---
>
> Comments welcome. One of the main questions is how to implement the multiple
> sprites functionality in TurtleScript. Niels thinks it would be nice to
> create new sprites and reference them in a syntax that resembles
> object-oriented programming, like the following (command names are bogus):
>
> $car = newsprite("car")
> $car.position = 10,10
>
> Can you elaborate on it a little bit, Niels?
>
> I think it would be simpler to do it with a different approach, using
> basically something like:
>
> addSprite "car"
> setActiveSprite "car"
> go 100,100 -- acts on car
> forward 100 --still acting on car
> setActiveSprite "turtle" --this is the default
> go 50,50
> ---
>
> So basically we would not change any of the commands, we would just direct
> them to the active sprite, and only one can be active at any given time (not
> really a problem, since there are no threads or anything like that.)
>
> It should be possible to change the sprite art as well, with something like:
>
> setSpriteArt "myfilename.svg"
>
> There is no need to specify the sprite name, as we would be acting on the
> current sprite anyway. So you could do:
>
> setActiveSprite "car"
> setSpriteArt "brokencar.svg"
>
> for example. We could also add
>
> setSpriteSize 40,40 -- to set the size of the sprite, something that could
> be useful. It would always be centered.
>
> There would be also background commands, like
>
> setBackground "landscape.png"
> setBackgroundSize 640,480
> --or maybe specify the rect? Not sure
> setBackgroundRect -100, -100, 100, 100
>
> For the sake of simplicity, only background would be settable.
>
> If you have time, checkout Ktuberling from kdegames. The new 4.0 and 4.1
> versions have a lot of art we can reuse for Kturtle resources, with cars,
> animals, houses and other cool stuff we could use as our sprites.
>
> Regards,
> Mauricio Piacentini
>
More information about the kde-edu
mailing list