Page 1 of 1

Scroll without wrapping

Posted: Sat Mar 21, 2020 11:44 am
by vnsbr
Hi everyone!
Is there a way to scroll without wrapping tha background image?

The effect that i am looking for is that i have a forest background image and depeding in how far the player goes vertically i wanted only to show the background color while scrolling the forest down.

Thanks

Re: Scroll without wrapping

Posted: Sat Mar 21, 2020 12:29 pm
by Sik
You have to keep redrawing the tilemap as the camera scrolls (the tilemap can only hold a chunk of the image, you need to keep drawing in new chunks as it moves around).

EDIT: yes, this goes even for drawing blank tiles :​P

Re: Scroll without wrapping

Posted: Sun Mar 22, 2020 2:45 pm
by vnsbr
thanks Sik! i was hoping there was a trick I could do. I think ill just make the background bigger and paint transparent some tiles, decompression should help. And will use regular scrolling functions for background as well