Destructible Terrain/Buildings

Get help using Construct 2

Post » Sat Mar 30, 2013 2:18 pm

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 :)
B
3
Posts: 9
Reputation: 320

Post » Sat Mar 30, 2013 2:27 pm

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 Whiteclaws2013-03-30 15:00:14
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Sat Mar 30, 2013 2:30 pm

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.
ImageImageImageImageImageImage
B
93
S
20
G
13
Posts: 1,218
Reputation: 19,000

Post » Sat Mar 30, 2013 2:43 pm

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
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Sat Mar 30, 2013 3:03 pm

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!
B
3
Posts: 9
Reputation: 320

Post » Sat Mar 30, 2013 3:04 pm

@Whiteclaws Wow bad timing on my part... I was going for the debris-explosion type thing... can you give me some pointers?
B
3
Posts: 9
Reputation: 320

Post » Sat Mar 30, 2013 3:11 pm

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.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sat Mar 30, 2013 3:18 pm

@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.
B
3
Posts: 9
Reputation: 320

Post » Sat Mar 30, 2013 3:26 pm

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
B
3
Posts: 9
Reputation: 320

Post » Sun Mar 31, 2013 2:25 am

@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
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 16 guests