Archived

This topic is now archived and is closed to further replies.

twkelsey

2D Water Rendering Techniques?

Recommended Posts

Hi, I am getting ready to write a submarine-themed arcade game, and I am searching for some techniques to generate the ocean water in 2D. The player will be presented with a top-down view of his submarine as it travels across the surface of the water (the view will be straight down and not at an angle). This view will be fixed. The current plan is to write the game using 2D methodologies. I would like to achieve a water affect that is pretty to look at, but that does not look too “real”. Ideally, the water would look like the water in the Commandos series of games. Here are some screenshots: http://www.gamespot.com/pc/strategy/commandos2menofcourage/screens.html?page=157 http://www.gamespot.com/pc/strategy/commandos2menofcourage/screens.html?page=185 http://www.gamespot.com/pc/strategy/commandos2menofcourage/screens.html?page=167 Additionally, I will need to add boat wakes and a shore effect - nothing fancy, just a simple outline that indicates shallow water or foam around the beaches. However, at this point, after having spent an entire week fruitlessly trying to dig up articles on 2D water rendering, I would be interested in hearing of ANY known techniques…past present or future…in this area. I played a ton of games in the late 80’s and early 90’s that had simple but nice water effects, before 3D cards were the norm. How the heck did they do it?! So far, the only hints that I have been able to dig up are listed below. However, I can’t find a lot of detail about these: 1) Create a series of pre-rendered “wave” textures using a modeling app like 3DS and animate the water by looping through the textures and mapping them onto the tiles. Someone on these boards mentioned that this is how Commandos was done, but I don’t know if this is the case. 2) Color cycling simulation in 16-bit/32-bit. How would you use color cycling to achieve water animation? 3) Sprite animation. Ditto for sprite animation. 4) Use wave height arrays and ray tracing/refraction as described by Mason McCuskey in his book “Special Effects Game Programming with DirectX”, Chapter 12. Has anyone used this method for creating large bodies of water? Most of the articles that I have found relate to 3D water techniques that are too realistic and costly in terms of computer resources for the type of game that I would like to write…not to mention the math hurts my head If anyone could point me in the direction of some books, articles or any other resources on this topic it would be greatly appreciated. If you can elaborate on any of the techniques that I listed above, that would be great also! Thanks, Tim Kelsey [edited by - twkelsey on January 18, 2004 4:42:27 PM]

Share this post


Link to post
Share on other sites
Heh, the AP beat me to it, I was going to suggest the same thing.

The great thing about that smooth-sharpen method is that it runs in constant time regardless of how many ripples and distortions you''ve got moving across its surface. And since it generates a heightmap you can convert that into a coloured image however you want, so you can use a cartoony palette if you don''t want it to look out of place next to the rest of your game.

It won''t give you shore effects on its own, but you can probably crowbar that in without too much trouble depending on what kind of boudary you want.

Share this post


Link to post
Share on other sites