Questions tagged [libgosu]

Gosu is a 2D game development library for the Ruby and C++ programming languages.

See homepage at http://www.libgosu.org/

See Ruby documentation at https://www.rubydoc.info/github/gosu/gosu/

118 questions
9
votes
2 answers

Why is Gosu hiding my mouse pointer?

I'm doing some graphics programming using the Gosu gem. The thing is, when I create a Window my mouse pointer is hidden. I can guess where the mouse is at a certain moment, and I can intuitively click, but my users may not. How can I show the…
Geo
  • 93,257
  • 117
  • 344
  • 520
6
votes
4 answers

Why rubygame and gosu are slower than pure opengl?

I'm looking for a good graphic framework to make a nice 2D game in Ruby. I made 3 very simple test to see which graphic Ruby framework is faster between Gosu and Rubygame. The test creates 1000 instances of a "Square" class that move and draw a red…
XPac27
  • 301
  • 2
  • 8
5
votes
2 answers

Draw a Polygon with Chipmunk and Gosu in Ruby

I am brand new to game development and I thought it would be fun to try out Gosu, Ruby and Chipmunk together. So far I have a player and a ball on a 2d Top-Down field and they collide. My problem right now is that I want my player to be a square. I…
James P. Wright
  • 8,991
  • 23
  • 79
  • 142
5
votes
3 answers

Centering text in Gosu

I've been having trouble centering text in the Gosu library to the absolute middle of the screen. require 'gosu' class GameWindow < Gosu::Window def initialize (width=800, height=600, fullscreen=false) super self.caption = 'Hello' …
PrimRock
  • 1,076
  • 2
  • 15
  • 27
4
votes
3 answers

ruby catch classes as they are defined

Building tile games or simulations in Ruby Gosu always makes me end upp with a list of all available tiles, saved by their class. For example [Pipe, PipeJunktion, Box, Pump] and so on. Each class is defined in one of a few separate files, which i…
Leddy231
  • 63
  • 5
4
votes
1 answer

Can not install gem Gosu Ubuntu

I am trying to install Gosu on my Ubuntu computer. To install the gem i have tried "gem install gosu" but I am getting an Error message I cannot figure out.. It says it "Failed to build gem native extension". Anyone know what I can do? I am kinda…
Salviati
  • 758
  • 2
  • 9
  • 28
3
votes
1 answer

Installing gosu on FreeBSD

I'm trying to install this Ruby gem on FreeBSD, and it's failing with the following error: # gem install gosu Building native extensions. This could take a while... ERROR: Error installing gosu: ERROR: Failed to build gem native…
Daniel
  • 387
  • 1
  • 7
  • 17
3
votes
0 answers

Embed a ruby gosu game to play in a browser

I have played with some gosu tutorials to create a simple gosu game using my mac. I followed the instructions in https://www.libgosu.org/ruby.html My question is: Can a gosu game be set up to run on a website using something like…
Laurie
  • 162
  • 1
  • 11
3
votes
1 answer

Ruby: deleting object while looping over list with that object

So I have multiple lists to keep track of objects in a 2D game, but if these objects go off screen I want to remove these objects so they are no longer updated. What I have below works for me, but this doesn't work in other languages. Usually I have…
user4706184
3
votes
1 answer

Networking - Data To Be Sent To Server

I'm attempting to make my first multiplayer game (I'm doing this in Ruby with Gosu) and I'm wondering what information to send to the server and how many, if any, of the calculations should be done on the server. Should the client be used simply…
Damon Jenkins
  • 352
  • 1
  • 3
  • 12
3
votes
1 answer

Vector 'Players' rather than images using Chingu and Gosu

The Chingu example looks something like this: require 'rubygems' require 'chingu' class Game < Chingu::Window def initialize super @player = Player.new end end class Player < Chingu::GameObject def initialize(options = {}) …
JP.
  • 5,507
  • 15
  • 59
  • 100
3
votes
3 answers

Gosu Installation Error

I'm trying to set up the Ruby for kids tutorial, and am completely stuck on the first step. Something with my GOSU GEM instalation is wring. Whenever I try and run the main file as requested I get this…
user1935300
  • 31
  • 1
  • 2
3
votes
1 answer

Gosu/Ruby fails to install

Gosu fails to install on my Mountain Lion (10.8.3). Here's the error I get: Building native extensions. This could take a while... ERROR: Error installing gosu: ERROR: Failed to build gem native…
Roald
  • 231
  • 1
  • 12
2
votes
1 answer

Unusual behavior of collision detection using Chingu

I'm trying various ways of colliding the player with an item: Coin.each_bounding_circle_collision(@player) do |coin, player| puts "coin collides with player" end Item.each_bounding_circle_collision(@player) do |item, player| puts "item…
jdlm
  • 6,327
  • 5
  • 29
  • 49
2
votes
1 answer

Is there a way to return nil message to user but not interrupt the app in ruby?

I'm trying to find a way to write in GUI for user that there is nothing in the button they just clicked I've tried a method like ` if @album[@user_choice_album].tracks[10].name == nil return ` But it interrupt the program and gave…
LycoReco2007
  • 127
  • 7
1
2 3 4 5 6 7 8