Destructible Terrain/Buildings

0 favourites
  • 14 posts
From the Asset Store
Isometric Stategy Roleplay Game Building and Streets Pack.
  • Herro! I'm quite new (maybe 3 months into C2) and have decided explosions are the way forward. Is it possible to create something relatively similar to Red Faction: Guerrilla, where everything is destructible? Can I make sprites "split" and crunch? Thanks very much for any advice :)

  • Are you talking about worm-style destruction ? if so ... Not your level ... Try something else ...

    If not ... Then it'll be easy to setup with some debris and such

  • You can, but you must need the explosion sprites and debris, play the explosion and shot the debris, also, make a code for a family and check all the probabilities where you want the player to destroy the objects, put the objects inside the family and you're done.

  • This example I made might help for the terrain destruction part: https://dl.dropbox.com/u/4714446/GroundErase.capx

    It's technically a "trick"/"workaround", but it's a way to do it without external plugins if you want to post the game on the Scirra arcade.

    Otherwise, R0J0hounds Canvas plugin for C2 is awesome, and will let you regenerate the collision mask whenever a chunk of ground is removed <img src="smileys/smiley1.gif" border="0" align="middle">

  • Ok, I honestly think that I'll go with Whiteclaws advice for now :D Although thanks for everyone else's posts! Jayjay awesome! Not really what I was intending but I might try and work that into my current project (homing missiles ftw) Again, thanks for the feedback!

  • Whiteclaws Wow bad timing on my part... I was going for the debris-explosion type thing... can you give me some pointers?

  • If we're talking Red Faction style destruction, terrain doesn't have to be destructible, only buildings and other objects, right? You could probably fake that with particles like the rocks in this demo:

    https://www.scirra.com/labs/particlesdemo2/

    So pretty much what TELLES said, but it's probably gonna be a bit of work if you're doing it for all the objects.

  • Nimtrix That is pretty much perfect! And no, terrain itself does not have to be destructible... I was thinking, for example, of a wall: shoot it with a rocket and it blows up, bits of the wall go flying! So I need a way of making the parts of wall separate on impact and then set the vector of each individual piece to the opposite direction of the rocket... And obviously some fancy particles thrown in for good measure :D Thanks for the reply.

  • OK! I've figured out a VERY simple way of doing it... I've constructed a wall out of smaller "bricks"... And when the rocket hits, I've set an impulse at angle angle(rocket.X,rocket.Y,brick.X,brick.Y) .... so I've kind of got what I wanted. Thanks very much :P

  • Ylando, I heard physics objects can dramatically slow the game if you use lots of them, so you may want to come up with a way to do it with sprites/reuse the physics objects (make physics objects invisible and attach to sprites on-screen at all times?)

    Not sure how easy that'd be, but using one screens worth of physics objects instead of a whole layout should save some lag <img src="smileys/smiley1.gif" border="0" align="middle" />

  • I wanted to do something similar to this. I started out with small bricks and tried linking them together, but that was disaterious. I ended up making this game:

    newgrounds.com/portal/view/612857

    It's just stacking platforms on top of each other and the physics engine freaks out and collapses the building, but I thought it made for an interesting idea. That's one simple way of doing destruction.

  • Jayjay Yeah, I heard the same thing.... So far I've made the bricks have health, which diminishes over time/with hits. So HOPEFULLY if I make certain objects only spawn when they're visible all should be ok :)

  • Sushin Very interesting... That is pretty much what I'm going for :) Except with more explosions :D

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Sushin, I like that game, although it's flawed. If you could fix it so everything doesn't just instantly collapse when I enter the levels, it would be really fun. Right now it's just a bit too mad, as soon as I enter level 2 the whole building collapses, lol. But the idea is good and if you polish it up a bit I reckon it could be great. I've given you 5 stars anyway :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)