Author Topic: Building a custom .dll file to use with RPG Maker...  (Read 3464 times)

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 724
  • LV: 29
    • View Profile
Re: Building a custom .dll file to use with RPG Maker...
« Reply #40 on: July 03, 2016, 11:13:17 AM »
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.)

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19898
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: Building a custom .dll file to use with RPG Maker...
« Reply #41 on: July 03, 2016, 12:16:43 PM »
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      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 724
  • LV: 29
    • View Profile
Re: Building a custom .dll file to use with RPG Maker...
« Reply #42 on: July 05, 2016, 01:46:05 PM »
I havent started trying to incorporate your code yet.

I had one person give me a reply however:

Quote from: coyotecraft
Can'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.)

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19898
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: Building a custom .dll file to use with RPG Maker...
« Reply #43 on: July 05, 2016, 03:11:53 PM »
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      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 724
  • LV: 29
    • View Profile
Re: Building a custom .dll file to use with RPG Maker...
« Reply #44 on: July 06, 2016, 12:44:18 AM »
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.)

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 724
  • LV: 29
    • View Profile
Re: Building a custom .dll file to use with RPG Maker...
« Reply #45 on: August 01, 2016, 01:30:59 AM »
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.)

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Lexima Warrior
  • ****
  • Posts: 2900
  • LV: 365
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: Building a custom .dll file to use with RPG Maker...
« Reply #46 on: August 01, 2016, 02:14:58 AM »
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?



(click to show/hide)
NNID: KK20-CP

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 724
  • LV: 29
    • View Profile
Re: Building a custom .dll file to use with RPG Maker...
« Reply #47 on: August 01, 2016, 03:15:03 AM »
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.)

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Lexima Warrior
  • ****
  • Posts: 2900
  • LV: 365
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: Building a custom .dll file to use with RPG Maker...
« Reply #48 on: August 01, 2016, 08:11:22 AM »
Can you give a demo with the steps to reproduce?



(click to show/hide)
NNID: KK20-CP

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 724
  • LV: 29
    • View Profile
Re: Building a custom .dll file to use with RPG Maker...
« Reply #49 on: August 01, 2016, 02:19:44 PM »
Sure.  PM'd
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.)