Rapid Game Prototyping in Ruby
Myth: Ruby is unsuitable for game development. It's much too slow, there are no good libraries and it's too hard to deploy your games written in Ruby.
The truth is, there's nothing stopping you from making games with Ruby. Ruby isn't the next big thing in game development, but it is adequate for most 2D games. While Ruby isn't suitable for implementing something like a complex physics engine, it is suitable for implementing a platformer, shooter or an RPG game.
Ruby is adequate where it counts, and that's all that matters.
This is mostly thanks to Gosu, a 2D graphics, sound and input library for Ruby and C++. Gosu makes things simple, you just create a window, load an image and display it. A handful of lines of code and no hoops to jump through. You can be writing your own simple games in no time. Note that Gosu is also a C++ library, this gives you something to transition to once you're ready to move on from Ruby. C++ is harder to work with, but it's both faster and it will be easier to distribute your final game.
The following articles will give you all of the information to start programming games with Ruby.
Once you're finished with the articles above, you can move on to something a bit more complex. These next articles will give you a better practical explanation of how to make games, rather than simply use the Gosu API.
Finally, these next articles are supplemental. These are odds and ends, neat tricks, techniques, etc that you might want to read, but aren't necessary to know.
The truth is, there's nothing stopping you from making games with Ruby. Ruby isn't the next big thing in game development, but it is adequate for most 2D games. While Ruby isn't suitable for implementing something like a complex physics engine, it is suitable for implementing a platformer, shooter or an RPG game.
Ruby is adequate where it counts, and that's all that matters.
This is mostly thanks to Gosu, a 2D graphics, sound and input library for Ruby and C++. Gosu makes things simple, you just create a window, load an image and display it. A handful of lines of code and no hoops to jump through. You can be writing your own simple games in no time. Note that Gosu is also a C++ library, this gives you something to transition to once you're ready to move on from Ruby. C++ is harder to work with, but it's both faster and it will be easier to distribute your final game.
The following articles will give you all of the information to start programming games with Ruby.
Gosu Basics
- Installing Gosu - How to install Gosu on Window, Linux and OS X.
- Creating a Window - Creating a window and writing a simple reusable framework for making games.
- Loading and Displaying Images with Gosu - One step closer to a real game: loading and displaying images.
- Z-Ordering and Layering - Keep your rendering in order with Z-ordering and layering.
- Mouse and Keyboard Input - A game just isn't a game without being able to control it.
- Fonts and Text
- Time and Animation
- Advanced Sprite Rendering
- Loading and Playing Samples
- Playing Music
Once you're finished with the articles above, you can move on to something a bit more complex. These next articles will give you a better practical explanation of how to make games, rather than simply use the Gosu API.
Game Programming
- Resource Management
- Entities Vs. Sprites
- Collision Detection
- Advanced Collision Detection: Quadtrees
- Realistic Movement: Physics
- Deploying Ruby Games
- Tips on Porting to C++
Finally, these next articles are supplemental. These are odds and ends, neat tricks, techniques, etc that you might want to read, but aren't necessary to know.
Supplementals
- Embedding Images in Gosu Programs - It's not always convenient to distribute your games in Zip files. This articles describes a method to embed images and code into a single ASCII file you can put on a forum or pastebin.
- Smooth Motion: Tweening in Gosu with Ruby - Make smooth animation in your games with tweening, a technique borrowed from Flash and ActionScript.
Source...