Can we get a solution for Essentials / RPG Maker running poorly in W10?

AlexTCGPro

Rookie
Member
Joined
Jun 2, 2018
Posts
2
Hey guys, hope you don't take the title as a threat or something, my idea is to gather all the information we can to finally solve this problem for good.

Let's see, while testing the game I'm developing I noticed that there was some screen tearing while playing. I edited a lot so I thought maybe I screw something up, but nope, tested it again in vanilla Essentials, nothing changed, same thing happens, then I started testing everything and yes, there is some frameskipping in battle, even when trying the summary of one of my mons I noticed some weird lag, and if I started pressing buttons like crazy it seemed like only half of them where registered at all.

So, I started digging around, and it seems it's a fairly common problem and not something specific to my computer (i7 4710hq, 8GB of Ram, GTX 860m by the way).

I found out that this is due to RPG Maker XP using DirectDraw, which completely changed the way it was handled since Windows 8, so, is not specifically an Essentials or RPG Maker XP problem.

Once I identified the problem I was certain I knew how to fix it, you'll see, there's a pretty known emulator that had the same Direct Draw problem and there was a fix for it! Just adding some specific file named ddraw.dll next to the exe completely fixed everything! No stuttering! No lag! 60 fps!

However... While it worked perfectly with the emulator, it doesn't seem to work at all with RPG Maker XP, I think it may be due to the file having to be specific for each program, or maybe I put it in the wrong folder, or who knows, so I tried a lot of ddraw files I found laying around but I don't think any worked, perhaps there was certain change, I think I noticed with one the screen tearing got less obnoxious but it didn't fixed it completely...

So, that's why I created this thread, had any of you ran into this problem and actually managed to fix it? Or ran into it but failed to fix it? Regardless. Would you like to share your notes?

I tried to load my ddraw file with this code in class Bitmap:

'DDrawFix = Win32API.new('./ddraw.dll', 'DDrawFix', 'pi', '') rescue nil'

I'm not sure if that code is doing anything at all, but I think I'm noticing some difference, but not much, anyone with more knowledge than me can give a hand?
 

Mr. Gela

Discord: theo#7722
Member
Joined
Jul 19, 2015
Posts
188
So, I started digging around, and it seems it's a fairly common problem and not something specific to my compute

Yo, could you share where have you been looking? I'm trying to investigate myself but "rpg maker directdraw" doesn't yield fruitful results. I don't particularly experience this, but a couple of friends do so I'd like to see this fixed, too.
 

Luka S.J.

Wastage of Time
Member
Joined
Mar 27, 2017
Posts
97
1) All you're doing with this chunk of code is creating a object reference to the .dll. You need to .call it at some point, giving it some arguments so that the game can execute a function through the .dll.

2) Idk where you got your code snippet or the .dll from, but none of them actually do anything. The intialization of the .dll fails from the get go, so your DDrawFix is actually nil the whole time, meaning it does nothing (quickly tested this out). So whatever performance improvements you're seeing are imaginary.

A reference to the source material that you've been getting your info from would be nice. (I got the .dll from your PokeComm thread)
 

AlexTCGPro

Rookie
Member
Joined
Jun 2, 2018
Posts
2
Yo, could you share where have you been looking? I'm trying to investigate myself but "rpg maker directdraw" doesn't yield fruitful results. I don't particularly experience this, but a couple of friends do so I'd like to see this fixed, too.

Of course, for code, I just randomly looked for every mention of dll Essentials does, but as pointed out, that didn't do anything, so I'll keep looking, but not everything is gray, I managed to fix something, it was pretty obvious but I didn't notice it at all, so I'll just tell you perhaps it helps: I managed to fix the tearing and somewhat stabilize a little more the fps, it's pretty easy actually, when running your game just press F1 and a new window will appear, there just check the box that says fix tearing. I'm still working on how to get this enabled by default or to make it appear in the Essentials options next to the windows size settings.

1) All you're doing with this chunk of code is creating a object reference to the .dll. You need to .call it at some point, giving it some arguments so that the game can execute a function through the .dll.

2) Idk where you got your code snippet or the .dll from, but none of them actually do anything. The intialization of the .dll fails from the get go, so your DDrawFix is actually nil the whole time, meaning it does nothing (quickly tested this out). So whatever performance improvements you're seeing are imaginary.

A reference to the source material that you've been getting your info from would be nice. (I got the .dll from your PokeComm thread)

Hey Luka, first I want to thank you a lot for what you have done to the community, some of the code you made really inspired me.

I was afraid that would happen, I just took the only .dll mention I found in Essentials and edited it a little. I definitely noticed some improvement, even if was little, but as you said has nothing to do with the .dll, it probably was W10 improving the memory the second time a program is launched, I did many test one after the other so this is probably what happened.

Here's my main source, it worked in the program it was intended to, and some others, I think I said it in the pokecommunity thread: http://www.emucr.com/2014/10/kega-fusion-v364-60fps-fix.html?m=1

Digging around I found that RPG Maker XP does indeed use Direct Draw so I just thought it may work as well there if I just managed to get it loaded. I'm unsure if an specific dll is needed for each program, probably yes, but I was just going to try one after another until I get the best results. I barely understand Ruby, I definitely cannot program in C so I can't work in a custom dll for RPG Maker.
 

Krahssen

Novice
Member
Joined
May 31, 2018
Posts
31
First of all, sorry for my English.
The same thing happens to me. In general the game it work perfectly (35-40 fps), but when I enter the "Options" or "Debug" menu my fps drop (around 1-10 fps). My computer is powerful (i7, 16 gb ram, gtx 1050Ti) and I have very few maps/events that I just started to make the game.

PS: Also, before downloading the "Universal Plugin Installer", The Pokémon battles made my fps drop, however, download UPI fixed it (I don't know why).
 

Lunos

Uruguayan Random User
Member
Joined
Nov 24, 2017
Posts
5
I don't know why am I here or if this is going to help at all it will probably have the opposite effect, but I feel like this could be a hint for the performance issues that Essentials suffers.
Donutwolf said:
Unfortunately for the RGSS game engine Essentials runs on and from what I seen, the graphics is rendered using software-based rendering methods as opposed to using DirectX/OpenGL. So basically, it works under the CPU rather than GPU. As such, there's no effective means of using graphical hardware acceleration.
Source.

If RPGMXP and/or Essentials uses a software-based video renderer, then no wonder it performs poorly just like the games created with it. It's the exact same result that emulators get.
Now, following that same train of thought, I think that writing a DirectX or an OpenGL video renderer is like a pretty huge task, but if someone was up to do it, that could potentially be the first step towards fixing the performance issues.
Or maybe implement an already existing solution from somewhere else, maybe MKXP? How does MKXP deal with that kind of stuff?
It's open source, so maybe porting it and adjusting it to work with Essentials would provide the same benefits?
I'm just throwing some ideas here, please correct me if I'm wrong.
 
Top