Skip to content

Instantly share code, notes, and snippets.

@kfatehi
Last active December 21, 2015 00:08
Show Gist options
  • Save kfatehi/6217250 to your computer and use it in GitHub Desktop.
Save kfatehi/6217250 to your computer and use it in GitHub Desktop.
KeyTo DSL rough draft
module IntroToObjects
include KeyTo::Lesson
name "Intro to Objects"
level("Make an object!") do |scene|
scene.background.image = "objects background.png"
scene.hint.text = "We can define objects using the #{code('class')} keyword, but that's not the only way!"
scene.hint.audio = "explain more.mp3"
scene.challenge = Challenge.load("...")
scene.option(image: "choice1.png") do
scene.wrong!
scene.audio.play("not this because.mp3")
end
scene.option(image: "choice2.png") do
scene.right!
scene.audio.play("good job, works like this cuz.mp3")
end
scene.option(text: "hint please!!") { scene.hint.use }
scene.ready do
scene.challenge.show
scene.audio.play "defining classes.mp3", finished:->(a) do
scene.toolbar.option("replay intro") { scene.audio.play a }
scene.options.each {|opt| opt.show }
end
end
end
level("Modules are objects too") { "..." }
end
  • Add camera

  • Add video editing

  • Incentivise participatory explanation and communication -- we want dialogue

  • Create your own enhancement upon the lesson and sell it on the Lesson Store.

  • Create your own lessons

  • Support all platforms: Shoes, iOS, Android, Web (websocket ruby/js/coffee bridge API? KeyTo.Adapter.WebComponent))

  • Initial prototype written in shoes and makes this page more experiental: http://hackety.com/lessons/a-tour-of-hackety-hack

  • Ok that's HacketyHack: http://cl.ly/image/0q0j0e0e0J0U

  • Mac-Only is a joke, someone should port Hackety to iOS if they haven't already; my code above looks so similar to what shoes does, except with more device support -- this would be a fun project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment