• Advertisement

Archived

This topic is now archived and is closed to further replies.

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

This topic is 6542 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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...

Share this post


Link to post
Share on other sites
Advertisement
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement