I was thinking about this as a potential thing for my game. As the player enters a new passage, the image could change to signify a new location or scenario. Specifically, a second will pass and the image will fade in and slowly move from side to side. If the player clicks over to another passage where there's supposed to be an image change, the previous image will fade out and the next will fade in.
Is this possible? Can it be possible? Only time will tell!
Comments
I guess that you could set a variable for each passage (I do this anyway) that got passed to a JavaScript script that changed the class/ID of the <body> tag and reloaded the page. Then you could load a new bg image per passage. It was more than I wanted to get into at this point though.
Another way might be to add a <div> with a unique class/ID to each passage that was styled to fill the entire <body> space. Then, per passage, you could change the background image of the <div>.
I’d love to know if there’s an easier way.
You'll also need some basic knowledge of website animation.
Basically you have multiple background images loaded but only the current one is visible, then you use some javascript to change which one is visible.
Demo 3 is even closer to what I'm looking for, but the other demos are useful as well. Now all that's left is to figure out the slow movement.