Interrupt message:
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/gosu-1.4.3/lib/gosu/compat.rb:116:in `initialize': Could not parse audio file track1.m4a (RuntimeError)
: Couldn't open track1.m4a
I'm trying to open some tracks in Ruby using Gosu, but the…
I am trying to centre text in ruby/gosu. However all answers I have come across use deprecated methods. This is the code I've made from those answers. Any help on how to make it work with current versions?
if @track_listing < album.tracks.length
…
I am trying to make a very simple click counter and I am stuck on getting the click counter to increment, both onscreen and in the code itself.
require 'rubygems'
require 'gosu'
module ZOrder
BACKGROUND, MIDDLE, TOP = *0..2
end
WIN_WIDTH =…
I'm writing a game for the first time using the Gosu ruby gem as the graphics library. I think I understand generally that the logic for updating game state and the logic for updating / rendering should be segregated, and I've done my best efforts…
I'm using ruby-prof to figure out where my CPU time is going for a small 2D game engine I'm building in Ruby. Everything looks normal here aside from the main Kernel#` entry. The Ruby docs here would suggest that this is a function for getting the…
I can't work out how to fix it so it takes ten away from the health class variable, as it says that it is an error.
/home/will/Code/Rubygame/objects.rb:61:in `attacked': undefined method `-' for nil:NilClass (NoMethodError)
from ./main.rb:140:in…
i am making a simple game using Gosu, however i do not want to use external sprites for my game and i would rather draw images using code, is it possible to use code drawn images as if they were external images.
Note: i only want to draw basic…
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.
require 'gosu'
class GameWindow < Gosu::Window
def initialize(width=320,…
I'm having a problem calling the x position and y position of a Player. When I call the origin_object.x and origin_object.y with the class Projectile it gives me this error:
asteroids.rb:35:in `update': undefined method `x' for…
I have been tinkering with making a drawing application in Gosu using Ruby, but am running into some high CPU usage. I know one possible cause.
First, I am simply adding a primitive to an hash every time the user clicks the mouse button (or if they…
I'm trying to
gem install gosu
but I'm getting a lot of compiler messages about missing header files, including sndfile.h. Is there a list of debian packages that are needed to compile the gosu gem?
I'm trying to output text to the main window with unicode character like that
def initialize
super 800, 800
self.caption = 'Chess'
@font = Gosu::Font.new(self,…
I am working on a ruby program using Gosu. I want to display the number of mouse click times every time I click on a button on the screen. Please help me with this. Thank you so much
require 'rubygems'
require 'gosu'
module ZOrder
BACKGROUND,…
I have a pod and NodePort service running on GKE.
In the Dockerfile for the container in my pod, I'm using gosu to run a command as a specific user:
startup.sh
exec /usr/local/bin/gosu mytestuser "$@"
Dockerfile
FROM…