I’m trying out Gosu, which is a 2D game library written in C++ with Ruby bindings (Wikipedia article).
The Ruby documentation is sparse but sufficient.
The gem is easy to install: $ gem install gosu
A ‘Hello World!’ app requires about 20 lines of code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
Run it like this: $ ruby hello_gosu.rb
The program creates the window shown at the start of this article.
The complete code is in a GitHub repository.