Ruby is an open-source dynamic OO interpreted language created by Yukihiro Matsumoto (Matz) in the 1990s that combines the good bits from Perl, Smalltalk and Lisp. It supports multiple programming paradigms. Ruby's primary purpose is to "help every programmer in the world to be productive, and to ...

learn more… | top users | synonyms

0
votes
1answer
57 views

Collision detection in ruby

I'm making a simple pong game in ruby. I did the collision detection this way: def collides_with(player) ((@x + @image.width >= player.x) && (@x <= player.x + ...
0
votes
1answer
57 views

From where does the game engines add location of an object?

I have started making my first game( a pong game )with ruby (Gosu). I'm trying to detect the collision of two images using their location by comparing the location of the object (a ball) to another ...
0
votes
0answers
64 views

How can I save a bitmap as a .jpg or .png?

I'm writing a script on RPG maker and at some point I'll need to save a bitmap as a .png or .jpg file on the game folder. I know I could probably load the picture with File.read or something alike and ...
0
votes
1answer
472 views

How can I copy/move a file from a folder to another with RGSS?

I've been trying to do this but I can only find Ruby answers. I'm trying to move or copy a file from, say, Game Directory/Graphics/Pictures/file.png to Game Directory/file.png. How can I do this in ...
0
votes
1answer
37 views

How can I get the width and height of a picture?

I'm trying to make a script on RPG Maker XP that needs the width and height of an image to do some calculations. I tried @picture.bitmap.widthand @picture.bitmap.height but it returned the width and ...
1
vote
2answers
133 views

How can I fix my sprite being rotated 90 degrees more than toward the mouse?

I am trying to get a Sprite in LibGDX to look at the player's mouse. Here's the code I have (mind you, I am using JRuby): target = mouse_position.sub(spatial.position) rotation = ...
5
votes
0answers
139 views

LibGDX controllers: how to fix crashes in JRuby?

I'm using JRuby with LibGDX and it's been going quite swimmingly, save for a crash I experience every time I try to use the controllers extension. Here's a basic rundown: I've required all the ...
2
votes
2answers
200 views

Finding tileX and tileY based on x and y (and vice versa) in isometric 2D view

I'm working on 2d Isometric game in ruby and gosu, although my problem is probably universal. My map is saved in 2d array: @map_tiles[layer][y][x] = tile_id Each tile is displayed on coordinates: ...
0
votes
2answers
102 views

How to cancel out simultaneous collisions in libGosu?

I am working on an Asteroids remake. When the player's bullets hit a large meteor, it should break apart into 2 smaller meteors. This works when the player is only firing one bullet, but when the ...
5
votes
1answer
299 views

Create extra bullets, offset according to angle of spaceship? [duplicate]

I am trying to create a weapons upgrade for my Spaceship, using libGosu and Chingu (in Ruby). This question is about how to deal with this issue specifically in Ruby, and more specifically in libGosu. ...
1
vote
1answer
113 views

How do I use warble to package libgdx and ruby?

My ruby code is as follows include Java Dir[File.expand_path "#{File.dirname(__FILE__)}/../libs/\*.jar"].each { |x| require x; puts "go"} module LibGDX include_package "com.badlogic.gdx" ...
8
votes
2answers
217 views

When should I represent points and sizes as structures?

As part of my simple Ruby 2D game development framework, my game objects have position (x and y values) and size (width and height). class MyGameObject attr_accessor :x attr_accessor :y ...
-1
votes
1answer
2k views

3D Graphics Engine for Ruby on Rails [closed]

I've had a good few months of experience with Ruby on Rails, creating my own CMS system, a social network and even a VOIP enabled answering phone machine. I'm also an established 3D modeller, and what ...
1
vote
1answer
443 views

Ruby Vs. C# - Better for Game Programming [closed]

I have seen some games made in C#, such as using the XNA. I saw some games made in Ruby by using the RGSS1-3 API as well. I just can't decide on my own which would be easier to learn and apply for ...
2
votes
2answers
563 views

Is it possible to make/translate a 3d engine to ruby on rails?

I am looking to make a 3D FPS that runs inside web browsers. I looked into using WebGL, but it didn't seem far enough along into development. I decided on using RoR because Ruby was a language I knew. ...
1
vote
0answers
203 views

Moving while doing loop animation in RPGMaker

I made a custom class to display character portrait in RPGMaker XP Here is the class : class Poser attr_accessor :images def initialize @images = Sprite.new @images.bitmap = ...
2
votes
1answer
569 views

multi-dimension array problem in RGSS (RPG Maker XP)

This is my first day code script in RMXP. I read tutorials, ruby references, etc and I found myself stuck on a weird problem, here is the scenario: I made a custom script to display layered images ...
1
vote
0answers
212 views

Ruby/SDL vs. RUDL [closed]

I'm interested in using Ruby for 2D games. I have to pick between Ruby/SDL and RUDL, both of which are Ruby SDL wrappers. Which is better? Better means "less bugs" and "more usable," although the ...
0
votes
1answer
829 views

Teaching game development with Ruby [closed]

I want to teach game development to kids as part of a course (year-long) involving Ruby. Unfortunately it looks like the game development kits available in Ruby (even in the form of bindings) are ...
3
votes
2answers
368 views

How can I improve this architecture?

In a roguelike I'm developing in Ruby, I started with a traditional object hierarchy where all game logic relevant to creatures were contained in the Creature class. Movement logic, for example: ...
4
votes
1answer
209 views

What's the best way to track game phases?

I'm currently writing an IRC bot in Ruby to play some kind of strategy game (it doesn't matter which), but I'm hesitating between several solutions to implement a phases system the "best" way. The ...
0
votes
2answers
311 views

Railgun Ruby - is there a documentation?

I finally found Railgun Ruby on the web and installed it. But I cannot find any documentations. Does anyone have played around with it? Does anyone still have a good documentation about it? I'd ...
3
votes
5answers
631 views

Porting Ruby/NCruses Rogue-Like to .NET and FlatRedBall

I created an awesome rogue-like game in Ruby. For the GUI, I used NCurses. Since I'm using FlatRedBall as my engine of choice for Silverlight game development, I want to port this game over. What is ...
0
votes
1answer
1k views

Ruby: implementing alpha-beta pruning for tic-tac-toe

So, alpha-beta pruning seems to be the most efficient algorithm out there aside from hard coding (for tic tac toe). However, I'm having problems converting the algorithm from the C++ example given in ...
29
votes
9answers
23k views

Is ruby a suitable language for game development? [closed]

I want to move into some game development, but the only language I know really well is Ruby. Most of what I have read seems to point towards lower level languages like C++ for game development, or ...