Repo for learning DragonRuby GTK Toolkit
For Linux, one way to do it is to unzip DragonRuby into a common directory and then add that to your path. This will allow you to work on many different games using the same DragonRuby installation.
Download dragonruby-linux-amd64 then run these commands.
mkdir ~/bin
unzip dragonruby-gtk-linux-amd64.zip
mv dragonruby-linux-amd64 ~/bin/dragonrubyAdd these lines to your shell config, like in .bashrc or whatever file you use.
if [ -d "$HOME/bin/dragonruby" ] ; then
export PATH="$HOME/bin/dragonruby:$PATH"
fiRun this command to update your current shell environment (if using bash):
source ~/.bashrcNow you can create a new game by just creating a directory structure similar to this:
mkdir -p testy/app
vim testy/run.shAdd these lines to run.sh
#!/usr/bin/env bash
dragonruby ./Make run.sh executable:
chmod u+x run.shNow create main.rb in the app directory:
vim testy/app/main.rbPut 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']
endOnce you have that done you can run run.sh:
./run.shand 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!