Lolizlol

Warper
Member
Joined
Oct 13, 2021
Messages
1
Reaction score
0
First Language
English
Primarily Uses
RMMZ
Is there any way I can switch the graphics renderer to DirectX (or is it already DirectX?)
 

MoonBunny

:^)
Veteran
Joined
Oct 4, 2020
Messages
55
Reaction score
61
First Language
English
Primarily Uses
RMMV
From my understanding, you can either render with Canvas or WebGL. Is there a reason you specifically want DirectX?
 

burbigo3

Villager
Member
Joined
Aug 18, 2020
Messages
12
Reaction score
2
First Language
French
Primarily Uses
Other
I usually do this with Canvas
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
966
Reaction score
470
First Language
PT-BR
Primarily Uses
RM2k3
Hello welcome!

Games made with MV, MZ or VN Maker use WebGL because they work inside a Chromium-based WebKit, at least that's what I noticed looking at the console.

DirectX does not support web pages.

DirectX was used from Rm2k to RmVXA, I believe the previous ones didn't.

Remember that after having resurrected the Rm2k3 its renderer was replaced by GDI precisely because of the newer machines:


DirectX stopped in version 9 and has had no further updates, so it will probably not have browser support.
 

ThinkN

Villager
Member
Joined
Aug 11, 2020
Messages
15
Reaction score
18
First Language
English
Primarily Uses
RMMV
This is a fun, complex question.

The short answer is there is no reason to change anything, the system will choose the best renderer on its own.

If you're playing on Windows, your exported games are likely running DirectX by default, albeit in a very indirect way.

For a more in-depth exploration, it's worth reviewing the stack of technology:

  1. RPGMZ games are written in JavaScript
  2. For most graphics (excluding text*), it uses the library PixiJS
  3. PixiJS uses a combination of JavaScript and shaders written in GLSL to interface with an API called WebGL
  4. WebGL is based on OpenGL, a competitor to DirectX
  5. When you run a game, all those lines of code need to be interpreted by an engine and transformed into code that can be understood by your CPU and GPU
  6. RPGMZ games can run in a browser, or if you export it for Windows/Mac/Linux, it runs in a browser-like environment called nwjs
  7. nwjs is made up from components of Chromium (the open-source version of Google's Chrome browser)
  8. The graphical API layer of Chromium is ANGLE
  9. ANGLE translates OpenGL calls to whichever API is supported by the platform it runs on
  10. The default on most Windows machines is to use Direct3D 11, a subset of DirectX

* Chromium also uses ANGLE for its canvas implementation. So even the graphics functions using Canvas instead of WebGL are translated through ANGLE.

Can you change the rendering back-end?

I think so, although I haven't tested this.

nwjs supports most Chromium command line switches via the package.json file.

It looks like the "use-angle" switch accepts these values:
  • d3d9
  • d3d11
  • warp
  • gl
  • gles

So to indicate you want Direct3D as your preferred renderer, you would insert "--use-angle=d3d11" in the "chromium-args" field of your game's package.json file.

Is it worth doing this? No, probably not. But it's fun to learn about the convoluted world of web technology.

Edit notice: I edited a few lines to make it clear I'm focused on the technology of exported games, not on the Maker itself.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,347
Reaction score
8,769
First Language
German
Primarily Uses
RMMV
Another aspect here (and the reason why DirectX was abandoned after VXA) is that DirectX is Windows-Only (or at least was at that time).

You have to ditch DirectX if you want compatibility on non-Windows computers. There have been some implementations to get DirectX simulated on other operating systems, but those are rarely stable because they are rarely done by Microsoft themselves (Microsoft cares only about Windows) and the programmers rarely have the internal access to replicate DirectX completely correct.

So even if you manage to switch your project/game to DirectX it will only result in the deployment to other devices/OS no longer working.
 

Latest Threads

Latest Posts

Latest Profile Posts

Evening humans! How goes the game make?
The anime characters we saw 20 years ago,
still have the same age when we see them now.
Somehow it's strange but also beautiful.
It's like no matter how much we change,
there's certain part of ourselves we can reconnect to when we see them again.
Took a long, long time, way longer than it should to be honest...but I've finally finished the big content update to my demo!
Lots of not good things happening IRL but I'm not gonna let this day end like this. Quote time:
"Success is not final, failure is not fatal: it is the courage to continue that counts." -Winston Churchill

So, keep going, lads. Whatever you do keep going. Until next time.

It's a Spanish devlog don't get scared!. (please)

Forum statistics

Threads
117,240
Messages
1,105,806
Members
153,406
Latest member
CzCreation
Top