Rpg.NETAuthors: ForeverZer0Version: 0.28AType: Managed RGSS APIKey Term: Scripting Tool
IntroductionRpg.NET is an API built using the .NET Framework for both improving performance and enhancing the RPG Maker series (XP, VX, and VXA). Contained within are various functions and classes that extend the ability of RPG Maker in areas such as graphics, audio, and Windows API interop. Included is a Ruby script that is the wrapper around the library, so it can be used as any other script within your game.
FeaturesGraphics
- Lag-Free Particle Engine
- Save Bitmap as *.png, *.jpg, *.bmp, *.gif
- Load Bitmap from *.psd, *.tif
- Get/Set Bitmap Hue
- Get/Set Bitmap Saturation
- Get/Set Bitmap Contrast
- Get/Set Bitmap Brightness
- Get/Set Bitmap Gamma
- Bitmap#draw_text_vertical
- Bitmap#draw_arc
- Bitmap#draw_bezier
- Bitmap#draw_beziers
- Bitmap#draw_closed_curve
- Bitmap#draw_curve
- Bitmap#draw_ellipse
- Bitmap#draw_line
- Bitmap#draw_lines
- Bitmap#draw_polygon
- Bitmap#draw_pie
- Bitmap#fill_closed_curve
- Bitmap#fill_ellipse
- Bitmap#fill_pie
- Bitmap#fill_polygon
- Bitmap#fill_gradient_rect
- Bitmap#fill_gradient_ellipse
- Bitmap#fill_gradient_polygon
- Bitmap#color_mask
- Bitmap Effect - Invert
- Bitmap Effect - Pixelate
- Bitmap Effect - Change RGBA Color Components
- Bitmap Effect - Soften
- Bitmap Effect - Gaussian Blur
- Bitmap Effect - Sharpen (Multiple algorithms)
- Bitmap Effect - Edge-Detect (Multiple algorithms)
- Bitmap Effect - Emboss (Multiple algorithms)
- Bitmap Effect - High Pass
- Bitmap Effect - Grayscale
- Bitmap Effect - Poster Effect
- Bitmap Effect - Bitonal
- Bitmap Effect - Median Filter
- Bitmap Effect - Tint
- Bitmap Effect - Color Balance
- Bitmap Effect - Solarise
Audio
- Get duration of audio files, in milleseconds (*.mid not supported)
- Get duration of audio files, in frames (*.mid not supported)
Utility
- Get RTP Path(s)
- Get Full-Path to Resource File
- Change Window Resolution
- Show/Hide Output Console
- Screenshot Window (with or without window frame)
ScreenshotsOriginal ImageHue: 60
Hue: 120
Hue: 180
Hue: 240
Hue: 300
Saturation: 0
Saturation: 50
Saturation: 100 (Default)
Saturation: 150
Saturation: 200
Brightness: 0
Brightness: 25
Brightness: 50
Brightness: 100 (Default)
Brightness: 150
Brightness: 175
Brightness: 200
Contrast: 1
Contrast: 50
Contrast: 100 (Default)
Contrast: 150
Contrast: 200
Contrast: 250
Contrast: 300
Contrast: 350
Contrast: 400
Gamma: 1
Gamma: 50
Gamma: 100 (Default)
Gamma: 150
Gamma: 200
Gamma: 250
Gamma: 300
Gamma: 350
Gamma: 400
I implemented the methods to calculate kernels for Gaussian Blurs, therefore you are not forced to only use built-in blurs, but can customize them for your own images, specifying the kernel size and weight. Some examples:
Kernel Size: 3, Weight 11.0
Kernel Size: 5, Weight 5.5
Kernel Size: 9, Weight 13.0
Kernel Size: 11, Weight 7.0
A Median Filter can be applied to images in order to achieve image smoothing or image noise reduction. The Median Filter in contrast to most image smoothing methods, to a degree exhibits edge preservation properties. Here are some examples, including grayscaled versions:
Matrix Size: 3
Matrix Size: 5
Matrix Size: 7
Allows you to define the pixel size of a Bitmap, removing detail.
Pixel Size: 2
Pixel Size: 4
Pixel Size: 8
Image Solarisation can be described as a form of Image inversion/colour inversion. A distinction can be made between solarisation and colour inversion when taking into regard threshold values implemented when performing image solarisation.
R:0 G:200 B:32
R:96 G:255 B:255
R:128 G:255 B:192
R:192 G:224 B:64
Allows you to add a tint to a Bitmap by specifying percentage of each color component to increase.
R:0% G:45% B:15%
R:10% G:20% B:30%
R:32% G:64% B:0%
Applies the color balance to the image, using the specified color.
R:0 G:200 B:32
R:96 G:256 B:256
R:128 G:255 B:192
R:192 G:224 B:64
Gets a mask from the specified color and threshold.
R:0 G:0 B:0 A:0, Threshold: 0
R:228 G:83 B:63 A:255, Threshold: 32
R:228 G:167 B:16 A:255, Threshold: 48
Runs a high-pass filter across the Bitmap. Here are examples of both normal and grayscale:
DemoRpg.NET Developer Release Demo (v.0.25)
ScriptInside demo. (v.0.25)
Version 0.28AScriptRpg.NET.dll (701 kB)
InstructionsAs this is not currently a stable release build, I would not suggest using it in a release game at this current time. Although everything within at this time will remain in it, and you can begin to utilize what it has in your game, there are numerous improvements that need to be done,
CompatibilityShould work with RPG Maker XP, VX, and VXA, although testing has only been done with RPG Maker XP. Before final release, all versions will be tested to ensure compatibility.
Requires
Microsoft .NET Framework 3.5. This is standard on Windows 7 and higher operating systems, and USUALLY installed on Windows XP and Vista systems if updated normally. If distributing with your game, I would suggest providing the above link just in case.
Credits and Thanks
- ForeverZer0, for the library and script
- All those on Chaos-Project who have offered ideas on functions to implement, and those who will continue to do so
Author's NotesThere are still quite a few things to implement, I wouldn't even consider this library 1/4 finished at the current time, so please keep that in mind. I have many planned features that have been suggested yet to implement, as well as many others not yet mentioned, such as Input and Audio extensions, Tilemap rewrites to support greater resolutions, and additional Graphic functions. I would appreciate if you have any ideas, to please share them, I am compiling a list, and slowly working through them, this release is simply to show how progress is coming, and to inspire new ideas.
If you encounter any bugs and/or crashes, please report them here in this thread so that they can be addressed. As I stated earlier, testing is currently only being performed on RPG Maker XP, so there may be errors with VX and VXA that I am currently unaware of.
I would like to hear about your experience as far as performance goes with the graphical functions. I have done my best to maintain the highest degree of performance with Bitmap manipulation, using only pointers to unmanaged memory wherever possible. As of right now, the only functions that do not implement this are the hue, saturation, contrast, brightness, and gamma methods, they use a color matrix, but I am in the midst of re-writing them functions to use unmanaged methods, and compare benchmarks.
The particle generators are rather lame at the moment, and only three very basic types currently exist. I was working more on just getting the underlying engine to work and perform efficiently than develop nice effects, but expect more to come in that area in future releases.