Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2D Effect Snow Fall #147

Open
wants to merge 5 commits into
base: mdev
Choose a base branch
from
Open

2D Effect Snow Fall #147

wants to merge 5 commits into from

Conversation

Brandon502
Copy link

@Brandon502 Brandon502 commented Jul 17, 2024

Effect that simulates snow/sand falling and melting.

Uses getBitValue and setBitValue from Game of Life to reduce memory usage to 1 bit per led.

Sliders:

  • Effect Speed: 0 to 60 updates per second
  • Spawn Chance: 0% to ~39% chance
  • Despawn Chance: 0% to ~38% chance. 255 = 100% chance
  • Blur: Fade previous snow location
  • Sway Chance: 0% to 100% chance of swaying while free falling

Check boxes:

  • Use Palette: Uses palette instead of default snow colors
  • Overlay: Allows background effect to color the snow
  • Prevent Overflow: If snow reaches the top the bottom opens and empties current snow

I've optimized this as much as I can, easily hits 60fps on 32x32. Likely can still be improved.

Examples on a 32x32 split into 2 segments using different slider/option configs.

Screen.Recording.2024-07-13.192733.mp4
Screen.Recording.2024-07-13.192931.mp4
Screen.Recording.2024-07-13.194249.mp4

Naming and default values can be changed however you'd like. Started out as snow, but palette colors look really nice. Could likely be modified to have an audio reactive version as well.

@softhack007
Copy link
Collaborator

Hi @Brandon502, nice effect, thank you 😃

I'm a bit busy right now - just tested your effect quickly on 64x64 and it looks very good.
I can take a closer look at the code in the next weeks.

cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants