私は Gosu のいくつかの基本を学ぼうとしています。画像は表示できますが、テキストを表示しようとするとアプリケーションがクラッシュしました。ここに私が実行しようとしている簡単なコードがあります。
<!-- language: rb -->
require 'gosu'
class GameWindow < Gosu::Window
def initialize(width=320, height=240, fullscreen=false)
super
self.caption = 'Hello'
@message = Gosu::Image.from_text(self, "My text to print",Gosu.default_font_name,100)
end
def draw
@message.draw(10, 10, 0)
end
end
window = GameWindow.new
window.show
私のシステム:
・Windows XP SP3
-ルビー 1.93 448
-gosu 0.10.4