druthers-one icon indicating copy to clipboard operation
druthers-one copied to clipboard

If I had my druthers....a programming language made during Khan Academy's 2014 Hack Week.

Druthers One

A hacked up prototype programming environment for iPad, built primarily during a Hack Week at Khan Academy, loosely inspired by Etoys.

How to work it

  1. When you launch, you'll see the blank environment. Tap anywhere to draw a character.
  2. When you finish drawing, hit Save.
  3. You can now drag and drop your character willy nilly.
  4. Tap your drawing to open up its inspector. You see its position and rotation. You can drag on these numbers to change them.
  5. You can tap on some of the drawings actions too. Actions do things.
  6. Drag out an action onto the stage and it creates a script. Drag another action into the script to make the script do more.
  7. You can play the script once by pressing its play button. You can play it repeating forever with the loop button.
  8. You can drag out properties of one drawing (like Drawing's direction) as a parameter in a script (Drawing turn Drawing's direction).
  9. Try drawing a car, make it move in a circle, and draw a steering wheel to steer it. Magic!

Tips

  • You can drag just about anything. The drawings, but also the inspectors. And also the script. Put them where you want!
  • If you want to get rid of something, just toss it off the screen. Again, this works with drawings and inspectors and scripts.

Code

The code is a mix of really nice Swift code and hacks to get things done. Pretty much everything in the Extensions directory is solid, at least.