This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I have made to games in the form of applets. Basically the game plays on a big Gif image of about 200Kb. The scrolling image is about 4000 by 2000 high and is dragged within the applet. So its quite a big image to down load. What I would like to do is create the image in-game by composting the image from its constituent sprites. What I am trying to say is that can the buffered image be made into a Gif and saved? Is it possible to do that?
I would appreciate anyone taking the time to help me out.
Java does not (yet) support writing gif images due to license problems. There are free libraries available for this thoug: one of them is net.jmge.gif.Gif89Encoder
Check it out and see if it helps you.
I would suggest you have a look at the so called tile based games. Even if your game background is not repetitive like in a stadnard tile based game you can use the aproach to improve performance of your game:
The background image is split into several tiles (probably square shaped images of say 64*64 pixels (usualy a power of 2). If your view is 200 * 200 pixels then you need to show 4 * 4 images at once. Well i guess you get the picture (no pun intended :-)). Check out maps.google.com for an idea how this could work. You will probably find code that does this if you do not want to do it yourself...