Trollsplatterer

Help, tutorials and examples for Game Maker

Platformer Engine
click to visit
An Engine to help you start a 2D Platformer Game.

Spiral Lords
click to visit
Lead your empire to conquer the galaxy.
Infinite Stick War of Death V3
click to visit
The third remake of the epic, endless war God has started.

Hexsweeper 2
click to visit
Minesweeper redefined!
Home Search/Browse Comments Trollsplatterer You can help! Links
Terms&Conditions This website has been designed for Firefox Design by Trollsplatterer (©2017)

Destructible Terrain  download now


This example explains how to create destructible terrain. It subtracts an explosion-sprite from a land-sprite to create a new sprite that's used for the land-object. This method requires the pro-version, though.

Ratings

General Rating
Your Rating*

Comments/Suggestions

By Comment
Trollsplatterer
2009-03-20
Indeed, I hadn't thought of that. You can use the deactivation of instances to fix this:
- Make a hole in the instance you collide with
- Decativate this instance
- Repeat this until there's no more collision
- Activate all instances again.

I'll see to it that this is added to the example.
Syynth
2009-03-18
This works great, but the only problem is when 2 are placed near or on top of each other. Either only 1, or neither of them are affected. I know this is difficult to handle in GM, so it's not something I can count you off for :) Nice job!
Anonymous
2008-12-27
Really nice.
-shadow_111
Trollsplatterer
2008-12-16
There is an explosion, but there's no surface-creation when there's no land object. The code already checks for a collision with land (instance_place(x,y,landobject)). If there's no land, the code stops (break).
Anonymous
2008-12-15
change in object landdesructor the create event to a collusion event and it will only give the effects and destroying when he get that collusion with the land. I think this is better because now you can destroy air (it won't destroy but it gives an effect) :D
Cool
2008-09-01
Real cool!



* : The rating makes use of your IP-address to remember your vote. IP addresses may change, but your vote will be kept, even though it may no longer be visible here.