Bitmap Ex - image library

● ARCHIVED · READ-ONLY
Started by Tsukihime 14 posts View original ↗
  1. 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.
  2. I'll allow this since this is meant for scripters and the documentation is easily understandable (although 'postaraiz' is very cute).
  3. btw, in the docs, for the horizontal/vertical gauge, "life" refers to how much of the gauge is filled.
  4. Oh wow, I can't wait to play around with this!
  5. 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.
  6. Bird Eater said:
    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)
  7. 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?
  8. I can't look through it right now. Is there the ability to apply a mask to a sprite or bitmap?
  9. Shaz said:
    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
  10. 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.
  11. 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?
  12. Enigmo said:
    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/サポート
  13. Roninator2 said:
    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.