[RGD] DirectX implementation of RGSS3

invwindy

Ice Fairy
Veteran
Joined
Apr 9, 2016
Messages
91
Reaction score
101
First Language
Chinese
Primarily Uses
RMVXA


Hi everyone. I'm not sure if it is all right to post on this forum. This project is not a ruby script but a replacement of Game.exe. Because the source code is in a mess, we are not ready to publish the code until we have no time maintaining and updating RGD project. I am not a native English speaker so please tell me if there is any mistake.

RGDirect (RGD) is a partial re-implementation and functional extension of the script system of RPG Maker VX Ace (RMVA), RGSS3. The main purpose of this project is to enhance the rendering efficiency, expansibility and to fix some bugs on original RGSS3.

RGD re-implements graphical classes and modules in RGSS3, Bitmap, Graphics, Viewport, Sprite, Tilemap and Plane, using DirectX9 technique. The performance for drawing maps, images of large size and scaling, rotating sprites of large number with GPU is greatly higher compared to the lag in RGSS3. RGD has a built-in shader interface in Sprites and Viewports which is used for real-time custom effect code. On bitmap operations, besides the operators in RGSS3, RGD implements built-in pixel font option without using external DLLs. In addition, RGD implements mouse input. You may use module Mouse to get mouse position and button status easily. RGD 1.02 added Geometry class to draw triangles on screen, as well as fast drawing layers in Viewport for batch sprites.

This work is completed by Fux2 and me(invwindy). Fux2 completed all the communications between C++ and ruby, and functions on drawing texts. I completed the functions related to D3D rendering. Many thanks to Mayaru for drawing the character and icons of RGD.

If you have any questions or advice, please reply to this post.

More information & download link: http://invwindy.mist.so/archives/290


Map effect


Normal mapping


Vision effect using Geometry class


Particle effect (~1000 particles)


1920x1080 map in 60fps
 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@invwindy Before approving this for public viewing, I wonder if you could clarify something for me.
It sounds as if you have overwritten some of the core parts of the engine, not just the default scripts that you can see in the Script Editor. Is that correct?

You might like to remove your email from the post. That is because this site, like many others, is deep trawled by bots looking for email addresses, and you will be inundated with spam/phishing/malware.
 

invwindy

Ice Fairy
Veteran
Joined
Apr 9, 2016
Messages
91
Reaction score
101
First Language
Chinese
Primarily Uses
RMVXA
@invwindy Before approving this for public viewing, I wonder if you could clarify something for me.
It sounds as if you have overwritten some of the core parts of the engine, not just the default scripts that you can see in the Script Editor. Is that correct?

You might like to remove your email from the post. That is because this site, like many others, is deep trawled by bots looking for email addresses, and you will be inundated with spam/phishing/malware.
It's correct. We replaced some part of the engine. But RGSS30X.dll is not modified.
You may think of this as an extension, because default behaviors of RGSS is not changed, at least from our test on dozens of games and third party scripts (some scripts using address on ruby objects may cause error).
Thank you for reminding me. I have removed may email.
 
Last edited:

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,347
Reaction score
8,532
First Language
English
Primarily Uses
RMMV
@invwindy Can you explain how you replace parts of the engine but not modify the dll? Sorry to seem ignorant but those on staff who really understand this stuff are going to be unavailable to look over this for a while, so the rest of us are trying to determine whether this is okay to approve or not. Thanks for helping us out. :)
 

invwindy

Ice Fairy
Veteran
Joined
Apr 9, 2016
Messages
91
Reaction score
101
First Language
Chinese
Primarily Uses
RMVXA
@invwindy Can you explain how you replace parts of the engine but not modify the dll? Sorry to seem ignorant but those on staff who really understand this stuff are going to be unavailable to look over this for a while, so the rest of us are trying to determine whether this is okay to approve or not. Thanks for helping us out. :)
We redefined Ruby methods in C++, like we do that in Ruby. The methods are defined in runtime.
We used functions from the RGSS dll, some of which are not in the export table. My partner Fux2 found them one by one manually.
 

invwindy

Ice Fairy
Veteran
Joined
Apr 9, 2016
Messages
91
Reaction score
101
First Language
Chinese
Primarily Uses
RMVXA
Hi @invwindy, can you clarify something for me? Did you modify the game.exe or created an entirely new game.exe?
Hi @Archeia . We created a entirely new game.exe. Please ask me if you need any other detailed information.
 
Last edited:

kovak

Silverguard
Veteran
Joined
Apr 3, 2016
Messages
1,263
Reaction score
1,565
First Language
PT - EN
Primarily Uses
RMMV
This is amazing, normal mappin is something that i still miss in RM engines.
And congrats on cleaning up your code, no everybody is that careful.
 

fux2

monokuma
Member
Joined
May 26, 2014
Messages
3
Reaction score
2
First Language
Chinese
Primarily Uses
RMVXA
Hope this can helps people in need:uswt:
 
Last edited:

Kvothe

The Bloodness
Veteran
Joined
Jan 21, 2014
Messages
149
Reaction score
557
First Language
Brazil
Primarily Uses
N/A
Oh! Great work, dude! I hope that this can be finished haha sounds so amazing and wondeful. Are you using the vanilla Win32API to call some functions from your dll?
 

invwindy

