Bitmap Ex - image library

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
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)



Whirlblur:



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



And textured polygons



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
163
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,846
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,846
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,216
Reaction score
1,078
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

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
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,216
Reaction score
1,078
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

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top