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
53
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
965
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,285
Reaction score
8,736
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


Finally was able to record the rest of the game demo! I added some edits here and there, this is why it takes me so long to do stuff cuz I find a problem and have to fix it asap. x.x
Game: https://dj990j.itch.io/region-of-mythos
Databasing. Just with what I consider "bare minimum", I have listed over 200 skills. That's not all of it, and isn't even considering skills that only 1 class would realistically have. lol

It's a Spanish devlog don't get scared!.
Just read the forum rules just for kicks and rule 14 reminds me of this:
150.jpg
I'm in the process of converting all locks and intimidate/persuade dialogue options into D20 DC based success/fail (modified by player skill). Before, it required a certain flat amount you had to meet, but with rolls, it offers more freedom. For instance, you can repeatedly try to unlock a door instead of just not meeting the requirement to unlock it.

Forum statistics

Threads
117,060
Messages
1,104,191
Members
153,025
Latest member
PHzinho
Top