Refine the prompt below. Make it succinct but effective.
"Adult Swim" Style "Unicorn Attack" Clone (Single File)
Create a fully functional, self-contained HTML game that serves as a parody/clone of the Adult Swim version of "Unicorn Attack." This means featuring a pony character reminiscent of Rainbow Dash riding a "doom horse," navigating a chaotic, psychedelic landscape, and utilizing both jumping and dashing mechanics to survive. All code (HTML, CSS, and JS) must be embedded directly within a single HTML file, with no external dependencies whatsoever (no external CSS, JS, image files, audio files, etc.). Use only HTML5, CSS, and vanilla JavaScript.
Requirements:
- HTML Structure:
- Standard , , , structure.
- A element within the for the game's rendering.
- Include minimal HTML elements for the score display and a game-over screen/restart button, positioned absolutely over or around the canvas.
- Inline CSS:
- A block in the to style the canvas and UI elements.
- Ensure responsiveness for various screen sizes (desktop and mobile).
- Adopt an extremely vibrant, over-the-top, psychedelic, and potentially slightly chaotic aesthetic using CSS background properties or styling for the canvas container, reflecting the Adult Swim style. Think bold colors, potentially gradients or pulsing effects (if feasible with simple CSS).
- JavaScript Game Logic:
- Place all game code in a block at the end of the .
- Canvas Rendering: Use the HTML5 Canvas API exclusively for drawing all game visuals.
- Game Loop: Implement a smooth animation loop using requestAnimationFrame.
- The Duo (Rainbow Dash & Doom Horse):
- Create a character representing a blue pony riding a dark, possibly flaming "doom horse." This duo should occupy a fixed horizontal position on the left side of the screen, with the environment and obstacles moving towards them.
- Render this character using Canvas drawing primitives. Attempt to capture the distinct visual identity, even if simplified.
- Mechanics: Implement two core actions:
- Jumping: The duo must be able to jump over obstacles (using keyboard input like Space/Up Arrow and touch input). Standard gravity physics should apply.
- Dashing: Implement a separate dash mechanic (e.g., Shift key, or perhaps a double-tap/swipe on mobile). Dashing should provide temporary invincibility, allowing the duo to pass through certain obstacles or enemies. There should ideally be a cooldown on the dash ability.
- Chaotic Environment & Obstacles:
- Implement a fast-scrolling background that evokes a surreal, psychedelic landscape (use changing colors, simple shapes, or scrolling patterns drawn on the canvas).
- Generate fantasy/absurd obstacles (e.g., jagged "evil" gems, floating heads, simple abstract shapes) that move horizontally towards the duo. Vary their appearance, size, and speed.
- Implement collision detection: Collision with an obstacle normally results in "Game Over," unless the duo is currently in a dashing state.
- Enemies (Optional but Recommended): If feasible, add simple moving "enemies" (like crude flying shapes) that also act as obstacles or require dashing to pass safely.
- Scoring & Game States:
- Implement a scoring system based on survival time and/or obstacles successfully passed. The score should increase rapidly as the game speeds up.
- Provide a clear "Game Over" state when a collision occurs outside of a dash. Display the final score on an overlaid screen and offer a button to restart the game.
- Assets and Effects:
- All visual assets (characters, obstacles, background elements) must be created using Canvas drawing primitives. Avoid attempting complex imported images unless you are willing to manually Base64 extremely simple sprites.
- Include visual flair using Canvas drawing: effects like bright stars, glittering trails behind the duo, simple particle explosions on collisions or dashes.
- Sound (Optional): If adding sound (e.g., jump sound, dash sound, collision sound), it must be embedded as data URIs (e.g., base64 encoded wave files or programmatically generated tones). This is challenging but required by the constraints.
- Code Quality & Comments:
- Write clean, well-structured vanilla JavaScript code. Organize different parts of the game logic (initialization, game loop, rendering, input handling, physics, collision detection, state management).
- Add clear comments explaining the purpose of functions, variables, and complex logic, especially for collision and dashing.
Constraints:
- The entire game must be contained within this single HTML file. No linking to external CSS, JS, images, or audio files.
- Use only native HTML5, CSS, and vanilla JavaScript. No external libraries or frameworks are permitted.
- Ensure the game is playable and responsive on both desktop (keyboard) and mobile (touch) devices.
Final Deliverable:
Your output should be a single, self-contained HTML file that, when opened in a modern web browser, runs a game clearly inspired by the Adult Swim "Unicorn Attack" style, featuring the unique character design, mechanics (jump and dash), chaotic visuals, and game-over/restart functionality.
Make the game simple, pixel-art style, responsive, tap touch control.