[kde-edu]: KTurtle and Akademy
Mauricio Piacentini
piacentini at kde.org
Tue Aug 12 23:14:00 CEST 2008
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