as part of an assignment im trying to use the gosu gem to make a simple snake game. i was instructed to follow this guide: https://github.com/gosu/gosu/wiki/ruby-tutorial
i had gotten quite far and could initialize a snake game but had put it in the…
I am working on a GUI music player, and my program needs to play all the tracks in order. I also need to pause the tracks when I press the right arrow key:
def button_down(id)
case id
when Gosu::MsLeft
@locs = [mouse_x, mouse_y]
if…
def initialize
super 200, 135, false
self.caption = "Gosu Cycle Example"
@shape_x = 0
# Create and load an image to display
@background_image = Gosu::Image.new("media/earth.png") #this is causing the error
# Create and load a font for…
I'm using Gosu (with Ruby version 2.5.5) to make a music player with a GUI, I have a basic player to play one song at a time, but I'm required to tweak the player so I can play one song after the other from this:
@song =…
I'm creating a game with ruby and gosu, and I get an error:
C:/Ruby26-x64/destroy!/bullet.rb:14:in draw_rot': There is no rendering queue for this operation (RuntimeError)
from C:/Ruby26-x64/destroy!/bullet.rb:14:indraw'
from…
As a foreword, I want to say that I am very new to programming and this program is definitely not written in the smartest way.
Also, I'm using the terminal to show debugging but the program is graphical, as shown near the end.
In a Gosu program I…
so ive made 2 classes the grass inherits from the Tile class, anytime the Tile class is called it should go to the grass class and create a tile containing itself. the problem is i get "uninitialized constant Tile::Grass (name error)" and im not…
im building a basic game in the style of the original pokemon games using the ruby gosu library. Ive managed to figure out how to move the originally loaded sprite about but i cant figure out how to clear that sprite and draw the new sprite e.g.…
I have a decent amount of knowledge about Ruby code, but I do have an issue with my current project. I use Gosu to make 2D games (and once I figure out how, simple 3D games), so I need a resolution.
And this is where my question comes in, why does…
I'm following the book "Learn game programming with ruby"
one of the exercises is loading an image with gosu and making it bounce off the edges of the screen. I followed the exercise and the image bounces fine off the top and left corners but will…
I'm trying to draw on the screen the subimage of an Image instance using this subimage method. It seems to be pretty straight forward to do it but when I call the function it returns a NilClass instead of a new Image.
The main image is defined…
I'm trying to write a simple game in Ruby (ver 2.2.6) on Windows. I installed the Gosu gem to handle the audio, and I have a soundtrack file that I would like to play:
@soundtrack = Gosu::Song.new("theme.ogg")
I cannot use Sample, because I need to…
I'm trying to recreate a simple game but I'm stuck at the moment that I'm trying to make jump my character( or player).
I've been checking the example from gosu but it's not really clear for me.
Can someone help me?
Here is my window code:
class…
I'm learning basic game programming using Ruby and Gosu. I've installed Gosu from RubyGems, and it is currently sitting in /usr/local/lib/ruby/gems/1.9.1/gems/.
The full path is /usr/local/lib/ruby/gems/1.9.1/gems/gosu-0.7.24-universal-darwin/.
When…