Prompt
Create a browser-based, avant-garde game experience that uses the foundational mechanics of Flappy Bird as a canvas for digital decay, brutalist aesthetics, and experimental sound. The goal is not a fun, playable game, but a jarring, beautiful, and broken artistic statement. Core Artistic Directives: Genre: Glitch Art, Net.art, Brutalism, Digital Decay. Visuals: Raw, unpolished, and buggy. Embrace artifacts, corruption, and a lo-fi aesthetic. Audio: Disrupted, noisy, and synthesized. Use sound as a form of auditory distortion and expression. Gameplay: Unreliable, frustrating, and unpredictable. The game's bugs are its features. I. The Visuals: A Canvas of Digital Decay This section defines the graphical components and their corruption. The Bird (The 'Protagonist'): Not a clean sprite. The bird is a flickering, unstable ASCII character (e.g., >) or a corrupted bitmap sprite that undergoes constant pixel-sorting and color shifting. It should be rendered using a monospaced font like Monaco or Courier New if it's text-based. Its color should randomly shift between a limited, stark palette (e.g., #FF0000, #00FF00, #0000FF, and #FFFFFF). On flap, the character briefly tears apart or duplicates, leaving a trail of corrupted pixels. The Pipes (The 'Obstacles'): Rendered as crude, unstyled HTML <div> elements or as wireframe vectors. No shadows, no gradients. Just raw, solid colors. Their vertical position and gap should have a slight, random jitter, making them feel unstable and non-Euclidean. They might briefly disappear or flash black upon approach. Their collision box is intentionally buggy; sometimes you pass through them, sometimes you die before touching. The Background (The 'Environment'): A static, untextured void. No blue sky, no clouds. The background is a constant stream of low-resolution digital noise (like television static) or a repeating pattern of ASCII characters. Implement a shader effect (via WebGL) that continuously performs color channel splitting and pixelation, as if the screen itself is breaking down. Introduce sudden, screen-wide flash frames of a single, jarring color (#FF0000 or #000000). The User Interface (The 'Brutalist Scoreboard'): The score is displayed using a raw HTML <h1> or <span> tag. The font is a system default monospaced font. The numbers themselves are glitched. The score should not count up cleanly. It should jump, flicker, display corrupted characters (e.g., 3, 5, &, ?), overflow unexpectedly (e.g., 9999999 after 5 points), or even count backward. The "Game Over" screen is not a screen. The canvas simply freezes, a static loop starts, and a cryptic, unformatted message appears in a corner, such as ERROR: SIGNAL DECOMPOSED or REPLAY? [Y/N] with non-functional buttons. II. The Audio: A Soundscape of Digital Rot This section details the sound design, focusing on synthesis and digital artifacts. The Flap Sound: Not a clean "woosh." It's a bit-crushed, high-frequency synthesized chirp with a random sample-rate reduction effect. Each flap sound has a small chance of being replaced by a sudden, loud burst of white noise or a short, distorted voice sample saying "flap." The Pipe Pass Sound: Instead of a satisfying ping, a pipe pass triggers a brief burst of digital artifacts: a glitch or crackle from a broken audio file. A low-frequency, synthesized hum should increase in intensity with each successful pass. The Collision Sound: A violent, jarring, synthesized sound. Use a low-pass filter on a distorted sine wave, a sudden frequency modulation (FM) sweep, or a rapid, escalating sequence of white noise bursts. This sound should temporarily corrupt the entire audio engine, causing all other sounds to crackle and distort for a brief moment. The Background Audio: No music. The soundscape is a low, continuous digital hum. This hum should occasionally be interrupted by randomized, short, looping samples of static, radio tuning, or a broken text-to-speech voice reciting random numbers. Implement a sound effect that triggers when the player gets a "high score" (even if the score is glitched), which is a loud, synthesized scream followed by silence. III. The Gameplay & Logic: The Non-Euclidean Interaction This section dictates the broken rules of the game. Controls: The user's input (mouse click or spacebar) is unreliable. There is a 10% chance a click will not register. There is a 5% chance a single click will register multiple times (2-5 flaps). Physics: The bird's gravity and vertical velocity are not constant. Gravity can randomly increase or decrease. The flap force can randomly be stronger or weaker. The bird's vertical position might jitter or snap to a nearby grid line. Collision: The collision detection is intentionally flawed. The hitbox for the bird and pipes is not visible and is not accurate to their visual representation. Collision can trigger even if the bird is visibly not touching the pipe. There is a small chance to pass through a pipe without dying. IV. The Technical Toolbox: Direct JS Libraries This section lists the required tools for implementation. Graphics & Rendering: p5.js: The primary library for rendering the canvas, drawing shapes, and implementing generative visuals. It’s perfect for the art-focused, raw approach. Use its drawing functions to create the glitched visuals and manipulate pixels directly. Regl or raw WebGL2: For implementing the complex screen-wide shaders (pixel-sorting, color shifting, datamoshing effects). This is essential for the advanced glitch visuals. Audio & Sound Synthesis: Tone.js: Absolutely essential. Use it to programmatically synthesize all sounds, from the bit-crushed flaps to the noisy background hum. Its ability to create granular synthesis, filters, and digital noise is paramount for the glitch-sound aesthetic. p5.sound: An alternative to Tone.js if you prefer to stay within the p5 ecosystem. It provides powerful sound synthesis capabilities. Interface & Structure: Vanilla JavaScript & HTML: No frameworks like React or Vue. The game's logic should reside in a single, unminified .js file, reflecting the net.art aesthetic of exposed code and a single-page application. Raw CSS: All styling should be done with minimal, unpolished CSS. Use inline styles or a single <style> tag in the HTML head. Embrace !important, mixed units, and other "bad" CSS practices for the brutalist feel. Final Statement: The game does not have an end state. When the player "dies," the game does not restart. The canvas simply enters a permanent state of visual and auditory corruption, a final, unplayable art piece. The only way to "play" again is to refresh the page.
A system prompt was added to support web rendering