I wrote this free book on how to make games with Ruby using the DragonRuby Game Toolkit. As I've been learning the engine, I've felt really inspired by how quickly I can prototype my ideas and release them for all the major platforms. DragonRuby GTK is a really interesting use of mruby and SDL. To see Ruby be used for anything other than Rails is always exciting. I thought maybe this book would nudge others interested in Ruby game dev to take the plunge. Would love any feedback! Thanks.
Thank you for sharing the book, Brett! I definitely need to revisit the SDK which I had from its early versions, but unfortunately it was always lacking something. That was years ago tho.
Brett, thanks for making this book! You've reinvigorated my interest in DragonRuby. I have a pro license that I haven't done much with; a couple jam "games".
I have a question about FLOSS that I haven't seen the answer to floating around. If I want to make a GPLv3 game, release, and sell it, what are the implications with using DragonRuby?
Is the recommended approach to ship the commercial packages with DragonRuby and have an open source variant running with zif[0]?
Any recommendations? Thank you again for the book!
I can definitely help you here! The code you write is yours to license as you please. So you can release the source for your game under GPLv3, you just can't distribute the engine alongside the source. Someone would have to own the engine and use your source alongside it to contribute to your game. You can compile and sell your game as you normally would, of course!
Zif is an open source community library for DragonRuby Game Toolkit that gives you a lot more classes and structure, if you so choose to use it. So it's not an "instead of" but rather a library you can drop into your DragonRuby Game Toolkit game.
While DragonRuby GTK is not FLOSS, your code is your code, and it's built upon mruby, llvm, and SDL, so it's got a really strong FLOSS core. I'm not a license expert tho, so maybe there are more implications than I'm realizing.
While I love Ruby, and love the concept of DragonRuby, it’s a really naive and simple engine.
It’s basically a wrapper around SDL, which means you’ll have to create everything you want in a game engine. But it’s a really good start to understand graphics and game programming..
I’d recommend cocos (2D) if you wanna create a 2D game. It’s very high performance, full features and is supported on almost any platform. You can write in c++, or use JavaScript / lua.
I can understand where you're coming from, but I disagree with the sentiment of it basically being just a wrapper around SDL and naive.
DragonRuby Game Toolkit's API is simple, and that's a good thing! It provides the foundations needed for building any kind of 2D game without introducing dozens of classes, an inheritance tree, or complex data models. With just a few primitive data types and some methods, everything one needs it there. Combine that with the sample code and the community, and there's not a type of 2D game out there that you can't get going with in DRGTK within a couple of hours.
DRGTK does make it easy to render sprites and text and handle input on top of SDL, which is valuable in and of itself. But it's not just direct bindings where you have to look at and understand how SDL works. I've never once had to look at the SDL docs to understand DragonRuby GTK's API. What the engine then gives you is: cross-platform builds with a single command, its simple API, ability to write games in a fantastic language, live reload of your game while developing without needing to recompile, the ability to use the toolchain of your liking, and more.
I'm personally not interested in using C++ to make games, and I think if someone is, they probably wouldn't want to use DragonRuby GTK anyway. But choosing between JS, Lua, or Ruby, I'd choose Ruby every single time. It's a more enjoyable language to use. That to me is a big factor in why I like DRGTK—the toolchain. After spending 10+ years making 2D games as a hobby by experimenting with XNA/MonoGame, Unity, HaxeFlixel, Love2D (Lua), Phaser.js, Gosu (Ruby), C++, and AS3, I really think DragonRuby has a unique combination of offerings that has me so excited about it and wanting to see it succeed.
people behind are SDL guy, and another person that did make successful games on apple. it has a lot of features that other engines, have. so what do I miss here?
does cocos2d is so advanced and better than dragon ruby to build a 2d game?
You can generate builds for desktop operating systems and the web with the basic license. With the web builds, you can host them anywhere on the web since they're static files. But a lot of the community uses Itch.io to share their games.
I released a game in rubymagic back in the day and have kicked the tires on DragonRuby a few times. I love the concept but hate the license.
They give it away for free all the time for game jams, but I think the fact that it’s paid is too big of a barrier for wide adoption. I hope your book does well anyway! It’s a fun piece of tech and it would be a good teaching tool if the engine was free (I’ve been using pixi.js with my kids).
Thanks for the kind words! I appreciate where you're coming from.
My perspective on the license and price is that it's a small team of less than 5 people who work on DragonRuby Game Toolkit. To spend $32 for a lifetime basic license is totally worth it to me for everything that comes with it. The work that's gone into the cross-platform support, designing the API, gluing together mruby and SDL, and more without a doubt is an incredibly compelling offering. I want to see DRGTK sustain itself for the long-term, and I think the team getting paid for helps make that happen.
I've thought about what it'd be like if the basic license was always free... The book is free, so it's a little awkward to then have a reader need to pay to use the software it's about. Sure, maybe more people would use it, but for an engine still in its early days (~3 years isn't that long compared to those that have been around for 10+ years), I think having a slight barrier to entry may benefit the project so it's not flooded by needing to support the flood of people that'd come from an always free version while it grows, stabilizes, and establishes itself.
This is fantastic. I would highly recommend DragonRuby if you like Ruby as a language and would like to dip your toes into 2D game development. The community is very welcoming too.
+1 on the community being kind and welcoming. That to me is a major factor. I've learned so much from the community, and it extends beyond just making game dev. The community organizes jams, monthly game clubs, and supports one another.
I think it may be the opposite with regards to Unity and being time constrained, as there's a lot more to learn with Unity when making games rather than something like DragonRuby Game Toolkit. For a hobby that you have only a little bit of time to dedicate to, I think 2D games in an engine with a simple API would be quite a bit easier. But that's just me!
I love Ruby, but I always wonder if performance will be an issue if there're many things happening on screen especially on mobile. Does anyone has any experience?
My experience with DragonRuby was really poor. I was dismayed how restrictive it was (e.g. with libraries). Images were particularly painful and I was annoyed that the toolkit couldn't dynamically resize them for me (nor could I pull in ImageMagick). Perhaps it was trying to deal with sprite sheets and having to hardcode pixel offsets. Yes, it uses Ruby syntactically, but it doesn't feel like Ruby to me as far as ecosystem and productivity go. This was a few years ago - maybe this has changed. I probably wouldn't give it another go, but I'd love to see something built in DragonRuby hosted online to see what it can do.
Godot, while not perfect, fit my expectations better. I found myself simply using the prebuilt abstractions I was already building by hand in DragonRuby. Things mostly work. When it came time to cross-compile for hosting on itch.io, I was really delighted by how easy it was to get my games in front of people. That quick feedback loop got me hooked for a while.
Godot is pretty good, I wish I had more time to spend with it. DragonRuby reminds me of RubyMotion, the magical framework to write cross-platform apps that was also hopelessly disappointing and over-hyped. A complete waste of my money.
And then I went to check out the DragonRuby and RubyMotion websites and it turns out that DragonRuby IS RubyMotion.
Kudos to the team for building something clever but I'm not falling for that one again.
Thanks for sharing your experiences with the engine. I know what you mean by the ecosystem doesn't feel quite like Ruby—you can't pull in gems from RubyGems.org (but there is a dependency tool called Smaug) and it's not as focused on OO as most Ruby is. But after I spent my first few weeks making games with it, I came to realize lack of a huge dependency tree is a benefit. The engine doesn't have strong opinions on how you code your games, but it gives the tools to do so in a more functional mindset than most Ruby code. The API is data-driven, meaning you can work with just hashes or arrays and methods and get really far with your projects. You can abstract away into classes and modules if you need to.
I think any type of 2D game is possible to build with the engine. But it's up to the community (and time) to make great games with it.
+ just wanna say I'm glad you dig Godot! There are so many game engines and libraries out there, and what matters most is finding one that fits your needs and style well. Because ultimately, what's most important, is that the game gets made, regardless of tech.
[+] [-] brettcodes|3 years ago|reply
[+] [-] dcchuck|3 years ago|reply
I really enjoyed your "Why the Book is Free" section.
[+] [-] vladcodes|3 years ago|reply
[+] [-] Aleksdev|3 years ago|reply
[+] [-] rookderby|3 years ago|reply
I have a question about FLOSS that I haven't seen the answer to floating around. If I want to make a GPLv3 game, release, and sell it, what are the implications with using DragonRuby?
Is the recommended approach to ship the commercial packages with DragonRuby and have an open source variant running with zif[0]?
Any recommendations? Thank you again for the book!
[0] https://github.com/danhealy/dragonruby-zif
[+] [-] brettcodes|3 years ago|reply
Here's an example of one of my games that is released under the Unlicense: https://github.com/brettchalupa/XENO.TEST & https://book.dragonriders.community/source-control.html#a-no... walks through how to do that
Zif is an open source community library for DragonRuby Game Toolkit that gives you a lot more classes and structure, if you so choose to use it. So it's not an "instead of" but rather a library you can drop into your DragonRuby Game Toolkit game.
While DragonRuby GTK is not FLOSS, your code is your code, and it's built upon mruby, llvm, and SDL, so it's got a really strong FLOSS core. I'm not a license expert tho, so maybe there are more implications than I'm realizing.
[+] [-] jbverschoor|3 years ago|reply
It’s basically a wrapper around SDL, which means you’ll have to create everything you want in a game engine. But it’s a really good start to understand graphics and game programming..
I’d recommend cocos (2D) if you wanna create a 2D game. It’s very high performance, full features and is supported on almost any platform. You can write in c++, or use JavaScript / lua.
[+] [-] brettcodes|3 years ago|reply
DragonRuby Game Toolkit's API is simple, and that's a good thing! It provides the foundations needed for building any kind of 2D game without introducing dozens of classes, an inheritance tree, or complex data models. With just a few primitive data types and some methods, everything one needs it there. Combine that with the sample code and the community, and there's not a type of 2D game out there that you can't get going with in DRGTK within a couple of hours.
DRGTK does make it easy to render sprites and text and handle input on top of SDL, which is valuable in and of itself. But it's not just direct bindings where you have to look at and understand how SDL works. I've never once had to look at the SDL docs to understand DragonRuby GTK's API. What the engine then gives you is: cross-platform builds with a single command, its simple API, ability to write games in a fantastic language, live reload of your game while developing without needing to recompile, the ability to use the toolchain of your liking, and more.
I'm personally not interested in using C++ to make games, and I think if someone is, they probably wouldn't want to use DragonRuby GTK anyway. But choosing between JS, Lua, or Ruby, I'd choose Ruby every single time. It's a more enjoyable language to use. That to me is a big factor in why I like DRGTK—the toolchain. After spending 10+ years making 2D games as a hobby by experimenting with XNA/MonoGame, Unity, HaxeFlixel, Love2D (Lua), Phaser.js, Gosu (Ruby), C++, and AS3, I really think DragonRuby has a unique combination of offerings that has me so excited about it and wanting to see it succeed.
[+] [-] claudiug|3 years ago|reply
people behind are SDL guy, and another person that did make successful games on apple. it has a lot of features that other engines, have. so what do I miss here?
does cocos2d is so advanced and better than dragon ruby to build a 2d game?
[+] [-] nomilk|3 years ago|reply
If anyone has examples of games they've made with ruby/DragonRuby, please drop a link, keen to check them out!
[+] [-] brettcodes|3 years ago|reply
I'm actively working on an interactive showcase of DragonRuby games here: https://dragonridersunite.itch.io/dragon-os
Or you can browse games made with it here: https://itch.io/games/made-with-dragonruby-gtk
[+] [-] SimianLogic|3 years ago|reply
They give it away for free all the time for game jams, but I think the fact that it’s paid is too big of a barrier for wide adoption. I hope your book does well anyway! It’s a fun piece of tech and it would be a good teaching tool if the engine was free (I’ve been using pixi.js with my kids).
[+] [-] brettcodes|3 years ago|reply
My perspective on the license and price is that it's a small team of less than 5 people who work on DragonRuby Game Toolkit. To spend $32 for a lifetime basic license is totally worth it to me for everything that comes with it. The work that's gone into the cross-platform support, designing the API, gluing together mruby and SDL, and more without a doubt is an incredibly compelling offering. I want to see DRGTK sustain itself for the long-term, and I think the team getting paid for helps make that happen.
I've thought about what it'd be like if the basic license was always free... The book is free, so it's a little awkward to then have a reader need to pay to use the software it's about. Sure, maybe more people would use it, but for an engine still in its early days (~3 years isn't that long compared to those that have been around for 10+ years), I think having a slight barrier to entry may benefit the project so it's not flooded by needing to support the flood of people that'd come from an always free version while it grows, stabilizes, and establishes itself.
[+] [-] sarchertech|3 years ago|reply
[+] [-] cortesoft|3 years ago|reply
[+] [-] iraliaf|3 years ago|reply
[+] [-] iraliaf|3 years ago|reply
[+] [-] martijn_himself|3 years ago|reply
[+] [-] brettcodes|3 years ago|reply
[+] [-] vishald|3 years ago|reply
[+] [-] brettcodes|3 years ago|reply
[+] [-] acmecorps|3 years ago|reply
[+] [-] jb3689|3 years ago|reply
Godot, while not perfect, fit my expectations better. I found myself simply using the prebuilt abstractions I was already building by hand in DragonRuby. Things mostly work. When it came time to cross-compile for hosting on itch.io, I was really delighted by how easy it was to get my games in front of people. That quick feedback loop got me hooked for a while.
[+] [-] vr46|3 years ago|reply
And then I went to check out the DragonRuby and RubyMotion websites and it turns out that DragonRuby IS RubyMotion.
Kudos to the team for building something clever but I'm not falling for that one again.
[+] [-] pdc56|3 years ago|reply
[+] [-] brettcodes|3 years ago|reply
I'm actively working on an interactive showcase of the samples and open source DragonRuby games here: https://dragonridersunite.itch.io/dragon-os
You can browse more games made with DRGTK here: https://itch.io/games/made-with-dragonruby-gtk
There's also the official samples page, which includes commercial games shipped to Android, iOS, and Switch: https://dragonruby.org/toolkit/game/samples
I think any type of 2D game is possible to build with the engine. But it's up to the community (and time) to make great games with it.
+ just wanna say I'm glad you dig Godot! There are so many game engines and libraries out there, and what matters most is finding one that fits your needs and style well. Because ultimately, what's most important, is that the game gets made, regardless of tech.
[+] [-] weaksauce|3 years ago|reply
[+] [-] stevenwoo|3 years ago|reply
[+] [-] galmactima|3 years ago|reply