[RGD] DirectX implementation of RGSS3

That was my point, I can't implement them because those methods aren't even there and they are not called when game loses/gets focus (the onWindowBlur and onWindowFocus methods).
I tried to overwrite these methods to see if they would do anything, but they didn't. Than I tried to alias them, and it says that there are no methods named like that. And that's when I went and printed all method names and found the __blur method in there, and that one works as it should.
But what can I do with that alone? If there isn't a way to undo what I did in that method when the game gets focus again, it's kinda useless, at least for me.

Well, it's not a high priority on my list to use these methods, just wanted to let you know that the documentation on your site shows incorrect information about these methods.

I also tried to clip the mouse with the clip method, but that doesn't seem to work for some reason. All other mouse functions work, but that one just doesn't want to. >.>

And sometimes the game throws an error ("not responding") when I close it with the big red X button on the top right, especially when I toggled full-screen mode on and off. Considering that I already wanted to close it anyway, it's not a big issue, but it is certainly annoying.
Ohh, and the window border's top seems to lose the "Aero" effect after toggling full-screen once (on Windows 7). It loads the default blue-ish, non transparent window border instead of my windows settings.

Thank you. I'll fix the problems then.
---------
update:
window focus in/out fixed
mouse clip fixed
close game crash not fixed yet. "Not responding" means some existing error.
Sorry for the late reply my friends. Next version of RGD is coming up soon and most bugs are fixed.


I have found that the script uses external DLLs to enhance rendering. Some bitmap operations may be included in it (though I'm not sure about that). If so, the rendering method is not supported in RGD because RGD has different memory structure of Bitmap.

Time to test this later, just downloaded the file right now.

I have a question, since its said on the site that this replaced the F1 config menu with an About menu, how will the users be able to change controls? Do we need to add a new way to do it? Also on the base game.exe, if a player changes config in one game.exe, it actually changes the config for all game.exe in his/her computer, so I'd like to know if those changes to the base game.exe would also affect the RGD game.exe.

PS: How did you make the effects on the samples in the OP? Are those included in the default features of RGD or are combination of RGD + other scripts?

EDIT: Tested it just now, works nice though it changed my font somehow. Does it use a different font or font size than the default? The test project doesnt have anything that changes font in any way

Also tested it with my light script, with so much lights added it still gets an FPS drop in the FPS counter (F2) but in-game it still looks wayyyyyyy better than the default. Does the FPS counter doesnt work correctly or is the DX implementation really just made the graphic update better? Coz on default game.exe, when I go like 55 FPS in the counter, the difference is already noticeable.

If a player changes config in one game.exe, the changes will affect RGD, while they cannot be modified in F1 menu here.

The effects in the OP are not the features in one line using event or script. They shows some advantages of RGD which are not available or hard to reach in RGSS. I'm working on a lighting script and am going to publish it in this thread soon.

There are exactly some problems in font rendering in current RGD version. They are solved in the coming update.

I do not know much about frame rate calculating in RGSS but they would be similar to that used in RGD. Maybe some low-level rendering and buffering mechanism used in DirectX enhanced screen effect.

This works really well with our current project. A few questions others have asked.
Is there a recommended way to change the font now? The current default font also adds a space after each apostrophe I've noticed.
Other than that this is really amazing work, thank you for creating it.

The current default font is "黑体(Heiti)", "宋体(Songti)" and "Arial", the first two of which are fonts in simplified Chinese. This is a mistake we made since we have missed "VL Gothic" (we nearly forgot this default font used in VXA because this is not capable for Chinese characters). "VL Gothic" will be added into default font list in the next update.

Do you think it's possible to make fullscreen go much faster?

I'm afraid this is a hard task. When we switch between windowed mode and fullscreen mode, some resources (like render targets in viewports) are released and created again, which may take some time.

That was my point, I can't implement them because those methods aren't even there and they are not called when game loses/gets focus (the onWindowBlur and onWindowFocus methods).
I tried to overwrite these methods to see if they would do anything, but they didn't. Than I tried to alias them, and it says that there are no methods named like that. And that's when I went and printed all method names and found the __blur method in there, and that one works as it should.
But what can I do with that alone? If there isn't a way to undo what I did in that method when the game gets focus again, it's kinda useless, at least for me.

Well, it's not a high priority on my list to use these methods, just wanted to let you know that the documentation on your site shows incorrect information about these methods.

I also tried to clip the mouse with the clip method, but that doesn't seem to work for some reason. All other mouse functions work, but that one just doesn't want to. >.>

And sometimes the game throws an error ("not responding") when I close it with the big red X button on the top right, especially when I toggled full-screen mode on and off. Considering that I already wanted to close it anyway, it's not a big issue, but it is certainly annoying.
Ohh, and the window border's top seems to lose the "Aero" effect after toggling full-screen once (on Windows 7). It loads the default blue-ish, non transparent window border instead of my windows settings.

We have defined some good methods for window focus event and the documentation will be updated then. Game exiting event is removed since we have not found a method that does not block big red X exiting while the game is stucked.

Most problems @Sixth mentioned will be fixed in next update except the sprite waving effect. Implementing a sprite waving outside the rectangular area is a bit complicated. So the sprites will remain waving inside the box in next update.
1.2 update:
  • Added z and w coordinates and shaders for Geometry.
  • Window events of getting and losing focus changed to RGD.focus_in and RGD.focus_out. Removed window close event.
  • Performance optimization.
  • Fixed lots of bugs.
I have also finished a lighting script for RGD. Download link: http://invwindy.mist.so/wp-content/uploads/sites/11/2018/04/RGD_Lighting_Example.zip
Some interesting screenshots:
Spoiler: Screenshots
shadow-min.gif

particle2.gif

particle4.gif
Great version. Thanks for the update.

Do have the option of not pausing the game when minimized?

About the previous version:
Some people were unable to run the client even with DirectX 9 upgraded. Also, on some older computers with no video card, when the game resolution is changed to a value over 800x600, the FPS drops dramatically.

About the new version:
I found the lighting system very interesting, however I noticed a drop of FPS. Look:
As soon as I enter the map the FPS drops to 47
SpiJSvH.png

If I activate some effects, it drops to 38
VffDDmU.png

If the resolution is 800x600, the FPS drops to 30 and the character can barely walk.

@Edit:
I noticed some bugs:
Default:
il2Ogij.png

RGD:
ep7cBPo.png

vjecToz.png
Great version. Thanks for the update.

Do have the option of not pausing the game when minimized?

About the previous version:
Some people were unable to run the client even with DirectX 9 upgraded. Also, on some older computers with no video card, when the game resolution is changed to a value over 800x600, the FPS drops dramatically.

About the new version:
I found the lighting system very interesting, however I noticed a drop of FPS. Look:
As soon as I enter the map the FPS drops to 47
SpiJSvH.png

If I activate some effects, it drops to 38
VffDDmU.png

If the resolution is 800x600, the FPS drops to 30 and the character can barely walk.

@Edit:
I noticed some bugs:
Default:
il2Ogij.png

RGD:
ep7cBPo.png

vjecToz.png

For the first two problems, I'm not sure if it is related with hardware. Some old devices (including CPU and GPU) may suffer from fps drop. You may try disabling region occlusion, which uses more CPU resources than normal lighting effects.
For the map problem, I thought I have fixed it but it is not totally fixed. Thanks for your feedback.

EDIT: Fixed part of tile problem.
Auto tile is still not fixed. It seems that one auto tile may exceed its 32x32 region.

EDIT2: Bug fixed. Publish in next update.

Another problem of incorrect sprite position with mirror and non zero angle has also been solved.
Update:
  • Sep 2, 2018 - 1.2.1
    • Added Controller module to receive XInput(XBOX360) game controller input.
    • Fixed some bugs.
Thanks for the update.

Do have the option of not pausing the game when minimized?
Thanks for the update.

Do have the option of not pausing the game when minimized?
Sorry I have forgotten this function again...
Please wait for the next update.
Just dropped by to say that I tried the mouse clip feature again, but it still doesn't work.
I tried calling the method only once and continuously too, neither of them worked.
This is what I tried:
Code:
Mouse.clip([0,0,Graphics.width,Graphics.height])
According to the documentation on your site, it should look like this, right?

Didn't test the other stuffs yet, but will have some time tomorrow, so gonna check them out too.
Nice to see a controller input feature added. Now you add a keyboard module and all control types are ready to be used. 😀
Just dropped by to say that I tried the mouse clip feature again, but it still doesn't work.
I tried calling the method only once and continuously too, neither of them worked.
This is what I tried:
Code:
Mouse.clip([0,0,Graphics.width,Graphics.height])
According to the documentation on your site, it should look like this, right?

Didn't test the other stuffs yet, but will have some time tomorrow, so gonna check them out too.
Nice to see a controller input feature added. Now you add a keyboard module and all control types are ready to be used. 😀

Please try to use
Code:
Mouse.clip(0,0,Graphics.width,Graphics.height)
(The document is indeed wrong.)
This method can only process 0 or 4 parameters

You can see if it succeeded by its return value.
I'm unable to get past the title screen, everything crashes randomly.
can I PM you a link to a demo so you can take a look?
I'm unable to get past the title screen, everything crashes randomly.
can I PM you a link to a demo so you can take a look?
Sure. Thank you for the demo in advance.
I noticed that the default font has changed, now the text is very compressed:

RGD 1.1:
dE2Gg9B.png


RGD 1.2.1:
ABIvikZ.png


It would be interesting to go back to the previous font, because now it is not possible to read very well.
I noticed that the default font has changed, now the text is very compressed:

RGD 1.1:
dE2Gg9B.png


RGD 1.2.1:
ABIvikZ.png


It would be interesting to go back to the previous font, because now it is not possible to read very well.
I cannot make sure what caused your problem exactly. Please add your text width on draw_text and see if anything goes better. I have changed text compression factor to reach the style of RGSS.
check the map looping while disabled
Spoiler
vNCV2Hs.jpg


GPtFMOS.jpg


KvuXvxa.jpg

also, I'd like to +1 the font issue and tile error
Spoiler
xkliUPk.jpg
the grass should be masked as well.
check the map looping while disabled
Spoiler
vNCV2Hs.jpg


GPtFMOS.jpg


KvuXvxa.jpg

also, I'd like to +1 the font issue and tile error
Spoiler
xkliUPk.jpg
the grass should be masked as well.

Sorry I am not so understand what you mean in the first issue. Can you describe it in a more detailed way?

For the second issue, are you using flash_data in tilemap? If so, I will check it later.
1- the map loops when the option is disabled, in the editor. I get a weird camera offset when using screen-fit maps. Check the validation for it, while moving near the edges.
2- no, although I was planning to. That's GubiD's work (check the demo if you still have it, Sprite_Range class)


I was just coming to correct myself: I fixed the font problem, it must be forced manually, but the game seems to load the correct font as long as it's installed.
@Valentine90, check your font names.


EDIT:
@invwindy check the event priority (above, below, same) against the tile draw order, I just corrected a character being drawn below the grass, it being set to below characters.
1- the map loops when the option is disabled, in the editor. I get a weird camera offset when using screen-fit maps. Check the validation for it, while moving near the edges.
2- no, although I was planning to. That's GubiD's work (check the demo if you still have it, Sprite_Range class)


I was just coming to correct myself: I fixed the font problem, it must be forced manually, but the game seems to load the correct font as long as it's installed.
@Valentine90, check your font names.


EDIT:
@invwindy check the event priority (above, below, same) against the tile draw order, I just corrected a character being drawn below the grass, it being set to below characters.

Thank you. I will check them after I come home.
Love the lightning script.
Just wondering, is it possible to change the x and y position on the lightning? For example, if I use other torches than the default rpg maker ones, it'll look off.
c9820de5a8616c7b4ef41677f1ab8598.png

I want the source to be on the lantern itself.
Love the lightning script.
Just wondering, is it possible to change the x and y position on the lightning? For example, if I use other torches than the default rpg maker ones, it'll look off.
c9820de5a8616c7b4ef41677f1ab8598.png

I want the source to be on the lantern itself.
Your advice is awesome. I'll include it in the script then.

Original thread: https://forums.rpgmakerweb.com/threads/rgd-directx-implementation-of-rgss3.95228/