Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

DragonRuby Game Toolkit

An intuitive 2D game engine. Fast, xplat, tiny, hot loaded. · By DragonRuby

Can you use existing libraries?

A topic by arabella created Apr 24, 2019 Views: 435 Replies: 2
Viewing posts 1 to 3


I've been looking into the engine, in large part because of the use of Ruby and the livecoding capabilities. I just have a few questions about the way that the engine works that I can't seem to find answers for.

- Is it possible to use existing Ruby libraries/gems?

- Is there anyway to interface with C, so that we can, for example, use existing physics engines? I know that there are ways for Ruby to interface with C, but I'm unclear on whether that functionality is exposed in DragonRuby (for example, I read that requires use a dedicated DragonRuby command).


It seems like the Ruby that's been included is quite stripped down.  No access to `require` / `require_relative` is enabled, etc.  I'm guessing that it's probably based on mRuby, with a _lot_ of features turned off.


It is using mruby at the moment, but all the mruby gems are included (which isn't a massive amount, to be clear). We're going to wire up a more standard require(), but for now $dragon.require('app/myfile.rb') works.

We don't provide access to C (but our intention is to try to supply many reasonable things you would want, callable from Ruby; we take requests!), but for pure Ruby gems, it's possible they could work.