KleinStudio's avatar

[DLL + SCRIPT] Klein Bitmap Functions

By KleinStudio
8 Favourites
12 Comments
2K Views
Klein Bitmap Functions is a DLL for Pokémon Essentials that will allow to make some bitmap functions fastest that using RGSS.
Some of the functions are experimental and they will be updated often, if you find any glitch or weird thing using my functions, report it.

Download: pokemonfangames.com/script.php…

Functions for bitmaps
- scroll_up(speed): Scroll a bitmap
- scroll_down(speed): Scroll a bitmap
- scroll_left(speed): Scroll a bitmap
- scroll_right(speed): Scroll a bitmap
- to_retro(c1, c2, c3, c4): Repaint the bitmap using only a 4 color pallete, c1 is the darker color, c2 the mid-darker, c3 the mid-brighter and c4 the brighter.
- to_negative: Repaint the bitmap with negative colors
- add_outline(c1, pixelsize): Add a colored outline

Functions for sprites
- set_pattern(pattern, alpha, everyframe=false): This functions will blend a bitmap over the actual one (third Zorua in the preview picture)
- delete_pattern: Delete the klein pattern (if any)

Extra functions
- klein_bitmap_version: Return the version from the DLL
- compare_klein_bitmaps(bitmap1, bitmap2): Return true if the bitmap is exactly the same (dimensions, etc)
- klein_dll(func, send, get): Call a function from the DLL

How to install
1. Copy the KleinBitmap.dll to your game's folder.
2. Copy and paste the KleinBitmapFunctions script above main.
IMAGE DETAILS
Image size
637x480px 26.31 KB
Published:
© 2015 - 2020 KleinStudio
Comments12
anonymous's avatar
Join the community to add your comment. Already a deviant? Log In
Starwolf39YT's avatar
How can you Copy/paste the script in the KBF Script above main. How does that work?
DLPalindrome's avatar
Hey Klein - this is really awesome. Thanks for making this.

I've got some questions:
 - Is this file format, .kpal, your invention? Why are you using it instead of .pal?
 - Is there a way to see what's in individual swatches on the palette? I'd like to view and modify the RGB values without needing to know what colour it is first. It'd be great to be able to access the swatches by index.
kiedisticelixer's avatar
Do you have any tips on recolouring a sprite based on another Pokemon's colour? Basically, storing a Pokémons palette, in order to use to_retro. I'm particularly looking at changing the palette of an egg (see: www.spriters-resource.com/reso… ) for example, although it could be given many more uses, like those emerald randomizers that change palettes, too!
KleinStudio's avatar
Maybe the save_pallete and modify_pallete functions can help you with that (there's an example in the project).
If you want to use to_retro for that you can store all the palletes in arrays or something.
superminijoseph's avatar
Nevermind, I found it lol.
Lexurio's avatar
Where is it?
superminijoseph's avatar
Theres no script in the Download
shiney570's avatar
hey! may i ask what the point of this is? :D i mean most of the stuff is also something RGSS+pokemon essentials has already.so  whats new? :)
KleinStudio's avatar
Are you sure? RGSS has functions for fill with pixels, set pixels and get a color, you can do stuff like this with those functions, but with fps dropping.
For example, for the pattern function (third Zorua), I did that function with only RGSS and I was getting 20 fps, with the DLL the game is working at 40fps since the bitmap is processed with the DLL and not with slows RGSS functions :D
Manuxd789's avatar
Molaría uno para reducir el lag (?) xD Muy buen aporte, voy a probarlo ^^
KleinStudio's avatar
Pues justo te decía lo de esta mañana por eso. Los mapas se van creando según vas avanzando copiando lo tiles necesarios sombre un bitmap con el tamaño de la pantalla y RGSS es lentísimo para funciones con bitmaps. Hacer una funcion como la de cambiar toda una paleta de colores en un sprite con una función externa apenas se nota la bajada de FPS (si es que baja, solo he notado bajadas de 1 fps mientras se ejecuta en un bitmap gigantesco), la misma función la hice en RGSS con get_pixel y set_pixel y me bajaron como 30.
Manuxd789's avatar
Pero éste no hace que bajen los fps D:
anonymous's avatar
Join the community to add your comment. Already a deviant? Log In