Skip to content

Add Bubble visual effect#29

Draft
Copilot wants to merge 2 commits into
masterfrom
copilot/add-bubble-effect
Draft

Add Bubble visual effect#29
Copilot wants to merge 2 commits into
masterfrom
copilot/add-bubble-effect

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 4, 2026

Adds a new Bubble effect: randomly-sized hollow bubble rings that rise from the bottom of the screen, with smooth fade in/out.

Effect properties

  • color — bubble ring color (default: light blue, semi-transparent)
  • count — number of bubbles in the pattern (5–200, default 20)
  • speed — rise speed in screen heights/sec (default 0.15)
  • max_size — maximum bubble radius as a fraction of screen height (default 0.06)
  • length — resizable event duration in beats

Implementation notes

  • Canvas/tiling approach: bubble positions (x, y, radius) are generated once into a fixed array using a local System.Random. Each frame the entire pattern is scrolled by Time.time * speed with modulo wrapping — no per-frame allocation or random generation.
  • Seamless wrap: bubbles straddling the top or bottom edge are drawn at both their primary position and the adjacent tile edge to prevent popping.
  • Ring shape: each bubble is an annulus (inner radius = 70% of outer) drawn as 16 × 2 GL triangles per bubble. Aspect ratio is corrected via rx = ry / cam.aspect so rings appear circular at any resolution.
  • Fade envelope: 20% fade-in / hold / 20% fade-out, consistent with Fog and Vignette.

Files changed

  • BopVisualEffects/Effects/Bubble/BubbleEffect.cs — new effect (definition + runner + overlay)
  • BopVisualEffects/Core/EffectDefinitionRegistry.cs — register BubbleEffect alphabetically first
  • docs/effects/README.md — document properties; preview video placeholder left for in-game recording
Original prompt

This section details on the original issue you should resolve

<issue_title>Bubble effect</issue_title>
<issue_description>New effect, it adds bubble textures of randomized sized rising from the bottom, with possibility to configure how fast and how many bubbles there are + some scalę to how big they can get

Length of the event should be configurable.

To make sure that spawning a lot of bubbles doesn't cause performance issues, we can try an approach of rendering everything once to a Canvas and then scrolling it vertically with wrapping.

Should smoothly fade in at the start and then smoothly fade out at the end.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…size/color

Co-authored-by: Brollyy <12004018+Brollyy@users.noreply.github.com>
Copilot AI changed the title [WIP] Add bubble effect with configurable options Add Bubble visual effect Mar 4, 2026
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.

Bubble effect

2 participants