Hi, I need help... How would you scroll on an image, for example, a 400x400 view on a 1000x1000 picture, or, how to scroll any other way.
posted 10 years ago
It depends. If you are wanting to draw just a 'normal' picture (like a JPEG or something), then drawing at negative coordinates might be enough (e.g. drawing at (-100, -100) will show you a section of the picture from (100, 100) to (500, 500). But be aware that on some PCs this kind of drawing (where the image is bigger than the screen) can be VERY slow. Not on all, just certain graphics setups.
If, however, you want background for a 2D game (something like Xevious or many platform games) you will need to look into using a tilemap.