Talk:Petit Forest/@comment-9531161-20140215222646

Hey, here's a program which demonstrates animated water for Petit Forest. It's really really simple, and it works for absolutely any tile set, even user generated ones (as long as they put the water in the right place). You won't need to make custom code for each one, just run the code at the right time and everything should be dandy! I purposely added some "noise" when the water animates, because it's literally just moving left and right. It looked weird without the "noise" for the island and volcano sheets, so that's why I added some artifacts to the animation. If you change the LOAD line at the top to the island or volcano sheets, you'll probably see the noise I'm talking about. When you run it as it is, it loads the forest sheet. You can't see the artifacts on this sheet, because the water is almost entirely one shade. If you just run the example as is, you can see the animation in action. The animation is really efficient, so it won't slow the game down. You can change the animation speed by changing the "NFRAMES" value at the top of the program. Larger values = slower animation. You can even set custom values for each sheet if you want; for instance, you can make the lava slower than the regular water. You could make the island water really turbulent!

If you have any questions about it, let me know. You don't have to use this if you don't want to, I just thought it would be cool :)