Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[XP]Character Shaders

Character Shaders Version: 0.9
By: theory (and misc.)

Introduction

This script does what it says. Allows you to apply shaders to characters. At the moment, it only handles the player. An update, soon, will allow applying shaders to any character. It comes preloaded with a collection of shaders I put together. I can't take credit for the shader designs, simply making them work in RGSS and attaching them to the character. There are 23 shaders included.

Features
  • Soften, Sharpen, Contrast, Negative, Alien, Undead, and many more shaders.
  • Stackable effects- you are not limited to a single shader.
  • Can reset at any time.

Screenshots

727ss1.png

8457ss2.png


Demo

http://www.mediafire.com/file/yzmmdnd2tny/Character Shaders.rar

Instructions

Set $shader to the number of the shader that you would like to use, and call Character_Shader.new()

Compatibility

The only thing modified is Scene_Map and an attr_reader is added to SpriteSet_Map, but this shouldn't interfere with anything.

Credits and Thanks

Glitch - For helping me access the player bitmap
The author of Free Window - I used it in the demo. Can't translate that name...
Random sources of information regarding image filters in Ruby.

Author's Notes

As it stands, if you start exit to title screen, it still keeps the shader active into a different game. Pressing F12 clears it, or just copy the contents of the Reset method into the beginning of Scene_Title.
 
Have you implemented the shading so it can be used in scripts/events? Of are you leaving that to the people who use this script?

Anyway, I'm glad you got this posted. And why am I credited for syntax suggestions? All I did was tell you how to access the character bitmap.

Finally, didn't you also add a line of code to Spriteset_Map, to make the character bitmap accessible? You said that all you modded was Scene_Map.
 
Yeah, silhouhette isn't perfect yet. I'm working on an update that can apply it to any event, as well as a shader pack that uses external images to add a true shader (fire, ice, stone, etc.). I'll see what I can do about fixing shillouette.
 
Fixed the Silhouette shader. Replace shader_sill with this one:
Code:
 

  def shader_sill

    ra = 500

    re = 0 ; gr = 0 ; bl = 0

    for i in 1..(@bitmap.height-1)

      for j in 1..(@bitmap.width-1)                               

        for m in -1..1

          for n in -1..1

            if m != 0 and n != 0 

              a = @bitmap.get_pixel(j+m,i+n)

              re = re + a.red

              gr = gr + a.green

              bl = bl + a.blue

            end  

          end

        end 

        b = @bitmap.get_pixel(j,i) 

        re = (b.red-re/8).abs

        gr = (b.green-gr/8).abs

        bl = (b.blue-bl/8).abs

        @bitmap.set_pixel(j,i,Color.new(0, 0, 0, b.alpha) )

      end   

    end           

  end

 
 
Huh, that's odd. I'm not credited here. I help you figure out how to reload a cached bitmap, and I'm not credited, even mentioned anywhere. But other than that, great work theory :thumb:
 

CERU

Member

I checked with a friend (out of state) and he couldn't open the link either.

Now it's back up and I can access it. Odd. I had downloaded from mediafire this morning (before clicking this link), anyways.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top