Log In  


Cart #drakeblue_fireworks-3 | 2021-11-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Some fairly simple particle fireworks just for fun.
Press X to switch the screen effect on/off. For more about that see here: https://www.lexaloffle.com/bbs/?tid=41149

Every sixth of a second, 50-100 Particles are emitted at a random point on the screen with random angle/velocity determined by a tiny bit of trig. They're given colours in the top half of the PICO-8 palette (7+) and as the particles get old the colour changes according to the same mapping that the screen fade effect uses to a darker colour.
If they run out of life or become black then the particles are deleted.
There are two possible update functions for each particle - one with a wiggle :)

-- update: tidied code a bit, updated fade effect.
-- update 2: added a flash when the fireworks detonate. Other tweaks. Happy Fifth of November :)

P#90763 2021-04-18 14:02 ( Edited 2021-11-05 14:34)

Nice work! :)

P#90779 2021-04-18 17:50


P#93238 2021-06-09 10:32

The way the sparks wiggle as they fall is such a nice detail

P#143983 2024-03-20 20:35

[Please log in to post a comment]