Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,877
First Language
English
This is an image library from White Flute. I thought it was pretty nice and makes things simple.

Links

Download: http://www.whiteflute.org/wfrgss/?mode=view&realmId=1&pageId=24 ("「 Bitmap-EX ビットマップスクリプト(XP/VX/VXAce)」をダウンロードする" )

Docs: http://www.whiteflute.org/wfrgss/?mode=view&realmId=1&pageId=25

They have a dll to handle the image processing so it should be faster than trying to draw stuff in pure ruby.

Examples

reversing (that's the method name)

uReaH.jpg


Whirlblur:

lijiI.jpg


Usage

To set it up

1: copy the wfbitmap.dll into your game folder

2: replace your Main script with the one provided

3: copy the base and bitmap-ex scripts into your project

The library provides many useful functions for image-related things, such as drawing lines, polygons, and other things.

It also provides a png exporter, as well as support for GIF files (so you can actually have a GIF file playing on your screen). It works, but I'm not sure if it supports every possible GIF format out there. At least, it didn't load the ones I've tested properly (file was loaded, and was playing, but the pixels were off...)

For usage...most of it is just



Code:
your_bitmap.method
Some of them are static methods though



Code:
Bitmap.static_method
Just look at the Bitmap class.

You can draw pac-man

ELAsR.png


And textured polygons

hYhW0.png


See the method signatures in the docs.

It supports Ace, VX, and XP.
 
Last edited by a moderator:

Mr. Bubble

Makes stuff.
Member
Joined
Mar 1, 2012
Messages
853
Reaction score
164
I'll allow this since this is meant for scripters and the documentation is easily understandable (although 'postaraiz' is very cute).
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,877
First Language
English
btw, in the docs, for the horizontal/vertical gauge, "life" refers to how much of the gauge is filled.
 

Monthigos

Tata
Veteran
Joined
Mar 21, 2012
Messages
53
Reaction score
11
First Language
English
Primarily Uses
Oh wow, I can't wait to play around with this!
 

Bird Eater

Boredom is just another thing you want to avoid
Veteran
Joined
Mar 22, 2012
Messages
272
Reaction score
27
First Language
Dutch
Primarily Uses
Wow, it looks amazing, but I don't really get how to work with it...

For example, there's the method horizontal_gauge2, but how do I draw it? Tried in script calls and in scenes, but it doesn't work.

How do you use a function for the entire map or for just one tile/event? If I wanted to use the mosaic function for the map or just for one event, how'd I do that?

I'm not very good at scripting yet, hence why I'd like to know how to use something like this to learn =o.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,877
First Language
English
Wow, it looks amazing, but I don't really get how to work with it...

For example, there's the method horizontal_gauge2, but how do I draw it? Tried in script calls and in scenes, but it doesn't work.

How do you use a function for the entire map or for just one tile/event? If I wanted to use the mosaic function for the map or just for one event, how'd I do that?

I'm not very good at scripting yet, hence why I'd like to know how to use something like this to learn =o.
Typically you need to create a sprite, assign it a bitmap, and then assign that sprite to a particular viewport in the current scene (if it's the map scene, you will need to call it in spriteset_map and then put it in one of the viewports, probably viewport2 or viewport3, or your own).

That is how you deal with most images in RM. Or most game engines I think, since sprites are probably more flexibble and optimized.

I haven't really played around with it so I don't know the best way to change specific things.

For events, you basically need to grab the event's character graphic bitmap and modify it with some effect.

But you will likely need to write some extra methods if you want to change this dynamically (eg: event trigger, etc) without writing too much code in a script box.

I think if you're going to apply an effect to the entire map, you can just apply the effects on the tileset bitmaps before the map sprite starts drawing them, or modify them at run-time. But there's a lot of issues with it due to how the class is written (it constantly updates the bitmaps if they change)
 
Last edited by a moderator:

Kyuukon

主人公
Veteran
Joined
Aug 22, 2013
Messages
2,257
Reaction score
1,119
First Language
Spanish
Primarily Uses
RMMV
OMG! This is such a wonderful script. This should be way more popular D: So useful!

I will ask a stupid question here:

The idea is to draw a pie that keeps track of my current health. We got...

simple_draw_pie(start_x, start_y, end_x, end_y, color, start_angle , sweep_angle, fill, width = 1)​
 ​
I'm not sure what the orange commands stand for. I was looking for a X and Y variable that will let me place the pie in the screen (like in the bitmap.fill_rect() function) but I can't find it how :(

Also, is this formula correct if I wanted to draw the current health?

hp = (((current_hp*100)/@actor.mhp)*Math::pI*2)/100(I take it the function works in radians, right?)

I wish they provided some examples. Help to this n00b :3?

What are the terms for this?
 
Last edited by a moderator:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,462
Reaction score
14,816
First Language
English
Primarily Uses
RMMV
I can't look through it right now. Is there the ability to apply a mask to a sprite or bitmap?
 

Kyuukon

主人公
Veteran
Joined
Aug 22, 2013
Messages
2,257
Reaction score
1,119
First Language
Spanish
Primarily Uses
RMMV
I can't look through it right now. Is there the ability to apply a mask to a sprite or bitmap?
You mean, like a name? I believe so. It works as an extension to the bitmap class.

I was somehow able to figure it out. I just had to play around with mathz (no radians, thank god lol). But seriously, this script is awesome! I'm still not so sure about the terms of usage. If no one knows I can translate them but will have to wait till weekend :E (I'm lazy xD).

Thanks Tsukihime for letting us know about the script! (I'm a bit late xD) I don't think I'd have found it otherwise. Sorry for the necropost :p
 
Last edited by a moderator:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,462
Reaction score
14,816
First Language
English
Primarily Uses
RMMV
a name? Not sure what you're talking about there.


A mask is a separate sprite/bitmap that you "apply" to the original sprite/bitmap to control how much of the original is visible. Imagine a fully black large square, with a transparent circle in the middle. When you apply it to another bitmap as a mask, you can only see what's visible through the circle part - if you move it around, different parts of the original are visible. Like looking through the telescope or something.
 

Enigmo

Villager
Member
Joined
Jul 5, 2019
Messages
16
Reaction score
0
First Language
Bulgarian
Primarily Uses
RMVX
Maybe this is too late, but is there any way I could connect the original author of the script and ask for the source code of the DLL?
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,132
Reaction score
706
First Language
English
Primarily Uses
RMVXA
is there any way I could connect the original author of the script and ask for the source code of the DLL?
Perhaps sending a message to White Flute?
https://www.whiteflute.org/?mode=view&realmName=WFWeb&name=FAQ/サポート
 

Enigmo

Villager
Member
Joined
Jul 5, 2019
Messages
16
Reaction score
0
First Language
Bulgarian
Primarily Uses
RMVX
Perhaps sending a message to White Flute?
https://www.whiteflute.org/?mode=view&realmName=WFWeb&name=FAQ/サポート
Can't seem to find their e-mail anywhere in the website.
 

Latest Threads

Latest Posts

Latest Profile Posts

The full estate map(include 1F,2F,3F and backyard), yes the backyard is a small labyrinth as well as an entrance to a real labyrinth!
Sometimes you Just need to realise someone is beyond help... Still hard to walk away tho :(
100 Horror/Tragedy Sample Maps, Penguin Mech Sprite, & TileD Templates | RPG Maker News #70

Continuing working on abs. So far I have done the workout twice. I am excited to see the results after a couple of weeks. How is everyone doing? :)
MZ: oh boy imma work today
Me, excited: Really?
MZ, doesn't do what I tell It too
Me: I Thought-
MZ: I am Working!

Forum statistics

Threads
112,227
Messages
1,066,701
Members
145,835
Latest member
Silverizer
Top