Changes

Jump to navigation Jump to search
1,087 bytes added ,  21:09, 21 April 2012
Line 1: Line 1:  
<noinclude>{{Translations | [[Activities/Turtle Art|english]] &#124; [[Activities/Turtle Art/lang-es|español]] &#124;}}
 
<noinclude>{{Translations | [[Activities/Turtle Art|english]] &#124; [[Activities/Turtle Art/lang-es|español]] &#124;}}
 
[[Category:Activities|Turtle Art]]</noinclude>
 
[[Category:Activities|Turtle Art]]</noinclude>
Sorry, this page translated from the original Spanish. Your help improving this translation will be very welcome :)
+
This page is based on documents translated from Spanish. Your help improving the translation would be very welcome :)
    
[[Activities/Pilas/lang-es|Go to Pilas Activity page in Spanish]].
 
[[Activities/Pilas/lang-es|Go to Pilas Activity page in Spanish]].
   −
==Pilas.xo Project==
+
==About the Pilas.xo Project==
This brings the pilas-engine game development engine to Sugar, adapting it to the needs of the Sugar platform and adding elements to your learning curve.
+
Pilas is an engine for making videogames in an easy way. It's oriented to people that are learning to code videogames and that want to achive interesting and fun result very quickly.
   −
We seek to facilitate a teaching tool for Python and game development.
+
This project brings the Pilas game development engine to Sugar, adapting it to the needs of the Sugar platform and adding elements to your learning curve. We seek to facilitate a teaching tool for Python and game development.
 +
 
 +
This project was developed during [[Sugar Day Junin 2011]]
   −
This project was developed during the 2011 Sugar Junin Day [[Sugar Day Junin 2011]]
   
==Links to the project==
 
==Links to the project==
    
* Pilas: [http://www.pilas-engine.com.ar/]
 
* Pilas: [http://www.pilas-engine.com.ar/]
* Activity. .XO [http://activities.sugarlabs.org/sugar/addon/4484]
+
* Activity.xo [http://activities.sugarlabs.org/sugar/addon/4484]
 
* Code [https://bitbucket.org/hugoruscitti/pilas]
 
* Code [https://bitbucket.org/hugoruscitti/pilas]
 
* Issues tracker [https://bitbucket.org/hugoruscitti/pilas/issues]
 
* Issues tracker [https://bitbucket.org/hugoruscitti/pilas/issues]
Line 22: Line 23:  
  cd pilas/  
 
  cd pilas/  
 
  hg update pilasqt
 
  hg update pilasqt
 +
 +
==Getting Started==
 +
The Activity starts with the game engine initialised and a monkey (mono) preloaded. The monkey is displayed in the upper pane and the lower pane executes Python code in immediate mode
 +
 +
[[File:Pilas xo.png|center|300px]]
 +
 +
The following Pilas commands can be entered :
 +
 +
mono.sonreir()                      //monkey smile
 +
mono.gritar()                        //monkey shout
 +
mono.decir("Hello World!") 
 +
mono.x = 100
 +
mono.y = 100
 +
mono.z = 1                          //depth or drawing order
 +
mono.escala = 2                      //set scale
 +
mono.rotacion = 40                  //rotate 40 degrees
 +
mono.rotacion = [360]                // the [] means animate
 +
mono.x = [-200, 200]                //animate horizontally
 +
mono.x = [-200, 200] * 5            //go side to side 5 times
 +
mono.x = [-200, 200], 10            //animate over 10 seconds
 +
help(mono)
 +
pilas.ver(mono)                      //view source
 +
mono.eliminar()                      //delete monkey
 +
mono = pilas.actores.Mono()          //create a monkey instance
 +
pilas.iniciar()                      //initialise the game engine
 +
pilas.iniciar(gravedad=(0, 0))      //initialise and set gravity
 +
//with pilas.actores you can create:
 +
//Mono Bomba Pingu Pelota Banana      Monkey Bomb Penguin Ball Banana
 +
//Caja Tortuga Moneda Estrella        Box Turtle Money Star
 +
//Nave Piedra                          Plane Rock
 +
pilas.ejemplos.Piezas ()            //starts a demonstration game
 +
 +
There is much more, read the Spanish documentation. [http://www.pilas-engine.com.ar/]
    
==Status==
 
==Status==
Line 65: Line 99:       −
==Getting Started==
+
==Running Pilas from Pippy or Terminal==
The Activity starts with a monkey(mono) preloaded in the upper pane and a lower pane that executes Python code in immediate mode
+
This is not working, help please!
   −
[[File:Pilas xo.png|center|300px]]
+
<s>
 +
Pippy:
 +
import sys
 +
sys.path.append('/home/olpc/Activities/Pilas.activity')
 +
import pilas
 +
pilas.iniciar()
   −
The following commands can be entered (from the Spanish documentation [http://readthedocs.org/docs/pilas/en/latest/empezando.html])
+
Terminal:
   −
mono.sonreir()              //monkey smile
+
Create a file myprogram.py in ~/Pilas.activity containing
mono.gritar()              //monkey shout
+
  import pilas
mono.decir("Hello World!")
+
  pilas.iniciar()
mono.x = 100
  −
mono.y = 100
  −
mono.escala = 2            //set scale
  −
mono.rotacion = 40          //rotate 40 degrees
  −
mono.rotacion = [360]      // the [] means animate
  −
mono.x = [-200, 200]        //animate horizontally
  −
mono.x = [-200, 200] * 5    //go side to side 5 times
  −
mono.x = [-200, 200], 10    //animate over 10 seconds
  −
help(mono)
  −
  pilas.ver(mono)            //view source
  −
  mono.eliminar()            //delete monkey
  −
mono = pilas.actores.Mono() //create monkey
     −
There is much more, read the Spanish. [http://www.pilas-engine.com.ar/]
+
In Terminal type
 +
python myprogram.py
 +
</s>
2,486

edits

Navigation menu