Reputation: 45
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
Upvotes: 2
Views: 175
Reputation: 26
to everyone who have this problem on xp just install a previous version of gosu, with 0.9.2 works well.
Use: gem install gosu -v"0.9.2"
Upvotes: 1
Reputation: 897
Works fine for me
gosu 0.10.4
ruby 2.1.2p95 (2014-05-08) [x86_64-linux-gnu]
Running on ubuntu
Upvotes: 0