Log In  

Will post here my experiments with particle effects...

Experiment 1: Fireworks... basic explosions

version 1: very basic approach

Cart #fireworkstest-0 | 2019-09-11 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

version 2: added gravity pull and callback update/draw for particles to operate multiple particle types (f.e. rocket and spark in the test)

Cart #fireworkstest-3 | 2019-09-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Experiment 2: Additive blit particle fire

version 1:

Cart #particlefiretest-0 | 2019-09-14 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

version 2: Supporting sprite-based blendop palettes (for now only partial additive palette included), next goal blit optimization

Cart #particlefiretest-1 | 2019-09-14 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

version 3: PEEK/POKE BLIT without great results... per-pixel blendops still kill it, updated color and added some toying controls

Cart #particlefiretest-2 | 2019-09-15 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#67630 2019-09-13 19:17 ( Edited 2019-09-15 20:08)

nice effect but you didn’t get the point of peek/poke.
Peek/poke is fast when operating on pixel pairs.
That pixel pair can then be used to look up a table of color pairs.
The modified byte is then written to backbuffer (not masked).
Left and right single pixels are then handled as edge cases (using pset/pget).

P#67727 2019-09-16 09:20 ( Edited 2019-09-16 09:21)

I know... Just wanted to see if there was some (enough...?) gain on just r/w operations but seems there's not. Memory space will be a bit prohibitive if storing multiple blend tables (additive, tinted glass, etc.) Maybe a different approach to store additive color ramps can help... Checking for combinations of the matching colors in the ramp, double same color pixels and partial l/r pixel can do the trick and restrict available colors. Need to think about it. Thnx for checking and commenting

P#67737 2019-09-16 14:12

Storing bytes of the multiple permutations is not that expansive - Pico as 2MB of RAM!!

P#67766 2019-09-16 19:52

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 12:38:44 | 0.013s | Q:28