Hey I am putting an image as my background that is bigger then my applet, but I was wondering how I could make the background appear as if it were moving once i moved far enough over..kind of like mario.
Printable View
Hey I am putting an image as my background that is bigger then my applet, but I was wondering how I could make the background appear as if it were moving once i moved far enough over..kind of like mario.
Just change the coordinates and position the image differently when you redraw it.
g.drawImage()
If the image is started at 0,0 then if you move to the right say 10 units then position the image at -10,0 and it'll look like you've moved.
Going to do some sort of parallax scrolling?
no, i'm trying to create mario again lol
Mario used the concept though, i think. The background scrolls at a different speed than the level.