In the last few days I've been futzing around with Bitmap and Sprite stuff, as I really haven't messed with it before. What I'm trying to do is blur just the active actor to simulate closeness to the 'camera' when combined with Falcoa's Zoom Character script. I made a quick mock-up to illustrate what I'm trying to achieve.
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fwww.moofah.com%2Ftemp%2Fmedia%2Fimages%2Fjpeg%2Fmboard%2Fblur-mockup.jpg&hash=021fd4dc4e62ae614cc599bc10bbf91bfa43f4a1)
I've begun working on a script to do it, but I'd like to know if I'm on the right track. Is there an easier way of doing this than what I have? (sloppy alpha code included below; only works on the first actor in a typical 384x256 actor sheet)
Since blurring the entire bitmap causes portions to 'bleed' onto the next animation frame, I was thinking that I would have to copy each frame and blur it separately before combining them all and transferring them to the sheet to be used. I just thought that before I went to all that trouble, I'd see if there was a better way of going about this.
class Game_Character
attr_accessor :ex_char_display_blur
alias ex_char_display_init initialize unless $@
def initialize
ex_char_display_init
@ex_char_display_blur = 0
end
#--------------------------------------------------------------------------
# ยป cd_blur
# $game_player.cd_blur(blur_val)
#
# [blur_val]
# 0 - Blur character bitmap
# 1 - Replace original bitmap
#--------------------------------------------------------------------------
def cd_blur(blur_val)
self.ex_char_display_blur = blur_val
end
end
class Sprite_Character < Sprite_Base
alias ex_char_display_init initialize unless $@
def initialize(*args)
@clone_orig = nil
ex_char_display_init(*args)
end
alias ex_char_display_update update unless $@
def update
ex_char_display_update
case character.ex_char_display_blur
when 1 # Blur
clone_bitmap = self.bitmap.clone
@clone_orig = self.bitmap.clone
clone_bitmap.blur
blarg = Rect.new(0, 0, 96, 128)
self.bitmap.clear_rect(blarg)
self.bitmap.blt(0, 0, clone_bitmap, blarg)
character.ex_char_display_blur = 0
when 2 # Replace Original
blarg = Rect.new(0, 0, 96, 128)
self.bitmap.clear_rect(blarg)
self.bitmap.blt(0, 0, @clone_orig, blarg)
character.ex_char_display_blur = 0
end
end
end
make an event when going up the stairs increasing the player's size then transfer him up stairs , then upstairs make an event to reduce his size and transfering him down
i use this one
#==================================================================#
# #*****************# Zoom char V 0.5 , Falcao script #
# #*** By Falcao ***# allow you to increse the chara size #
# #*****************# making zoom effect. #
# RMVX #
# makerpalace.onlinegoo.com #
#==================================================================#
#-------------------------------------------------------------------
# * Commands
#
# $game_player.zoom(x,y) player zoom command,
# Example. $game_player.zoom(2,2) increase double
#
# $game_map.events[Event ID].zoom(x,y) event zoom command
# Example $game_map.events[1].zoom(2,2) event ID 1 increase double
#
# Note: Zoom support decimals
# Default zoom for each character is "(1,1)"
#--------------------------------------------------------------------
class Game_Character
attr_accessor :zoom_x
attr_accessor :zoom_y
alias falcaozoom_ini initialize
def initialize
falcaozoom_ini
@zoom_x = 1.0
@zoom_y = 1.0
end
def zoom(x,y)
self.zoom_x = x
self.zoom_y = y
end
end
class Sprite_Character < Sprite_Base
alias character_zoom_update update
def update
character_zoom_update
if @zoom_x != @character.zoom_x or
@zoom_y != @character.zoom_y
@zoom_x = @character.zoom_x
@zoom_y = @character.zoom_y
self.zoom_x = @character.zoom_x
self.zoom_y = @character.zoom_y
end
end
end
class Game_Player < Game_Character
def zoom(x,y)
self.zoom_x = x
self.zoom_y = y
end
end
EDIT : Damn i misunderstood what you wanted sorry :(
Hehe, not a problem.
found a script that blurs everything but dont think its what you want ^^
EDIT: you could just make a blured character with GIMP , PAINT, PHOTOSHOP etc... and replace the sprite no?
That's correct. Although, as I'm trying to incorporate MA's Composite Characters / Visual Equipment script, I'll need something that can blur the sprite just before it gets painted onto the screen.