4. Dragon Ruby quick overview
It’s closed source, but depend on all open source and will open source if bankrupt.
• https://trello.com/b/lx2oPd6h/public-board (Road map)
• Components
• SDL 2
• mRuby 3
• C-ext
• Author
• Amir Rajan (acquire RubyMotion from Laurent)
• Ryan Gordon
5. Other game engine
From https://news.ycombinator.com/item?id=26719105
• Unreal
• Powerful, but not your
fi
rst game engine
• Unity
• It’s a C# vs Ruby choose.
• Console support only on Unity Pro
• Pico-8
• A bit of too low res, not console supports
• Godot
• Free, but not good console supports
• Cocos Creator (国内)
6. Compare with Processing
The relationship of Processing, P5.js or Scratch
• Processing is an environment/programming language that is meant to make
visual, interactive applications extremely easy to write. It can be used for
everything from teaching children how to code to visualizing scienti
fi
c data.
• Scratch is a high-level block-based visual programming language and
website targeted primarily at children 8–16 as an educational tool for
programming.
• We can learning from those book, further more ruby allow extend C and web
server, which provide more feature set and the same time give same easy
usage feature.
8. Why become a Dragon Rider?
Or why Dragon Ruby as child’s
fi
rst programming language?
• Writing literary instead of graphic (compare with Scratch)
• Scratch is still preliminary step.
• No type notation every where
• Consistent syntax (compare with python)
• Hot-reload
• I ❤ Ruby (personal reason)
14. Learning DragonRuby # 3
static_solids and static_borders also works
# frozen_string_literal: true
def tick(args)
args.outputs.background_color = [63, 63, 63]
args.outputs.debug << [10, 720, "FPS #{args.gtk.current_framerate.round}"].label
if args.inputs.keyboard.key_down.space || args.inputs.mouse.click
args.outputs.static_solids.clear
args.outputs.static_borders.clear
end
return if args.state.tick_count.zero?
args.outputs.static_solids << [args.inputs.mouse.x, args.inputs.mouse.y, 100, 100, rand(255),
rand(255), rand(255)]
args.outputs.static_borders << [args.inputs.mouse.x, args.inputs.mouse.y, 100, 100, rand(255),
rand(255), rand(255)]
end
15. We need git and smaug to Dragon Rider
Create games and share packages with the DragonRuby community
• Installation step see https://smaug.dev
┌─[ 1:53PM][git]
└─▪ smaug dragonruby list
* DragonRuby Pro 2.26
* DragonRuby 2.26
* DragonRuby 3.0
* DragonRuby Pro 3.0
Thanks for using Smaug!
📦 Explore the package registry at https://smaug.dev/
🦗 Find a bug? File an issue: https://github.com/ereborstudios/smaug/issues
🙋 Have a question? Start a discussion: https://github.com/ereborstudios/smaug/discussions
💬 Want to chat? Join us on Discord: https://discord.gg/rwT64EtDee
16. Now we write a Calculator
It’s not a game still…
17. Snake game with DragonRuby GTK
https://gist.github.com/marcheiligers/173634708371635e257dfba84c39f774
18. Now we need read the 1.6M HTML manual
Good news is it’s all o
ffi
cial documents, no more.
• Visit http://docs.dragonruby.org
• Mirror in China: https://dragonruby.redwoodjs.cn
19. What’s DragonRuby essentially.
Or we still be able to think like children when programming?
• An SDL2 ruby runtime which running in 60 Hz.
• Turn key builds for Windows, MacOS, and Linux with seamless publishing to
Itch.io.
• Targets every platform: PC, Mac, Linux, Web Assembly, iOS, Android,
Nintendo Switch, XBOX One, and PS4 (console compilation requires a
business entity, NDA veri
fi
cation, contact Amir at amir.rajan@dragonruby.org
for more info).
21. What’s new in DragonRuby 3.0
Performance from 30% to 200% faster.
• Rendering 5,000 sprites up to 80,0000, higher than Unity
• Arithmetic and comparison operations no longer attempt to coerce/infer types.
• DragonRuby’s “Level 1” Runtime has been updated to mRuby 3.0.
• DragonRuby Replay (Pro Feature) but mp4 generate in standard.
• VR support (Oculus Quest 2)
• All Screen Mode, HD Mode and Portrait Mode.
• M1 supported
22. More time and FAQ
Flappy dragon, Gorillas Basic and dynamic chart demo