Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Graphics in Ruby

I've looked all through my book, "Ruby in a Nutshell" by Yukihiro Matsumoto, and nowhere does it tel me how to add a bitmap class... or any other type of graphics stuff... How would I get Ruby to display a graphic?
 

Anonymous

Guest

You're not going to find any of the RGSS classes in a book. -_- They were written specifically for RMXP.

You can find information on the bitmap class in the Help file. A good example of how to use it can be found in the RPG::Weather class (found in the help file) and also in the Window_Item and Window_Skill (drawing icons on the window bitmap).

If you could tell me more specifically what you're trying to do, I could probably be more helpful.
 
If you are attempting to code Ruby outside of RMXP and expect it to work the same, you'll be dissapointed. Its much more raw and gritty. There are a few good graphics libraries out there. Minkoff would be able to tell you better what they are (as he actually used em whereas I just looked at em).

RUDL was a good one, iirc.
 
There are a few Ruby compilers, you can try googling it, although all it does it make the exe and does really nothing substantial.
 
If you want to make cross-platform graphical applications with Ruby, you will need something else than DotNet.

I am not very aware of the capabilities of Ruby in terms of graphical application, as I use it mainly for parsers. However, I know that Ruby comes with the Tk library, a simple cross-platform library, although you probably do not want to use it, as it is a little limited and the applications made with do not look as good as those made with DotNet. You might want to use another library for that reason.

Other cross-platform GUI libraries include wxWidgets, GTK and Qt. It is up to you do determine if their Ruby port is sufficient for your needs though, as, like I said, I do not use Ruby for GUI applications. Note that Qt is a proprietary library and if you use it, you MUST make your application open-source and release it under the GPL. (Although it is hard to do otherwise with Ruby.) Otherwise, you will have to buy a license, which is rediculously expensive. ($4,000.00)

Also, if you want to do multimedia stuff, GUI libraries are usually not fast enough. For that, use the excellent cross-platform multimedia library SDL. I would not suggest that you use it if you are not experienced though, especially on a Linux machine because of how easy it is to crash X-Window.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top