2

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

### cmd report image

### cmd report 2 image

4

2 回答 2

1

对于在 xp 上遇到此问题的每个人,只需安装以前版本的 gosu,0.9.2 运行良好。

使用:gem install gosu -v"0.9.2"

于 2016-03-04T14:52:28.550 回答
0

对我来说很好

戈苏 0.10.4

红宝石 2.1.2p95 (2014-05-08) [x86_64-linux-gnu]

在 ubuntu 上运行

窗户

于 2015-11-14T18:54:00.673 回答