Create a gist now

Instantly share code, notes, and snippets.

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