Not logged inGosu Forums
Forum back to Help Search Register Login
Up Topic Gosu / Extending Gosu / Sapphire - the ultimate Ruby game programming for Windows
- - By lol_o2 Date 2013-01-06 09:47 Edited 2014-01-22 13:43
I was going to post it a bit later, but I think it's good enough
So, what is it? It may be described as framework and workspace for Ruby/Gosu (game) development
Mainly, it is a packed Ruby interpreter. Packed in one executable, enables to run ruby programs and is compatible with 'Open with' function. It also serves debugging help, catching every exception and waiting patiently until you read it (no more closing cmd).
So you can use Ruby without installing it. What exactly it include:
-Ruby interpreter 1.9.2
-newest Gosu
Also to not make you write in notepad, there's a SciTE packed, configured and ready to use.

But, the most important feature is Game Template. Sapphire can create a template for making games with Gosu. It provides helper classes to start in place with your new game and make developing it even faster. It's features:
-Game state management
-Objects management (in one state)
-Resource management (load images/sounds anywhere and store in memory)
-Global frame counter
-Single-button-press in Update and Draw (something like Window.button_down(id))
-Bitmap font
-Music with intro - can play a beginning part of music once and then loop the actual part
-Collision classes
-Simple lighting effects
-Custom fade effects like in RPG Maker XP

It also provides some simple effect/utility classes, like Particle,Trail and Timer
AND, there's an integrated GUI, which allows you to make:
-Movable windows
-Buttons, checkboxes
-Dropdown boxes, zip bars
-Radio selection, numeric input
-And the best: Textbox with mouse control (selecting etc.)

Brilliant, isn't it? And everything in one, single executable.
Download here:
And also there's a GitHub source:

Now provided with examples for Template.

So now try, comment, report, request
Parent - - By erisdiscord Date 2013-01-06 16:19
You should put this on GitHub! It's free.

Also, the Ruby parts seem like they would be generally useful outside of the Windows world. Consider making that a separate project so Mac and Linux can play too? C:
Parent - By lol_o2 Date 2013-01-06 18:35
There's no much to do with changing for other systems. Just download the zip and call something like in included batch file. Only incompatible thing would be SciTE.
Parent - By Spooner Date 2013-01-06 23:47
I couldn't agree more. The ruby library (presumably being equivalent to something like Chingu + Fidgit since it manages game and gui) should be a completely separate gem (and thus just be an included gem rather than something hard-wired into the exe.
Parent - By Spooner Date 2013-01-06 23:45
I'd recommend Ruby 1.9.3 over 1.9.2 since it is the current stable version. Most relevantly, it loads up Ruby apps considerably faster on Windows -  at least a second faster for my stuff.

I'd also recommend packaging with opengl over a non-standard version of the ruby-opengl gem.
Parent - - By jlnr (dev) Date 2013-01-07 02:36
^ what everybody else said :)

Also, I think it would be great if you could make it get along with Spooner's releasy and even ashton (for shaders).

> -Single-button-press in Update and Draw

What is this?
Parent - - By BlueScope Date 2013-01-07 12:32
As for the single button press, I suppose he might be talking about something similar to the button_down?() method, however only for a single keystroke. This is the way the RPG Maker series handles input, btw.
Parent - - By lol_o2 Date 2013-01-07 14:28
Yes, I've meant that. Didn't know exactly how to name it :)

To other things:
-I use Ruby 1.9.2, because for me it's faster and it was clearly noticeable while I was testing 1.9.3. Didn't try the newest release though
-The project was first to be only a stand-alone Ruby interpreter to run my programs in school. The current state evolved from my different projects, but it was always meant to be for Windows. I don't know if I make a gem or any release for other systems, but project is 'open-source' so feel free to distribute it as you want
-As for GitHub, I pushed there one project. It was a terrible experience with the cmd interface (or I missed something?) and I may be too lazy to repeat it :)   I know there's some integration with system, but I don't want to mess with system registry as I wouldn't use GitHub so often
-And I didn't understand the 'packaging with opengl over a non-standard...' part :|
Parent - - By erisdiscord Date 2013-01-07 19:29
There's a GitHub app for Windows that should alleviate the headaches if you don't like the command interface. I haven't used it myself, but the Mac app is excellent. Learning Git is a great idea, though, and you'll thank yourself later. C:
Parent - By lol_o2 Date 2013-01-07 20:15
Thanks for this, it's really good and saved much trouble.
So, here's GitHub source:
I also made some small fixes
Parent - By Spooner Date 2013-01-07 23:06
I have used that github app and found it really good.
- By lol_o2 Date 2014-01-21 19:43
Most important addition are examples, which explain every feature of Template.
Other new things include:
-custom fade effects (require Ahston)
-simple lighting effects (require Ashton)
-Camera class to move screen around
-Sequence class to perform scheduled actions
-some fixes and more comments etc.
Up Topic Gosu / Extending Gosu / Sapphire - the ultimate Ruby game programming for Windows

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill