Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Extending Gosu / Metro: A ruby framework for Gosu
- - By burtlo Date 2012-10-28 10:05 Edited 2012-10-28 18:28
I recently found my way to the shores of Gosu. I was pleased to find the ruby tutorial. However, I realized, as many others have, that the initial implementation was not sustainable.

So I set out to create a framework that focused on conventions, cleaner code, and the removal of redundant tasks.

*  I encourage you to install the gem, generate a skeleton game, and run it with the following commands:

    gem install metro
    metro new GAMENAME
    cd GAMENAME
    metro
   
* View or clone Starry Knight. This is a replica of the introductory tutorial built in Metro.

    gem install metro
    git clone https://github.com/burtlo/starry-knight
    cd starry-knight
    metro
   
* View or clone the source code of Metro.

Metro's is roughly two weeks old. The feature set is small in comparison to more mature libraries like Chingu. However, I will continue to expand and refine it. I am open to feedback, suggestions, and feature requests.
Parent - - By lol_o2 Date 2012-10-28 19:08
I'm also making some Gosu framework, but my one is a single Windows executable with packed some gems, game template and SciTE. It's original purpose was to run Ruby programs on Windows (even as 'Open with') without installed Ruby, but now it's like mobile workspace.
I haven't released it officially, but you can check recent version:
http://www.mediafire.com/?qo7i7m4b41t87qj
Parent - By burtlo Date 2012-10-28 23:26
lol_02, while I am interested in seeing the work you created I am not one usually in the habit of downloading an untrusted executable. I would also encourage you to create another thread to solicit feedback for your work.
- - By burtlo Date 2012-11-23 18:41
I have continued development since I originally posted here. Thanks to @Shawn42, @Spooner and others for giving the first few versions a try and giving me feedback.

* The current scene can be reloaded (Ctrl+R) without having to restart the entire game.

> Allowing you to get quick feedback as you tweak and change game parameters. The reloading functionality reloads all of the original game source code so changes which result in errors will cause the game to crash.


* Scenes share events from their parent scenes.

> This allows you define events global to multiple scenes by adding the events to a parent scene class. Similar to how helpers defined in a Rails ApplicationController are passed to all the subclassed controllers.


* Song and Sample supported added

> Added support for Gosu Song and Gosu Sample files to be easily added and played from a scene.


* Model properties now make it easier to store/retrieve various common numeric, position, font, image, and animation properties.

> It's now easy to define an image, animation, or font within code for a model object thanks to properties. The properties also use a global common cache to make it ensure that already created images and animations are reused.

Parent - By ml Date 2013-08-26 23:44
First of all, epic win for the voice of the knight.

I am now going through the code of the Template Game to learn more about Ruby and Gosu. Thanks for this instructive work.

btw, I sometimes have unique issues on my system (Linux - Ubuntu 12.04 32-bit, running on a 7-year-old Intel MacBookPro). When I load up either the Template Game or Starry-Knight, the welcome screen and opening scripts all run great. When I start the game, everything works up until a certain point, and then I get an error.

I tried executing "gem install --version '~> 0.8.8' rb-inotify" and I'm still in the same situation.

In the Template Game I can make it to the point where it says "Hold <- to move left" and then I get a big long error, which ends in:
/TEMPLATE/scenes/game_scene.rb:35:in block in fade_in_and_out'
-- C level backtrace information -------------------------------------------
Segmentation fault (core dumped)

Adding more mystery - I was able to get starry-knight to load correctly, but only one time, and since then it hasn't loaded completely again.

All the other times I tried loading Starry-Knight I have made it to the point where the knight starts talking, and then I get a long error ending in:

/starry-knight/scenes/game_scene.rb:83:in
block in fade_in_and_out'
-- C level backtrace information -------------------------------------------
Segmentation fault (core dumped)

Any suggestion on this would be helpful. And by the way, is it okay if I borrow the knight and his voice in other projects? Very awesome. Same thing for the music. Is it available?
Up Topic Gosu / Extending Gosu / Metro: A ruby framework for Gosu

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill