Scroll without wrapping

SGDK only sub forum

Moderator: Stef

Post Reply
vnsbr
Interested
Posts: 48
Joined: Sun Dec 17, 2017 4:13 pm

Scroll without wrapping

Post by vnsbr » Sat Mar 21, 2020 11:44 am

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

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Scroll without wrapping

Post by Sik » Sat Mar 21, 2020 12:29 pm

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
Sik is pronounced as "seek", not as "sick".

vnsbr
Interested
Posts: 48
Joined: Sun Dec 17, 2017 4:13 pm

Re: Scroll without wrapping

Post by vnsbr » Sun Mar 22, 2020 2:45 pm

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

Post Reply