Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Red-Menace

6
Posts
A member registered May 06, 2019

Recent community posts

DragonRuby GTK expects its resources to be in the main toolchain folder, but your project folder(s) can be wherever and have whatever layout you want.  Personally, I keep all the projects I’m working on in a single folder in the toolchain folder, and move the changelog, ctags files, docs, and samples to their own archive folders.  Pretty much everything else is used by the build system.

Within a project, the app (with main.rb) and metadata (with game_metadata.txt and icon.png) folders are required, anything else is referenced relative to the project folder and can be named to your liking, e.g. app/my_classes/some_class.rb or sounds/boom.wav.

The default mygame project folder just has a basic "Hello World" app layout.  You can duplicate that as a starting point or create your own layout or template.

(1 edit)

There is also a samples directory in the download that has some examples and Ruby intros.

Just extract the zip file to wherever you want - everything is contained in the extracted directory.

If you are asking how to use it, open the extracted GTK directory in the Terminal, then use ./dragonruby name_of_your_project_directory to build your project (or leave off the project name to use the default mygame project).  I usually create a projects directory in the GTK directory to keep my stuff organized.

Which application?  The main dragonruby folder has the font.ttf file, which is included when building the project.  If you are using macOS, the font file can be added to an existing application’s /Contents/Resources folder.

That is a known bug - the workaround is to use string constants or interpolation.

What I do is move the unzipped dragonruby folder (since it has some invisible stuff) to my development folder and rename it.  From there, the text files and the documentation from the mygame project get moved into a documentation folder, and samples are moved into an examples folder.  That pretty much takes care of the non-runtime stuff - other project folders and resources are (re)added to the development folder as needed.

The dragonruby executable will use the mygame folder if you don't provide a name, but you can use any name you want as a parameter.  Previous commands are available in the Terminal history, so it is easy to reuse them.

As for gems, standard RubyGem support can be problematic in any custom Ruby implementation (such as the Game ToolKit and RubyMotion), since they may not have all the classes and/or methods, and often don't include all the shared libraries.  Test and debug gems even more so, since they are mostly expecting the regular MRI Ruby.