LoginSignup
8
5

More than 5 years have passed since last update.

Rubyでゲームを作る

Posted at

Rubyの導入

2.0が正式に対応していないので、1.9.3を入れる

$ rbenv install 1.9.3-p392

ディレクトリを作成し、そのディレクトリ内では、1.9.3を使うように設定

$ cd
$ mkdir -p Workspace/Game
$ cd Workspace/Game
$ rbenv local 1.9.3-p392

gosuの導入

gosuは、ゲーム開発用ライブラリ
ゲーム開発を行う際に、便利な機能が提供されている

$ cd ~/Workspace/Game
$ gem install gosu

これだけで導入完了
例題を動かしてみる

$ cd ~/Workspace/Game
$ ln -s ~/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gosu-version/examples/ examples

gosu-versionの部分などは適当に変更してください

$ cd ~/Workspace/Game/examples
$ ruby Tutorial.rb

ゲームが起動すれば成功

8
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
5