I had to code my own animation system for the backgrounds.įirst I made however many different backgrounds I needed for my animation frames, I believe I used a total of 4 backgrounds.
I needed an animated water background for a top down shooter, but there was no ways to make an animated background built in. Backgrounds cannot seem to be simply animated and parallaxed, unless there is some way to do this, but I cannot find an example for it that does not use GIF.
Should I have one object per layer that switches sprites and follows the views while doing the necessary checks? From what I can see, sprites can be tiled horizontally too. The alarm for the day/night will likely rely on checking the system clock every hour or so and will change the sky from tiled blue sky to tiled night sky and add a moon. The Room Start + the image speed alarm (if wind exists anymore) for the trees will read from the save file upon room start and change the trees accordingly. So I'll need to have a controller object that will tell the background what changes have been done to the world. There will also be parallax scrolling with horizontal tiling. There will be trees that, depending on the state of the game, will either have leaves moving with the wind or sit still, or turn red, or lose all leaves, or get covered by snow.