Author Topic: Ideas to create breakable objects  (Read 829 times)

Esti

  • Active Member
  • ***
  • Posts: 104
  • Karma: +0/-0
    • View Profile
Ideas to create breakable objects
« on: Mon, Oct 22, 2012 »
I am working on a 2d plataform game where the player should be able to destroy objects on screen. I don't want to recreate the "terrain destruction" kind of destruction, I want more like a shattering effect to break sprites in pieces.

I've been thinking about it and till now I think some particles could help. I can always make emitters with premade pieces of the objects but its kind of an artificial way to do it because I can't control the starting position of the particles like making a puzzle with all the pieces and then breaking them. So I've been searching and googling but I couldn't find much flixel resources.

I could implement box 2d but I don't know how hard is it and maybe It could turn the game into a destruction game and I don't really want that. Also I'm using DAME and Tilemaps so I don't know if it is compatible with that.

Does anyone knows if I should give box 2d a shot or another way to make a lot of particles without cutting each sprite manually? Thanks!  :)

Check it out on Mochi!

initials

  • Contributor
  • ****
  • Posts: 378
  • Karma: +0/-0
  • Initials
    • View Profile
    • Initials Blog. Code and other things.
Re: Ideas to create breakable objects
« Reply #1 on: Mon, Oct 22, 2012 »
I had destructable boxes in Lemonade.

I just had an emitter the same size as the block. It doesn't "shatter" perfectly. The thing about FX is that if you do something fast enough, you'll never notice it.
Initials: Super Lemonade Factory, Super Lemonade Factory Part Two, Above The Clouds, Revvolvver, Four Chambers of the Human Heart

Esti

  • Active Member
  • ***
  • Posts: 104
  • Karma: +0/-0
    • View Profile
Re: Ideas to create breakable objects
« Reply #2 on: Mon, Oct 22, 2012 »
with "the same size as the block" you mean that you cut the sprites in like 2 pieces and just emitted those in the place?

edit: Ok, I just saw your trailer and I also saw that I can put a size to the emitter with setSize. Thanks.

Check it out on Mochi!