Skip to content

Instantly share code, notes, and snippets.

@gabebw
Created July 17, 2011 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabebw/1087755 to your computer and use it in GitHub Desktop.
Save gabebw/1087755 to your computer and use it in GitHub Desktop.
First step: a black background
require 'rubygems'
require 'ray'
Ray.game 'Pong', :size => [800, 800] do
register { add_hook(:quit, method(:exit!)) }
scene :start do
# Exit when q is pressed
on :key_press, key(:q){ exit! }
render do |win|
end
end
scenes << :start
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment