Mini Map?

Im trying to make a mini map that is simply the graphics page I am drawing on scaled down to a certain part of the screen, obviously leaving the full image up. It is just going to show the parts of the graphics page that are drawn off screen. I can seem to figure it out though. I am using slick so you all know. If i wasn’t using slick, I’d be able to do it as I’ve done it before, but the graphics and images in slick seem to be much different to increase speed, but its screwing me up -.-

Basically what I tried to do was create an image, and a graphics page, set the image and graphics to be identical, so whenever I draw on the graphics, it sends it to the image (graphics = image.getGraphics()) and then just draw the game to the graphics page, and draw the image to the screen, and draw the image again, but smaller on the gui. Any help is much appreciated.

I would probably render twice, once for the main play area and once for the minimap. No fancy image buffers, just draw to the screen. Depending on your map size (probably large, since you want a minimap), you probably want to draw a lot less on the minimap anyway.

In short, you need two images, one that has the static background, and another that has the static background merged with the active game objects.

The static background image is only generated once, it contains the terrain of your map.
The merged image is generated every 500 milliseconds or so, you don’ t need to do it real-time. Here you simply draw all the game objects you wish to show on the minimap, most commonly just a filled rectangle.

This is quite easy to do.

In slick you can easily create a Image and get it’s graphics context to draw to, e.g.:

Image img = new Image(200,200);
Graphics g = img.getGraphics();
g.setColor(Color.red);
g.fillRect(0,0,200,200);
g.flush();
img.draw();