Hello Guest

Author Topic: 2D destructible terrain  (Read 5783 times)

inkoman

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 13
    • View Profile
2D destructible terrain
« on: February 28, 2013, 03:12:16 am »
Hi there,

I've spent the last few days trying to come up with a good way to do 2D destructible terrain like Worms or Gunbound using the 2d toolkit. I've run out of ideas, and was hoping someone here might have a good suggestion. Real-time collider changing and using a bunch of small box colliders as "voxels" are both too inefficient.

Thanks

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D destructible terrain
« Reply #1 on: February 28, 2013, 09:50:06 pm »
Using physx for something like this isn't going to work very well. In those games, you were dealing with "pixels" being on or off.
You can approximate the pixels using a grid of spheres, but you'll need custom drawing code to generate your polygons. Again, you'll be limited in how many spheres you can have - make sure they all are set to not collide with anything else. It is likely to be easier to roll your own physics - basically a 2d bitmap of the world, and collide stuff by raycasting through this.

A good reference for a game like this done in a GPU accelerated engine is Disneys "wheres my water" series on iOS.

inkoman

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: 2D destructible terrain
« Reply #2 on: March 03, 2013, 10:30:40 pm »
Ah that's what I thought. No easy way out haha. Thanks I'll think about it!

x8105

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 85
    • View Profile
Re: 2D destructible terrain
« Reply #3 on: March 28, 2013, 01:04:47 am »
no not easy at all, My programmer and I have been working on one since late Oct and released a scratchpad version on the market to stake our claim in the realm we are tackling, it's Called Ghasty Ghasto, and the code is deep.. so deep it put the artist to sleep.. many times. I understand it, I can read it and make scence of it. well... I am absolutely baffled at what he can do, ... here is the Gourse for our Beta 3 build... it's on the front page of  http://zombiechickentaco.com/

IT's a chore.