[java] What image effects are required from game lib?

Started by
5 comments, last by javanerd 24 years, 1 month ago
I''ve just implemented rotating, flipping, mirroring and color replacing of bitmaps in GF. These are implemented as slow, initialization time effects that are meant to save some download time and diskspace (paint one image, rotate it to get rotated copies, replace specific colours to get differently coloured images). What other effects do you think I should implement? I can''t think of anything else at the moment...
-Pasi Keranen
Advertisement
Stretching and skewing are always nice.
Ahh yes, I forgot those. I''ve got the stretching implemented as an "on the fly" thingie, but it would make sense to offer the possibility to do that "off line".

Skewing... Hmm... Any suggestions or better yet API examples how that could be approached (from the game programmers interface point of view). Propably by giving two vectors (one for the "horizontal" and other for the "vertical") that are then used to skew the bitmap?
-Pasi Keranen
One thought is to just allow the function to be passed a transformation matrix. Otherwise passing the basis vectors for the new vector space would be a good approach.
You could add minor filtering like noise, blur and edge finding, Blur would be ideal to make 2D water effects...

Now I''m leaving to well earned vacation.
Noise, blur and edge finding... Okay, those are doable, but again how would the API look for those? There are different noises, different blurring methods, different edge finding methods and all can be configured with various paremeters? Should I just use the Paint Shop Pro approach and define constants like BLUR, BLUR_MORE, GAUSSIAN_BLUR, MOTION_BLUR, SOFTEN, SOFTEN_MORE.

Or should I offer finer grade of control? One way would be to have the user give the filter matrix that is going to be used and define some of the most common matrixes in the EffectSettings class that I have.
-Pasi Keranen
How about making your API pluggable. If making different effects pluggable increases the time to do stuff, then optimize the standard effects. Having everything hard coded from first design kind of seems like a bad idea. Use an interface name Effect. In it put a method that will take an Image and then pop the after-effect image out. Just some ideas...

JoeG
joeG

This topic is closed to new replies.

Advertisement