Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm currently developing a 2D, top-down Windows Phone 7 game involving the surface of a pond. I'm trying to make the surface feel like actual water (as opposed to just a blue background with sprites drawn on top of it), and one of the effects I'm looking into is a sort of aquatic distortion effect. Basically, something similar to the first few seconds of this: http://youtu.be/1BpRsjF7QTM?t=3m17s

Any idea on how to do this in XNA? I'm sure I could figure out how to apply the answer to my particular application, but if it helps, my game involves a lot of ripples and I'd like to specifically distort the areas around and just behind the expanding sprite-based ripples.

Thanks!

share|improve this question
    
Look into HLSL, distortion effects are not complicated to do using a simple pixel shader. The Bloom sample on the XNA site is a good place to start. Also, Aquaria is open source ;) hg.icculus.org/icculus/aquaria/file/deb98b4addea –  arriu May 20 '11 at 0:31
1  
I just noticed that you are targeting the Windows Phone 7, in that case forget my HLSL suggestion (XNA does not give you access to programmable shaders on the phones). Instead, here is the ripple effect code from Aquaria (Line 615): hg.icculus.org/icculus/aquaria/file/deb98b4addea/BBGE/… –  arriu May 20 '11 at 0:42
add comment

1 Answer

Render your scene to a render target.

Render your render target to the screen on a procedurally-generated full-screen mesh with animated vertices or texture coordinates.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.