Building a custom .dll file to use with RPG Maker...

Started by Heretic86, June 03, 2016, 05:55:07 pm

Previous topic - Next topic

Heretic86

Thank you for the better explanations on Interpolation.

Im now looking at the source for XPA_Window and sort of see what is going on.  Looks like pixel per pixel, if there is a neighbor pixel to the left and / or right (with else ifs), it gets the average for each color value?
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Blizzard

Yes, pretty much. I used several block since there is no need to do bi-linear if one of the factors/ratios (X and Y) is 0 and no lerp at all if both are 0. This speeds things up if you're e.g. stretching only horizontally or if you're stretching by an integer factor.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Heretic86

I havent started trying to incorporate your code yet.

I had one person give me a reply however:

Quote from: coyotecraftCan't play the demo. Missing VCRUNTIME140D.dll


Is this because he doesnt have VC Runtime installed, or possibly because the build I did was in Debug not Release?
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Blizzard

Just take a look at my Visual Studio project properties in XPA_Window. I set stuff up so that no CRT is necessary. And make sure you compile as "Release", not "Debug".
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Heretic86

Learning moar and moar every day.  I think I have this set correctly now...  Using release build without CRT stuff...
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Heretic86

I think I've developed a bit of a Memory Leak...

Im not sure if it is coming from either the DLL, which I doubt, or my Ruby code, which seems more likely.  If I let the game run a while on a map, giving it about an hour or two, the game freezes up.  Only seems to occur when I rotate Bitmaps, I think.  Pain in the ass to find because it takes so damn long.

I have to end up using a lot of Bitmap.new calls, but I avoid at all costs.  I believe every New Temporary Bitmap is disposed of.  Does that help?  What else should I be doing after doing New Bitmaps to make sure I dont end up with a memory leak?

Bitmap.new(args)
bmp.dispose if bmp.is_a?(Bitmap) and not bmp.disposed?

The other big pain is that Im trying to cache as much as possible so I dont have to do Bitmap New as much, or use Clones.  Is there anything else that might be causing a Memory Leak, either in Ruby or C++?
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

KK20

What kind of freeze are we talking here? Was there an error message? Did FPS drop to nothing? Do you have your Task Manager open to Performance and seeing how much memory your game is using?

I also don't get what you're saying. You first say you're avoiding to make a lot of Bitmap.new calls and disposing the bitmap, but then you say you're caching as much as possible. So...what ARE you disposing?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Heretic86

Some framerate drops, but no error message, just that "... has stopped working" and normally, I'd only be able to close the program, but with Visual C++ installed, I do get the option to debug.  Problem is that is for RPG Maker, not the DLL, and we dont exactly have source code for RPG Maker.  Im mostly just wondering if not disposing of Bitmap New when assigned to a Local Variable in Ruby will be properly disposed of, even between methods...  Or at least best practices.  Im trying everything I can think of, Graphics.frame_reset, GC.start, etc.  Garbage Collection seems to help a lot with framerates, but still getting crashes.
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

KK20

Can you give a demo with the steps to reproduce?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Heretic86

Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)