Posted October 16, 2021 by DragonRuby
Version 3.0 is at the release candidate stage! Here is the changelog for the release:
This is a major release of DragonRuby Game Toolkit. It supports Ruby 3.0 language features and contains apis that are anywhere from 30% to 200% faster.
Even though there are breaking changes, the exceptions that may occur should be fairly straightforward to fix. If you need help, come to the DragonRuby Discord Server and we’ll help you upgrade.
Matrix
transforms: The sample app is located at ./samples/99_genre_3d/03_yaw_pitch_roll/
.Struct
: The sample app is located at ./samples/09_performance/01_sprites_as_struct/
.args.outputs
.gtk.benchmark
is a bit more accurate.gtk.docs_benchmark
../exceptions
and ./console_history.txt
under ./logs
.OpenEntity
.[BREAKING] Arithmetic and comparison operations no longer attempt to coerce/infer types. You will receive exceptions because of this. General troubleshooting tips for these exceptions:
backtrace
for Exceptions
that are thrown (come to our Discord if you need help).args.state
have been initialized to a default value.Int/Float
operations to make sure they are operating on variables that have been initialized with a default value.String
operations to make sure they are operating on variables that have been initialized with a default value.Enumerable
operations to make sure they are operating on variables that have been initialized to a default value.
Special thanks to erquint@discord, leviondiscord@discord, and danhealy@discord for continuing to raise debugging concerns with respect to arithmetic/implicit coercion.[SAFE] Ruby 3.0 language features are now available. The new syntax should be compatible with Ruby 2.0.
[SAFE] Except to see anywhere from 20% to 200% boost in performance overall.
[BREAKING] DragonRuby’s “Level 1” Runtime has been updated to mRuby 3.0. This is a major release of DragonRuby Game Toolkit. The breaking changes should be minimal, but unfortunately do exist. Please report issues in our Discord and we will get them resolved right away: http://discord.dragonruby.org (mention @amirrajan).
A special thank you to podo@discord, hiro_r_b@discord, kfischer_okarin@discord, and leviondiscord@discord for troubleshooting.
A full explanation of DragonRuby’s Multilevel Runtime Architecture can be found here. Please read through it so you have a better understanding of how DragonRuby is different than other Ruby runtimes. It’s VERY IMPORTANT to educate yourself on these differentiators. Especially if you find yourself being asked: “Why are you using Ruby to build games? Ruby is slow.”
[SAFE] [DIVERGENT] DragonRuby’s Runtime returns a Float
for integer division (retaining mRuby 2.x behavior).
In mRuby 3.0, 1/2
would return 0 (Int)
. In the DragonRuby Runtime, 1/2
returns 0.5 (Float)
. Use Numeric#idiv
for integer division.
[SAFE] [DIVERGENT] DragonRuby’s Runtime retained rand
generation algorithms from mRuby 2.0.
Incorporating 3.0’s RNG algorithm would have resulted in unnecessary breaking changes that would have invalidated replays of existing games.
[SAFE] [DIVERGENT] Hash
in most cases will not discriminate between Float
and Int
keys (where
the number after the decimal point is 0
).
This was existing mRuby 2.0 behavior and was retained within this major release to avoid unnecessary breaking changes related to key lookup.
args.inputs.mouse.wheel
reports the correct direction on non Mac machines.dragonruby-httpd
works with Chrome.