Jump to content
  • Advertisement
Sign in to follow this  
draconar

Exploding a vector ship

This topic is 2812 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

Hi, I'm having this idea of playing with vector graphics using HTML5 and the canvas element.

My ideia was to create a vector graphics shooter where, whenever an object is shot, the vertices of the shapes will detach from each other and are going to fly away.

my question is: how do I construct such objects? I was thinking of creating "Entity" objects holding the position of each vertice of its shape and then updating the position after an explosion.

what you think of this approach? is there any other faster/better/bigger way to accomplish it?

thanks in advance!

Share this post


Link to post
Share on other sites
Advertisement
You could try faking it, though getting it to look good depends more on the size of the object on screen. Just remove the ship, spawn a number of line-segment particles based roughly on the number of verticies (maybe more) and send them off in random directions. If the particles move fast enough the player would usually be too distracted to notice the difference. I think this is how Shape Invaders (an amusing flash game that wasted many an hour in high school) did it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!