Ice Fairy
Veteran
Joined
Apr 9, 2016
Messages
91
Reaction score
101
First Language
Chinese
Primarily Uses
RMVXA
Oh! Great work, dude! I hope that this can be finished haha sounds so amazing and wondeful. Are you using the vanilla Win32API to call some functions from your dll?
In our implementation we called some functions in the RGSS3 dll.
If you are going to use RGD, just download the exe file (I have just edited "Instructions" to "Instructions and Download Link") and replace the original Game.exe. All the additional functions are listed in the document.
 

dsiver144

Peaceful Days Dev
Veteran
Joined
Sep 19, 2013
Messages
263
Reaction score
826
First Language
Vietnamese
Primarily Uses
RMVXA
Finally, this is what I was waiting for. Tested with my project, have some visual bug. But the performance is perfect. Looking for more update from you guys. :D
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,587
Reaction score
6,516
First Language
Indonesian
Primarily Uses
RMVXA
Honestly, with improved rendering on RGSS3 engine, I could've done more than what RGSS3 currently capable. Thanks for this!

Also, this is kinda unrelated with DX, but is it possible to implement sound cache? Apparently one that contribute lag / frameskip is when u load a sound effect. The effect is barely noticeable, but when you're doing it real-time (like if you are making SHUMP game), everytime SE is loaded, it skips frame a bit.

Now I'm not sure if modifying exe is legal hmm....
 

invwindy

Ice Fairy
Veteran
Joined
Apr 9, 2016
Messages
91
Reaction score
101
First Language
Chinese
Primarily Uses
RMVXA
@dsiver144 If your visual bug is out of the list in "compatibility" section, please describe it to me. It would be very helpful if you create a new project and reproduce it using the minimum third-party scripts and game data.
@TheoAllen Sorry we don't have the plan to enhance Audio module at present. I'm not sure if you need this but you may take a look: https://rpg.blue/thread-256937-1-1.html (document: https://www.rubydoc.info/gems/seal; github: https://github.com/zhangsu/seal). This is an audio library in RGSS using OpenAL. I hope it helps your project. And thanks for @Archeia 's explanation. We made a entirely new game.exe.
 

BCj

Veteran
Veteran
Joined
Jun 19, 2014
Messages
1,731
Reaction score
929
First Language
Dutch
Primarily Uses
N/A
Tried to use it for my game but sadly a) it messes up the fonts completely. I don't know where to change it, since it seems to come from the game.exe only.
And b) seems to be uncompatible with parts of Luna Engine. Parts of my UI suddenly turned extremely yellow..
 

invwindy

Ice Fairy
Veteran
Joined
Apr 9, 2016
Messages
91
Reaction score
101
First Language
Chinese
Primarily Uses
RMVXA
Tried to use it for my game but sadly a) it messes up the fonts completely. I don't know where to change it, since it seems to come from the game.exe only.
And b) seems to be uncompatible with parts of Luna Engine. Parts of my UI suddenly turned extremely yellow..
It's hard to find the exact point of different behavior in RGSS and RGD for a complicated project. If you focus on finishing the game first, I recommend you use the original RGSS at present.
Could you tell me what font you are using, and what happened in your game?
Sorry I don't know about Luna Engine. Is the engine using external dll files to handle bitmap operation or creating sprites in different viewports with different blend type? If not. please tell me what happened in your game exactly.
 

BCj

Veteran
Veteran
Joined
Jun 19, 2014
Messages
1,731
Reaction score
929
First Language
Dutch
Primarily Uses
N/A
It's hard to find the exact point of different behavior in RGSS and RGD for a complicated project. If you focus on finishing the game first, I recommend you use the original RGSS at present.
Could you tell me what font you are using, and what happened in your game?
Sorry I don't know about Luna Engine. Is the engine using external dll files to handle bitmap operation or creating sprites in different viewports with different blend type? If not. please tell me what happened in your game exactly.
My font is Calibri. It's supposed to look like this:

but with your game.exe it looks like:


It doesn't happen everywhere, there are scripts that override it. BUT it happens a lot, e.g. in battle my hp nubers are suddenly in this font, while the skill descriptions are not. My item descriptions are fine but my equip screen is a mess. Etcetra.



This is also happening..



I know Luna Engine requires a seperate .dll to run, but I don't know how they handle graphics and such. BUT it only happens on the Status/Equip screen, which both use the same command to copry settings from the main screen. Maybe the issue is there? The rest seems to work fine. I can send you the .dll so you can check. I don't know how to see what's "in" it. My notepad++ won't open it.


Noticed another problem, calculation. But this might be my own fault.

 

invwindy

Ice Fairy
Veteran
Joined
Apr 9, 2016
Messages
91
Reaction score
101
First Language
Chinese
Primarily Uses
RMVXA
@BCj I tried Calibri on my own project. Everything works fine. I believe both of your problems have something to do with Lunar Engine, or the incompatibility between RGD and Lunar Engine somewhere.
Please send me the dll file then I'll ask Fux2 to handle it, which may take a couple of days.
Thank you for the feedback and screenshots!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People3_6 and People3_7 added!

Meteo Chronicles is almost finished!
Always remember kids keep a copy of you email with your download code in it or you will never find it again in your email :kaocry:
Dragon quest IX just released a definitive edition that has a 2D top-down RPG mode for the entire game, AKA you can play the entire game as if it was made for super Nintendo, i WISH i didn't already buy the original version or else I would get this version to get some ideas for my game and honestly the story was tooooo boring for me to play again. Hmm I'm sure somebody will do a lets play in 2D mode on YouTube.

Forum statistics

Threads
105,826
Messages
1,016,756
Members
137,526
Latest member
Nazu
Top