How to 'move' viewport across larger area

( Also posted to Java Programming - I erroneously posted this there instead of here - Sorry for the duplication)

Hi,

Small problem I have with regard to having a large 'game world' (such as 5000x5000 pixels), in that I have no idea how to tackle it.

I took a look at the Graphics2D translate method, and although it seems to do what I need, I can't seem to get the clipping rectangle to the same position. I've probably overlooked something really simple - but to be honest I've spent so long looking at the screen now I wouldn't notice anyway!

If anyone has tried this sort of thing in Java before - I'm trying to have my 'craft' stay in the centre of the screen, while the 'map' moves as I do - I'd be really grateful for any advice.

In the meantime, I'll still try searching the forums (although no luck yet), and if I suss it out I'll post a reply to this message.

Cheers,

Tony

[953 byte] By [boltonto] at [2007-9-26 5:48:02]
# 1
Hi there,Use ViewPort's setViewPosition(int,int)..to move across or set the location point of the viewport. I hope I have answered ur question.byeAmit Chhajed
amitforjava at 2007-7-1 14:12:15 > top of Java-index,Security,Cryptography...