You are not logged in.
Pages: 1
I want a filter or script which will redraw the instance sprite,
with an outline like in rotMG game.
Say then I put script in objects draw event:
scrRedrawWithOutline(pixels_width, color, alpha);
or for more advance glow or shadow effect maybe:
scrRedrawWithOutline(pixels_width = 2-3, color, alpha, gradient = true/false);
I assume it must be done with surfaces to protect performance!
Any help will be appreciated.
Offline
I'll see what I can come up with. It won't look as nice and it will be probably be computationally expensive. If a lot of sprites need these effects it might be too much.
The ideal way to achieve the look of Realm of the Mad God is render the effects into the sprites themselves. I suspect that is what they've done. It's something than could easily be done with a Photoshop action and a folder of sprites.
Last edited by xot (2013-10-01 22:54:22)
Abusing forum power since 1986.
Offline
This is actually a pretty complex problem to solve in a way that is easy to use and runs at practical speeds. It's more like an effects engine than just a simple script. Drawing a black outline is not so hard , but the when different colors, alphas, and gradients get involved, it's a different story.
It might be a little easier with a shader, if the sprites were prepared properly. They would have to have empty space around them large enough to accommodate the effect. Also, cropping would have to be disabled for their texture group (a Pro-only feature) or they would need to be marked for 3D which has the same effect but requires they have power-of-two dimensions.
Abusing forum power since 1986.
Offline
a cheap way, but not accurate is to cal d3d_set_fog(1,color,0,0) (fog on) then draw scaled up so it's larger, then call d3d_set_fog(0,color,0,0) (fog off) then draw_self over that.
works for sprites origins centered that dont have compex shshapes
Last edited by icuurd12b42 (2013-10-04 20:17:48)
Offline
Pages: 1