Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

DragonRuby Game Toolkit

An intuitive 2D game engine. Fast, cross-platform, tiny, hot loaded. · By DragonRuby

Can you use existing libraries?

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

Hi,

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).

Thanks!

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.

Developer

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.