I'm trying to learn some basics of Gosu. I can display images but when i try with text the application crashed. Here's a simple code i'm trying to run.
<!-- 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
My system:
-Windows xp sp3
-ruby 1.93 448
-gosu 0.10.4