ForgeableSum Posted June 11, 2015 Share Posted June 11, 2015 https://youtu.be/1LDKRRnbAwo This is for my upcoming browser-based RTS game "Feudal Wars." Website: feudalwars.net. Subscribe for dev updates here. The actual water animation was a sinch with masks and Phaser tilesprites. Writing the code for placing the beaches was a real bitch though. I'll write a detailed tutorial on my dev blog if anyone is interested. Quote Link to comment Share on other sites More sharing options...
Tuan Posted June 11, 2015 Share Posted June 11, 2015 Wow, your Dev blog is great. Quote Link to comment Share on other sites More sharing options...
ForgeableSum Posted June 11, 2015 Author Share Posted June 11, 2015 Thanks! Quote Link to comment Share on other sites More sharing options...
ForgeableSum Posted June 12, 2015 Author Share Posted June 12, 2015 I've written an explanation of how the water animation effect was done. Read it here if you're interested. druphoria 1 Quote Link to comment Share on other sites More sharing options...
druphoria Posted June 13, 2015 Share Posted June 13, 2015 Brilliant write-up. I love it. Very clever solution - I had no idea that such an effect could be achieved just by having overlapping tilesprites scrolling in opposite directions. Just to clarify... the entire map is a single giant tilesprite and the ground tiles are simply covering it up? Quote Link to comment Share on other sites More sharing options...
ForgeableSum Posted June 13, 2015 Author Share Posted June 13, 2015 Yup, a single giant tilesprite (or rather, two overlapping). The water is actually on top of the ground layer, invisible until portions become visible by adding masks. I actually had a very complicated system which would add tilesprites to small sections of the map that needed them. But I discovered 5-10 small tilesprites is worse on performance than 1 that covers the whole map. Plus with multiple tilesprites, you have to time the scrolling right so there isn't a seem between the tilesprites. So yeah, one big one was the way to go even for maps that are as big as 10K x 10K. druphoria 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.