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 languages for specific frameworks like C# for using XNA. Does anyone have any experience using a language like ruby for game development? If so, would you advise for or against it?
I have no preference towards Ruby (or Python), I'm a Java person myself. But UnknownDevice's answer about how Ruby is somehow "not really for games" and Python is, frustrated me. I do hope he will clarify.
I know Pygame exists and has been around, and I recognize that Python has a larger userbase than Ruby. But to be honest, neither of them seems like a language "for games". Neither does Java, and that's my game programming language of choice. (and when I say "of choice", I do mean by choice, not because it's what's taught in school or because it's something I "know"). And really, what is a language "for games"? Well, speed is a factor, and obviously it must have libraries for graphics and other game systems (audio, input, etc).
As far as speed goes, it seems to be a tossup between Ruby and Python. Do some searches and you'll quickly find benchmarks and arguments for both sides of the spectrum, and various configurations which put one or the other ahead. Python with something called "Psycho" seems a popular speed demon compared to Ruby, yet regular Python seems to be a bit slower than Ruby. In the end, if you're choosing such a high-level language you're obviously not concerned with native speeds anyway; go with the language you know best. And obviously you know Ruby best, so I encourage it!
The other factor is whether the technology is there to create games; whether it can support drawing to the screen and collecting input and playing audio. Ruby can do all of these. In fact there are a good number of options in this respect. There's a ruby-opengl package at RubyForge which will give OpenGL support to Ruby (or it might be included by default?). Alternatively, Chingu provides "lightning fast OpenGL accelerated 2D graphics!" according to its homepage; it builds extra features on top of Gosu, which you could choose to use if Chingu is too much for you. Or for 3D graphics, if you don't want to use ruby-opengl, try G3DRuby, "a very clean set of wrapper classes for many of the more advanced OpenGL features". There's even Rubygame, which I can't find much information on but it claims to be "a cross-platform multimedia library" and given the name, must have emphasis on game development. If you are familiar with the popular SDL library for C++, there's Ruby/SDL or RUDL, both of which are Ruby wrappers of SDL. Or if you prefer the newer, more object-oriented SFML, it is also available for Ruby!
There is no reason that Ruby should be less of a game programming language than Python; if there is one, I'd really like to hear it so I can argue against it. If you feel most comfortable programming in Ruby, and you are aware of the pros and cons compared to other popular languages, then by all means you can certainly develop games in Ruby!
The URL is probably a bit of a spoiler.
tl;dr: the naive garbage collector is a real problem.
There's no reason why you can't. As long as there's multimedia support for a language, then it's gamedev material. Heck, a large proportion of one of the Rollercoaster Tycoon games was done by hand in ASM.
While I'm not familiar with a lot of the deep spec work surrounding Ruby, Enterbrain created the game making programs RPG Maker VX and RPG Maker XP that use game scripts based off Ruby: http://www.rpgmakerweb.com/
This was actually my first dive into the language. As most people said, you probably won't get the high performance of other languages, but if you're looking to start a 2D RPG (or other 2D game, really), it's probably one of the most sophisticated game editors out there to help.
Ruby is a nice language, but it's not really for games to be honest. If you don't want to use C++ but want something like Ruby check out Python. For a good Python framework you should check out something like www.cocos2d.org/.
It depends what type of game you are interested in writing. I've used ruby to write AI clients for several games, including Diplomacy, poker, and Lost Cities. I find it's a very friendly language for quickly experimenting with different concepts. On the other hand, I wouldn't want to use it to write my real-time shooter - it just won't have the performance I need.
Your question is too general. Do you want just to write some computer game as a hobby project or do you want to get into indie/professional game development? Will it have graphics? On which platforms is it supposed to run?
In general, Ruby is suitable for hobby projects (BTW my favourite Ruby game is Ruby Warrior) and for the development of web-based games like Farmville. There's even certain demand for such programmers, try to google something like: "ruby programmer social game".
On the other hand, if you want to develop desktop- or mobile-based games with graphics, Ruby is not the best option. Consider:
- Python - very similar to Ruby, better game libraries
Don't expect to write highly-performant, professional, commercial, 3D games with Ruby, but Ruby is a great language to use when learning game development concepts.
Gosu is the most popular (and actively maintained) library for writing 2D games in Ruby. It has an underlying C++ library that it uses to improve performance and interact with the underlying display rendering libraries like OpenGL.
As far as performance goes, the "default" Ruby implementation (MRI) will work fine (I suggest the latest Ruby 2.0 for best performance) but there are alternative implementations that have native threads and alternative garbage collection algorithms such as Rubinius, JRuby, etc. If you're making use of threads, you may want to try Rubinius, otherwise MRI Ruby will work just fine.
I said Python because it has a bigger userbase and more choices when it comes to frameworks/libraries for games development. Its pretty obvious that this person has no experience in games development so it doesn't make sense to me to recommend that they use something like Ruby just because it's possible.
When I work on games I use C++ with Lua, I don't go off and write my game in Visual Basic just because it has media support. I'm sure everyone here has heard someone say certain tools for certain jobs. I'm sure you can hammer a nail with a shoe, but why would you do that when you can use a hammer.