Outline on scaling characters

Started by Dualnames, Mon 25/10/2010 16:39:42

Previous topic - Next topic

Dualnames

Okay outlining something is fairly possible. Constantly outlining something that changes size and position is what really makes me wonder. I've tried this a lot, but well, I can't accomplish the effect in the way i want it. Perhaps a plugin could do this better, is my guess. Also faster.

Well, I want a black outline on all characters in the screen that will be always around them. I also want that outline to scale. So more like a dynamic outline. Well, that's all. I've tried lots of things but drawing on the surface doesn't have the effect required. Really, I'm stuck.  :'(

I managed to somehow accomplish the effect with a gui and surfaces but it was slow. Slow as hell. And my coding is messy with drawing surfaces and all.

The problem is the exact same that Journey Down had. Great art - looking bad when scaled. Perhaps using Khris module (with bilinear and stuff) would be the better approach instead of outline?
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Knox

For Khris's module, it really does a nice job of scaling sprites with bilinear filter, but if you're going to do it "live" constantly, I think it might be a bit sluggish...but thats only for tests Ive done in 1024x768, so if you have smaller sprites/smaller res game, perhaps it will be faster...
--All that is necessary for evil to triumph is for good men to do nothing.

Calin Leafshade

The problem here is that you cant access the character sprite after its been scaled. So what you need to do is disable scaling on the character and then manually scale the character as a dynamic sprite using the GetScalingAt function.

Then you can go through the sprite line by line, pixel by pixel after its been scaled.

then for a pixel p:

if p is not transparent but p-1 was transparent make p-1 and outline pixel.
or if p is transparent but p-1 was not transparent make p and outline pixel.


Dualnames

#3
The reso is 320x200 so it may be fast, but well okay, gonna try Khris much module first, then see what that brings out.

EDIT: Too slow. The main problem is that even with the outline process, it ends up to slow to render. Even with Calin's stuff :(
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Endres

Maybe You could have luck with the Plugin API? I mean, I think that Allegro tolerates pretty much, because my Plugins aren't as clean as they could be. ;D
But it works very fast and I think there may be some Allegro-Functions that would make your life easier...
I think even if you cannot code very good in C++ it could be a try, couldn't it?

SMF spam blocked by CleanTalk