Game Map Making
I got a problem, not too sure how to go about doing this coding wise.
What i do is load in an image (a strip of multiple images), make it a bufferedImage, Then i paint my Canvas by doing a dbl for loop, getting the subimage, and painting that.
So now, my canvas is composed of a bunch of subimages, that are all bufferedImages.
What i want to do is somehow make one BufferedImage from all the subimages, then just paint that WHOLE larger image onto my canvas. That way, when movement takes place, all i have to do is translate the larger image to make it look like a person is moving.
Currently, my code doesn't do that. It just paints a bunch of little images. How would i create a larger Image, from a bunch of little ones?
[759 byte] By [
huangjda] at [2007-9-28 8:03:09]

if i understand your question correctly.. all you have to do is have.. let's say 20x20 images. You could have an array with numbers for the grid. Let's say if the number in the array is 1, you draw a road image, if its 2, a car image, etc. It would end up looking something like this:
http://smigs.co.uk/skittles/ForestMaze/
Basically, all i want to do is take a bunch of little images, and make one big image from it. That way, all i have to do is translate the image to make a person appear to be moving. I just don't know how to go about doing it code wise.
Thanks for the tip JBanes. i'll look into it.
Particle, im hoping my maps aren't going to be that big. Im not creating a huge map. I know there are other methods, like page flipping, but those seemed too complicated for what I wanted to do.
If it does turn out that it runs outa memory, i'll have to try a different method.
thanks.
> Thanks for the tip JBanes. i'll look into it.
>
> Particle, im hoping my maps aren't going to be that
> big. Im not creating a huge map. I know there are
> other methods, like page flipping, but those seemed
> too complicated for what I wanted to do.
>
> If it does turn out that it runs outa memory, i'll
> have to try a different method.
>
> thanks.
how big is not big?
also, if you want your image to be cached in vram (i.e. an automatic image) it cannot be bigger than the screen size. (an undocumented limitation of Volatile/automatic images)