top of page
Search

Bombs Away

  • seanmcgarry65
  • Jan 13, 2023
  • 1 min read

This week, I implemented bombs into the adventure game. Bombs can blow up walls and damage enemies, though they're a bit clumsy for the latter purpose.


This snippet of code governs what happens when a player presses the button to drop a bomb, and prevents them from dropping more bombs than they have.


When a bomb's internal timer goes off, it plays a sound, spawns an explosion object, shakes the screen, then deletes itself. The explosion object plays an animation then immediately deletes itself.


When the explosion from a bomb overlaps a certain type of cliff, the cliff object will be destroyed.


Finally, when enemies collide with the explosion from a bomb, they will take damage from it and be knocked away from the center of it.


You can play the game so far at the link below:


 
 
 

Recent Posts

See All

Comments


bottom of page