Fireworks with meshes

Touch the upper part of the screen to launch bombs.
Touch the lower part of the screen to launch rockets.

very nice. Thanks.

i love fireworks?amazing


Is there a way that the fireworks can be generated automatically without the touch fx ? This will go good with the coding train #27 Fireworks…With this video and PGM you can wrap your head around what’s going on…the video is in java script, but it still has a function setup ( ) and a function draw ( )…and can be priced together…

This has an error msg :
Asset strings (“planet cute star”) are deprecated.
Please use static assets, e.g., asset.<assetnam instead…

Does anyone have any idea how to fix this ?

Any place you see an asset error, just tap on the name and reselect the name. It will correct itself.

This was a good PGM, but it didn’t work on the i-phone with out some adjustments…I was able to make it fit on the i-phone screen by changing line 40, and changing the 180 to 30. But I’m having trouble taking out the touch fx and just looping the draw fx so I can just see the fireworks loop without touching. I tried stanching some lines from the touch fx and putting them in the draw fx, but I havent gotten anywhere yet. I tried looking at the coding train videos / fireworks, but was unable to transfer the java into lua…Does anyone have any ideas ? I would like to get this into my lua notebook.

I see this has two screen touch events, I’m going to try to put one of them into the draw fx and loop it from there…either one it doesn’t matter…if I figure this out I’ll post it just to share…

Here’s a version that works on iPhones. Haven’t tested on iPads but since fireworks now calculate when to explode based on the screen height, it should still work.

Question: does anyone know how you could reproduce the fading-trails effect here without drawing over the entire background every time?

In other words, does anyone know how to make this fireworks effect happen while still being able to see a background image behind it?

@UberGoober use Tint(r,g,b,a) and fade out the alpha value? The smoke in this demo does what you are after I think.

@West very very nice. I think I might use this for what I wanted to do instead of the fireworks code.

I hope you don’t mind, I made a version that separates all the explosion code into an independent class, so that it’s easier to use in other projects.

@UberGoober yes no worries. For interest here is a small demo I made using a similar particle approach, but with greater environmental interaction.

Tap the screen to boost, tilt the screen to rotate the ship. It might be a bit flakey as objects are tied to the iPad Pro screen dimensions rather than being universal

@West needs art or to be rejiggered to use built in assets.

@UberGoober Gah - they were on my Dropbox. That should be it updated. You’ll be pleased to know that for this one the assets are already in a spritesheet :slight_smile: