C3/Mobile Apps
Today's Challenge: Implement a scrolling background when the background is larger than the screen size.
I used this guys video to learn how to do a scrolling background a while back: youtube.com/watch
If I follow along exactly, it works great, but .... what if I have a screen size of 960x500 and the background is 5000 x 500?
(I'm using extremes, but that's how we learn the crazy stuff.)
Question 1:
How do I scroll a 5000 x 500 background when the screen size is 960 x 500?
Question 2:
How do I switch backgrounds while scrolling?
If the screen size is 960 x 500 and the backgrounds (2 or 3) are 5000 x 500, how do I get bg2.png to scroll after bg1.png?
As always I am using the flappy birds demo as the base of my crazy ideas.
All events that call SCROLLSPEED have been disabled.
The demo c3p with the 5000 x 500 background:
drive.google.com/file/d/1Nf2v8_cO2gOROat8Act7VpH_9Hb0ynco/view
I've tried different code, this is where I left off.
PS
I wish C3 made a daily challenge like this. We would have hundreds of demos, all with different ways of doing the same thing.