
Robots Library is a Processing library that introduces application of basic programming concepts. The library presents us with an Android class - a little robot that can move around and is ready to explore the (computer screen) world! It comes with useful methods that allow our Android to talk and change appearance.
The are two parts to the library - the character and the quests. The character is the robot that you can program and move around. The quests are little puzzles which cover basic topics such as if/else statements or function blocks. The quests are templates that set up a situation and prompt the user to play with it. As the user add code to the templates the hints are given.
Download Robots Library (.zip)
Prototypes
Description + State of Completion (February 13, 2009)This project is an attempt to present (and hopefully teach) introduction to basic programming concepts. This task is achieved with help of a little helper - a Robot. The robot will guide the user through downloading Processing environment/adding appropriate library and then exploring various programming concepts.
So far the Robot library has the following functions:
- The class name to be used with the library is Robotnik
- Robotnik(this, "name_of_this_robot") - a constructor that indetifies each robot instance with a name
- drawMe() - draws the whole robot
- drawMyHead() - draws just the head of the robot
- hello() - shows a speech bubble with "Hello, my name is..."
- say("your text") - makes your robot say whatever you want it to (I would not put in anything particular long at this stage)
- changeMyColor() - changes the color of your robot. It accepts 1 argument (grayscale), or 3 arugments (r,g,b)
- changeMySize(float size) - changes the size of the robot (size = 1 is the default/original size)
- placeMeAt(float x, float y) - where your robot is placed on the screen (just moves the robot there abruptly)
- walkTo(float x, float y) - makes your robot to move (animated, over period of time) to the new location
- A speech bubble that can accommodate multi-line text. Perhaps, create a separate speech-bubble class
- Create a lessons class from which the main class would take information (text + image based) to guide the user in the programming journey
- Change the classname from Robotnik to something more nice. I wanted to do Robot, but Processing thinks it is ambiguous.
Library + Sample Programs
The content of sample programs should not be taken seriously, they only are used to demonstrate the kind of things it would be possible to do. A much neater and smarter lesson content will come in future revisions.
Robot Library (zip) »Prototype 1 (Basic Hello) »
Prototype 2 (Functions)»
Prototype 3 (Mouse Interaction)»