Pixel destruction

K

KetoGames

Guest
Hello! I saw a game earlier today, called Spout, and I noticed something unique about it. (If you have not seen or played Spout, there is a link down below). In Spout, your spaceship shoots little particles, and when these particles collide with the rocks, the particles destroy parts of the rock. I am wondering, how was this made? It seems way too far stretched to say that every little particle in the rocks and every particle coming from the spaceship is a separate object. Is there any way to achieve something like this in GameMaker?

Thank you!

Spout gameplay link:
 
C

Ctl-F

Guest
Each bullet could realistically be an object, but you're right the rocks wouldn't be composite objects. If I were to do that in game maker I would keep a ds_grid for the collisions and draw to a surface for the rocks.
 

kburkhart84

Firehammer Games
Surfaces are generally the best way to do it. If you have a static level, even if it is made up of many objects originally, draw all of that to a surface. Then delete the objects and only draw the surface, or at the least stop the objects from drawing if you still are using them for collision tests or something. Then, when you collide, you need to know where the collision happened, and then draw some specific sprite to the surface in that spot. The blend_mode and sprite you use will depend on the explosion shape and if you want total destruction of the pixels. Blend modes will be your friend for this one.
 
Top