Log In  

Cart #34484 | 2016-12-30 | Code ▽ | Embed ▽ | No License

I have the sound muted -- if you want to test with the explosion sound, uncomment line 26.

The magic happens in the MAKE_EXPL function which creates a new explosion in the table (maxed out at 10 explosions). I call EXPLODE() to update all the explosions every frame.

Things I learned from this:

  • creating a RN function for a shorthand FLR(RND)
  • how to delete the oldest entry in a table
  • conditional animations based on count and argument data
  • palette cycling

I'm sure there's a better way to create the explosions using a single formula. This is the messy way. Feel free to remix with cleaner code or use this in your project.

P#34485 2016-12-30 02:50 ( Edited 2016-12-30 07:50)

[Please log in to post a comment]