It looks like you're new here. If you want to get involved, click one of these buttons!
https://gist.github.com/pepinganos/ca193701fa16ae2435e1
Touch the upper part of the screen to launch bombs.
Touch the lower part of the screen to launch rockets.
Comments
very nice. Thanks.
i love fireworks,amazing
Nice!
Asset strings ("planet cute star") are deprecated.
Please use static assets, e.g., asset.
Any place you see an asset error, just tap on the name and reselect the name. It will correct itself.
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 :-)