How to be a dragon rider?
Dragons may be fictional but dragonriders are real in the world of dragonruby.
DragonRuby is a zero dependency, cross platform, Ruby runtime built on top of mRuby, libSDL, and LLVM and DragonRuby Game Toolkit,
gtk
, is a professional grade 2D game engine.
I was drawn into the dragonriders' lair by the dragonruby-classics-jam-gauntlet-edition, which led me to build a game under 2 weekends of ruby programming in gtk.
Here is a quick tour on how to be a dragon rider.
-
Buy/Download the toolkit from https://dragonruby.org/toolkit/game
- I had enrolled into the jam, so I downloaded the toolkit from itch.io
-
Once you unzip the dragonruby zip, your folder structure would look like this
In this folder structure,
- dragonruby is the executable that you run to visualise your game
- mygame folder will be your working directory, where you keep your game files, which gets auto-picked by
dragonruby
- samples folder has all the examples you need. It could even serve as a starting point for your games
-
Click on the
dragonruby
executable and you can see a hello world game. Dont close this window, keep it open- How did this work? As I mentioned,
dragonruby
auto-magically picks the files in the mygame folder
- How did this work? As I mentioned,
-
mygame folder has the following structure
-
Open the main.rb file in the
mygame/app folder
, change “Hello World” to “Hello Universe”, save it -
Switch to the dragonruby window, you should see your universe and voila, you are a dragon rider in 6 steps !!!
The following links and videos can help you delve deeper into dragonruby:
- http://docs.dragonruby.org
- Building Tetris - Part 1
- This is a fast paced, hands-on tutorial that will help you to get to speed in no time.
- Building Tetris - Part 2
- https://wndx.school/p/dragon-ruby-game-toolkit-tutorial
- Havent tried this myself
- https://github.com/kfischer-okarin/roguelike-tutorial-2021
For everything else, http://discord.dragonruby.org is the place to be. Its a thriving community with lot of folks ready to help you around the clock. Without this community, I might have never built my first game in ruby.
Happy coding!!!