Sign in to follow this  

How to code a Shockwave Effect

This topic is 3860 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

There are various points in my game where it would look cool to have a shockwave. (Like when a building blows up) So right now, I just have: g.setColor(shockWaveColor) g.drawOval(x-radius,y-radius,2*radius,2*radius) where the radius is increasing from '0' and it looks crappy. Can someone describe to me, or link to me, a method of coding a cool looking shockwave? Thanks

Share this post


Link to post
Share on other sites
One fairly easy method is to just draw a single textured quad, which expands over time. You can also color it to be a specific color in-game. The most important part is that you get a texture that shows a circular shape, with some noise and texture in it so that it actually looks interesting.

You can also add particle effects and what have you, to spice things up.

Share this post


Link to post
Share on other sites
Draw a shockwave in a paint program and draw that picture in your game.

That will probably need transparency/alpha blending and maybe scaling, though.

Share this post


Link to post
Share on other sites
I'm not so sure that a single textured quad would look terribly convincing, but it would certainly be much faster than rendering a sphere, provided you're taking advantage of 3D hardware.

Admiral

Share this post


Link to post
Share on other sites

This topic is 3860 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this