[RGD] DirectX implementation of RGSS3

● ARCHIVED · READ-ONLY
Started by invwindy 20 posts View original ↗
  1. Portrait.png

    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

    Some screenshots
    193532ktdy4za7j83j7rdc.gif
    Map effect

    110334xcktmljk15fpm5fx.gif
    Normal mapping

    093443f48d7gaafla9xal9.gif
    Vision effect using Geometry class

    093524fpk3f3vfpkzpqfr3.gif
    Particle effect (~1000 particles)

    230654m7vvvhorvmotxhx1.png
    1920x1080 map in 60fps
  2. @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.
  3. Kes said:
    @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.
  4. @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. :)
  5. mlogan said:
    @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.
  6. Hi @invwindy, can you clarify something for me? Did you modify the game.exe or created an entirely new game.exe?
  7. Archeia said:
    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.
  8. invwindy said:
    Hi @Archeia . We created a entirely new game.exe. Please ask me if you need any other detailed information.

    Thanks for the clarification! I'll approve this then :)
  9. 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.
  10. Hope this can helps people in need:uswt:
  11. 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?
  12. Kvothe said:
    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.
  13. 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
  14. 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....
  15. TheoAllen said:
    Now I'm not sure if modifying exe is legal hmm....

    It's not a modified game.exe they remade it from scratch.
  16. @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.
  17. 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..
  18. BCj said:
    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.
  19. invwindy said:
    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:
    05c107a24b76733072579ac445d30469.png
    but with your game.exe it looks like:

    2bab6c4d89953d4d9a760434bc9e0de0.png
    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..

    db75ed558a496a0dc148ab5e84ba69ca.gif

    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.

    a2de4b5d6229fd6ec1daca6dafb1ae35.png
  20. @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!