The 2D game library "DXRuby" for Ruby for Windows has been upgraded to 1.4.7, and now supports the latest Ruby 3.0.0, and finally the 64-bit version of Ruby. However, when using it on Windows 10, I got an error and was impatient, so make a note of the notes.
→ Previous article Notes on using DXRuby 1.4.6 on Windows 10 and how to install it
Since it uses DirectX on Windows, it does not work on macOS and Linux. Other than the Windows environment, there are libraries such as "DXOpal" and "Nyle-canvas" that can be operated with almost the same code as DXRuby (however, they are not completely compatible).
"RubyInstaller for Windows" is convenient for installing Ruby. From DXRuby 1.4.7, it supports 64-bit version Ruby (version written as
" x64 ").
DXRuby doesn't have to be with Devkit (MSYS2).
Due to this, I installed DXRuby, but when I ran it, I got an error and was impatient.
DXRuby uses the Windows
DirectX 9 library. (So it doesn't work except on Windows.)
DirectX 9 is no longer included, so you need to add it yourself.
It is safe to download
d3dx9_40.dll from the official Microsoft site.
DirectX End-User Runtimes (June 2010).
Double-click the downloaded
Specify an appropriate folder and unzip it.
All you need is
d3dx9_40.dll, so search the unzipped folder for the necessary files according to Ruby's 64bit/32bit.
64bit version Ruby (x64);
32bit version Ruby (x86, i386);
d3dx9_40.dll inside, specify an appropriate folder, and unzip it.
d3dx9_40.dll is created in the unzipped folder.
Copy the resulting
d3dx9_40.dll to your Windows folder.
There are two ways to do it.
a) Copy it to the bin folder in the installed Ruby folder.
C: \ Ruby30-x64 \ bin etc.
b) Copy to the Windows program folder.
-In the case of
64bit version d3dx9_40.dll;
C: \ Windows \ System32 folder (this is the
program folder for64bit)
32bit version d3dx9_40.dll;
C: \ Windows \ SysWOW64 folder (this is the
program folder for32bit)
"Access to the target folder is denied Administrator privileges are required to copy to this folder. "
And the panel will appear,
Press to copy.
You can install DXRuby 1.4.7 from RubyGems.
> gem install dxruby
> irb irb(main):001:0> require 'dxruby' => true irb(main):002:0> exit
If it says
true, it's OK!