The goal for this program is that the mouse must be clicked on the green rectangle shape which change the window background color to yellow or back to default color and the issue is that the color can also be change from outside of the rectangle.…
I want to make a box with a hover effect (to make a bold border of the box) when a mouse moves over it. What method should I use in Gosu library?
#green rectangle that I want to give a hover effect (to become bold border)
def…
I have a problem with Thread in Ruby.
It's the first time I use Threads, so maybe I omit something important.
I have this procedure:
def define_action(field)
false if field.nil? || field.empty?
puts field.empty? <---- ONLY FOR…
there's a method that you can check 'the key' user are pressing:
Gosu.button_down? id
the id parameter can be Gosu::KB_UP, Gosu::KB_1, Gosu::KB_F1...
but is there any method that you can get id of the key the user are pressing?
I recently installed Ruby 2.3 and the Gosu 2d game development library on Windows OS 8.1 (Surface Pro 2). The installation of both was quick and successful. Using the library I wrote a basic program (using Sublime Text 3) meant to generate a blank…
I am right now trying to create a game in Gosu and Ruby. I am running into an issue where a background image is not showing up in my code. I am getting no errors but whenever I launch the application I am getting a black screen and I stumped as to…
I downloaded the latest version of Ruby.app, a OS X app that contains a full Ruby installation (for use with Ruby/Gosu) from here
But, after decompression, when I launch the app, it does not open. I am on OSX 10.11.5 El Capitan, Ruby 2.3.1. Gosu…
I have updated RubyGems to the newest version, I'm running Ruby 2.2.3p173, but when I go into my Powershell and type gem install gosu like RubyGems says, I get this error:
ERROR: Error installing gosu:
invalid gem: package is corrupt,…
I have the following model in my Rails application:
class Window < Gosu::Window
def initialize
super( 250, 100, false )
@background_image = Gosu::Image.new( self, 'hello.png' )
end
def draw
@background_image.draw( 0, 0, 1 )
…
I am learning Ruby at the moment so definitely a beginner and have been playing with the Gosu 2D game development and am having issues with the following code and unsure what I have missed/done incorrectly.
Code is:
require 'rubygems'
require…
I'm new to programming and Id like to make a Dodger type game using the Gosu library. I don't know if this question completely adheres to Stack Overflow's rules but I haven't seen anything to the contrary.
Currently I know how to make window pop up…
(Using Ruby with Gosu)
I have a single-point object representing a man which looks in a certain direction.
I have three variables, x, y (the 2d co-ordinates of the man) and @angle (the direction he's facing, in degrees). If i want to find x and y of…
Im sitting here with what I think is a very simple bug I just can not figure out.. Im trying to learn how to make games with Gosu gem with Ruby, but have hit a speed bump. Here is my code.
require "gosu"
class Hello < Gosu::Window
def…
I am trying to make the edges of my window collidable, rather than having my shape drop through the floor on creation.
When I was looking through the demos on the site, I saw this line of code that was ment to define the bounds of the space:
[_space…
I have a ruby file that creates a game window for me (using the gosu gem).
I am trying to render this file to a webpage.
I understand that javascript is best for doing this sort of thing but as I do not know it and am not allowed to use it for this…