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
1
vote
2 answers

Cannot open file ruby.png in Gosu using Learn Game Programming with Ruby

I'm using the Learn Game Programming with Ruby book and I'm trying to just execute the sample code. I get the following error, using the sample code. ❯ ruby WhackARuby/WhackARuby_1/whack_a_ruby.rb …
Noah Clark
  • 8,101
  • 14
  • 74
  • 116
1
vote
1 answer

Ruby Gosu using multiple folders

i am working on a Ruby Gosu project and i was wondering if there was a way to access different code from multiple folders and connect them too a main base code,i believe this would make the overall project much less messy and i would not have to…
Boris
  • 75
  • 8
1
vote
0 answers

Ruby: Running Gosu game from a web browser

So what I want to do is this: User visits www.website.com There is a button called "play game" Gosu game (which I have already written) will launch the window. User can play game. so maybe it'll look like this:
1
vote
0 answers

Choppy movement with ruby Gosu and Chingu

I'm doing a tile based RPG type game where the tiles (including the characters) are all 50x50. I haven't used chingu before, but taking a look at the docs, I have this: class Player < Chingu::GameObject def initialize(options) end def…
jeremywoertink
  • 2,281
  • 1
  • 23
  • 29
1
vote
1 answer

Looping background image in Ruby side-scrolling game

I want to loop the background image in a Ruby gosu side scrolling game.I have problem with the counters @k and @p which are used to translate the background image and the duplicated background image.I can't think of a good way to plus them.Here's…
prelibiton
  • 29
  • 8
1
vote
1 answer

Installing gosu on Mac OS X

I'm trying to install gosu on my Mac. I used the command: sudo gem install gosu After I enter my password, I get something that says: Building native extensions. This could take a while... However, then it comes up with this error: ERROR: Error…
user4930716
1
vote
1 answer

How do you get Gosu - Ruby to save the x and y coordinates of a sprite?

I am making a drag-and-drop game with Gosu - Ruby and need to know how to get the computer to save a sprite's x and y coordinates. This is so that I can check if the user dragged the sprite to the correct spot.
Matt
  • 11
  • 2
1
vote
2 answers

Ruby Gosu how to start new time on click

Im trying to simply move an image on click from the one side of the screen to another. But I can't quite figure out how to work with time. Basically I need to start moving a ball after a Gosu::KbReturn. Any help would be much appreaciated require…
Richardlonesteen
  • 584
  • 5
  • 18
1
vote
0 answers

How to make my playing field as a grid in Ruby (Gosu)?

So I'm attempting to make a simple Snake game. However, there's one major problem with that - I don't know how to make my playing field as a grid. So far I've split my snake into segemnts, which are drawn every time it eats an apple. My turn method…
user3213110
  • 199
  • 4
  • 14
1
vote
1 answer

unable to install Gosu library in Ruby in Linux

I am getting this error when I am trying to install gosu on Ubuntu 13.10 Fetching gem metadata from https://rubygems.org/......... Fetching version metadata from https://rubygems.org/.. Resolving dependencies... Using diff-lcs…
Sadiksha Gautam
  • 5,032
  • 6
  • 40
  • 71
1
vote
2 answers

Ruby gamebox can't find the file gosu.for_1_9.so even though it's right there

Preface: I'm on a Windows 8 box, running Ruby 2.0.0. I recently installed the gamebox gem for Ruby. During the installation of all its dependencies, a few files, among them the file…
Ken Bellows
  • 6,711
  • 13
  • 50
  • 78
1
vote
1 answer

Gosu: How to resize an image to fit window?

Using Ruby Gosu, I'm drawing an image this way: @background_image.draw(0, 0, 0) The image is larger than the window, is there a way to magically resize it to fit the window? I'm trying to avoid hardcoding factor_x and factor_y.
albertedevigo
  • 18,262
  • 6
  • 52
  • 58
1
vote
1 answer

Gosu: Making image point to cursor

I'm using Gosu on Ruby 1.9.3 MRI I have a Player class, with it's own x/y variables, aswell as a Cursor class with the same. Considering the Player and Cursor class don't differ in movement and values are the same, how can I calculate the angle to…
Dann
  • 87
  • 1
  • 8
1
vote
0 answers

How do I add Gosu framework for XCode4 project?

I have little to no knowledge about linking and referencing files/resources when it comes to compiled languages (I'm a Ruby programmer). I'm trying my best using general tutorials on "how to add a framework to XCode 4 project", but I'm having a…
ellmo
  • 906
  • 7
  • 18
1
vote
1 answer

How do I require Gosu with IronRuby?

I tried to require Gosu's .so file, but it said something about "expecting assembly". I assumed that IronRuby will support library files which aren't written in dot net, is this true?
user187693