Help - Search - Members - Calendar
Full Version: RGSS Addon
RPG RPG Revolution Forums > Scripting > Script Development and Support > Script Requests
Thallion
Who here thinks that it would be a good idea to add on to the built in RGSS classes such as bitmap. Well, I'm starting doing it. So far I have added in several RGSS2 bitmap functions missing from RGSS.

Functions completed:

Bitmap:
draw_gradient(rectangle, color1, color2, gradient_type[, subtype])
rectangle - rectangle in which to draw gradient
color1, color2 - starting and ending colors
gradient_type:
0 - horizontal, 1 - vertical, 2 - diagonal, 3 - radial
subtype - for diagonal:
0 - top-left to bottom-right, 1 - top-right to bottom-left
- this method is very laggy, especially with anything other than horizontal or vertical
edit - horizontal and vertical don't lag much

draw_circle(rectangle, color[, border, border_size, border_color])
rectange - rectangle in which to draw circle
color - color of the circle
border - whether to draw a border (default false)
border_size - how large the border is (default 0)
border_color - color of the border (default black)
- this method doesn't lag as much as the gradient, but it still lags

blur
- this method only lags a bit compared to the other functions

sharpen
- this method lags a little more than blur

draw_line(x1, y1, x2, y2, color[, width])
x1, y1, x2, y2 - starting and ending coordinates of line
color - color in which to draw the line
width - thickness of the line
- barely any lag

draw_gradient_line(x1, y1, x2, y2, color1, color2[, width])
x1, y1, x2, y2 - starting and ending coordinates of line
color1, color2 - the colors with which to draw the line
width - thickness of the line
- not really any lag

draw_ellipse(rectangle, color[, border, border_size, border_color])
rectange - rectangle in which to draw ellipse
color - color of the ellipse
border - whether to draw a border (default false)
border_size - how large the border is (default 0)
border_color - color of the border (default black)
- this method doesn't lag as much as the gradient, but it still lags

Font:

shadow
set this to true if you want text to have a shadow
note - I modified the Bitmap class as well as font for this

Version 1.0

Link
https://rapidshare.com/files/478662831/test.exe
Tsukihime
How is the performance? If I need to constantly re-draw a gradiant will it bog down the game?
Thallion
QUOTE (Tsukihime @ May 18 2012, 02:49 PM) *
How is the performance? If I need to constantly re-draw a gradiant will it bog down the game?


Note, this method is very laggy, mostly only with diagonal and radial gradients though.
Tsukihime
Do you think you could write them using external DLL's? I've seen a couple devs providing dll's for process intensive computations.
Thallion
QUOTE (Tsukihime @ May 18 2012, 03:34 PM) *
Do you think you could write them using external DLL's? I've seen a couple devs providing dll's for process intensive computations.


I'm not quite sure what you mean. How would you do that?
By the way, what were you planning to do with the gradients?
Tsukihime
I don't know, some people have been releasing dll's with their scripts.

Anyways I wanted to have some changes that were constantly changing gradients on the screen cause it would look cool lol
Thallion
QUOTE (Tsukihime @ May 18 2012, 04:25 PM) *
I don't know, some people have been releasing dll's with their scripts.

Anyways I wanted to have some changes that were constantly changing gradients on the screen cause it would look cool lol

I'll try to see how well something like that runs. I warn you, though, I don't think it'll work.

Edit: It didn't run as slow as I thought it would, but it wouldn't work to have it constantly changing.
Thallion
I tried it with a horizontal gradient, and it worked!
I'll try to make a cool gradient effect for you, and post a screenshot of it.
Tsukihime
Hmm it's fine if it doesn't work. At least we have more bitmap options smile.gif
Thallion
Tsukihime, I finished the gradient bar. I sort of assumed that it was for a health bar, so right now I have a health bar on the map. The gradient is constantly changing and everything. Enjoy! Here's a link to the demo. Ignore the other characters in it, it's just a test project for me to try out scripts.

https://rapidshare.com/files/478662831/test.exe
Tsukihime
Wow that's really cool haha nice work.
And performance doesn't seem that bad either.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.