Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

kodywilson

2
Posts
3
Following
A member registered Apr 09, 2021

Recent community posts

https://github.com/kodywilson/learn_dragon_ruby

I have instructions for getting started on Linux in that repo. :)

(1 edit)

What platform are you using? Windows, Mac, Linux?

For Linux, one way to do it is to unzip DragonRuby into a directory and then add that to your path.

mkdir ~/bin

unzip dragonruby-gtk-linux-amd64.zip

mv dragonruby-linux-amd64 ~/bin/dragonruby

Then add these lines to your shell config, like in .bashrc or whatever file you use for your shell.

# set PATH to include DragonRuby

if [ -d "$HOME/bin/dragonruby" ] ; then

 export PATH="$HOME/bin/dragonruby:$PATH"

fi

Run this command to update your current shell environment (if using bash):

source ~/.bashrc

Now you can create a new game by just creating a directory structure similar to this:

mkdir -p testy/app

vim testy/run.sh

Add these lines to run.sh

#!/usr/bin/env bash

dragonruby ./

Make run.sh executable:

chmod u+x run.sh

Now create main.rb in the app directory:

vim testy/app/main.rb

Put something like this just to test:

# test game while learning DragonRuby

def tick args

  args.outputs.labels  << [640, 500, 'This is really cool!', 5, 1]

  args.outputs.sprites << [576, 280, 128, 101, 'dragonruby.png']

end

Once you have that done you can run run.sh:

./run.sh

and it will load the game you have in main.rb.

Update main.rb and the game will update in real time!

Hope this helps and have a good one!