Behind Sprite White Glow Effect

BlitzMax Forums/BlitzMax Programming/Behind Sprite White Glow Effect

Chroma(Posted 2011) [#1]
Hi all. I'm looking to have it so when I have mousehover over a sprite, that there's a white glow behind it. I'd like to do this in realtime because I don't want to have to have a bunch of extra graphics images.

I know the concept would go something like: copy the sprite, paint it white, scale it larger and then set handle to middle...lower the alpha and then maybe blur it a bit.

Anyone able to do something like this?


Chroma(Posted 2011) [#2]
But of course something that would be fast enough for realtime.


ima747(Posted 2011) [#3]
Do you not want to make the extra graphics or do you not want the resource overhead of using the extra graphics?

If you don't mind the overhead then do what you described when loading the graphics to dynamically build the glow graphics as needed...

You could also try generating the picture when the mouse over starts for closer to realtime... depends on your target system performance and how big the pictures are if that would cause a noticeable hit in performance (probably not big enough to care about I'm guessing)

Last edited 2011


Chroma(Posted 2011) [#4]
Slight overhead is ok because it would only be one sprite at a time. I guess scaling it down..grab image and then scaling up would be sufficient for blur.


Czar Flavius(Posted 2011) [#5]
If you have a lot of sprites that are similar in shape eg some square, some round, then you could make some general shapes to use as your glow sprites which aren't 100% pixel perfect.


Chroma(Posted 2011) [#6]
True, most of the sprites are roundish. Good idea, thanks.