Log In  

Cart #22119 | 2016-06-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

I looked into animating static background elements using different sprites and came up with this cart.

Has anyone else tried to animate the background this way (that is without parallax scrolling, just animating some background sprites)? If so what approach would you recommend?

P#22121 2016-06-02 17:58 ( Edited 2016-06-03 21:12)

In the game I'm currently working on, I'm using palette shifting for two-frame animated tiles. This method is limited by the number of colors, number of frames, and the change from one frame to the next. For example, I have a four-color sprite where all pixels of three colors change from one frame to the next. This requires seven colors to represent in one sprite. I also have some sprites with three colors but not all of the pixels change from one frame to the next. These also require seven colors to represent in one sprite. This doesn't make a lot of sense explained verbally, so the visuals in my devlog might make it more clear.

This method would definitely work for the clouds in your example. I believe they would need nine colors to represent the three-frame animation in one sprite. The complexity of the animation is limited by the number of colors available to represent it, which is 16. The flowers are probably too complex because each frame is already using five colors.

P#22176 2016-06-03 10:48 ( Edited 2016-06-03 14:48)
:: edo999

Ah yes! I remember reading about this technique before. That's a really good use case for it.
Do you use any specific tool to compose/decompose your sprites? Doing it manually for non-trivial animations sounds like a nightmare. That would be really cool to have a helper tool to calculate the limitations (given the number of colours, number of frames...) and make the creation of such animations easier.

P#22190 2016-06-03 17:12 ( Edited 2016-06-03 21:12)

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2021-03-07 14:44 | 0.016s | 2097k | Q:28