2D Falling Stones Game Design
Prompt
Create a comprehensive design and development prompt for a 2D HTML5 game scenario with the following detailed specifications: **Player Character:** - Positioned at the bottom side of the screen. - Continuously fires projectiles upward without player input to fire. - Moves horizontally forward and backward in response to controller inputs (e.g., arrow keys or gamepad sticks). - Movement should be smooth and responsive with no lag. **Enemy Behavior (Falling Stones):** - Large stones fall from the top of the screen toward the bottom. - Each stone is initially part of a group of 2 stones. - When a stone is hit by the player’s projectile, it splits into two smaller stones, doubling the group count from 2 to 4. - This splitting process continues progressively, with each split halving the size of stones. - Stones continue falling downward with smooth, natural animation. **Splitting Mechanics:** - Upon projectile impact, each stone splits immediately into two smaller stones. - The new stones should separate visually and move in slightly diverging directions as they fall. - There should be a limit or minimum stone size after which stones no longer split. **Animation Requirements:** - The entire scene must be fully animated with smooth, fluid movements: - Player movement left and right. - Continuous firing animations. - Falling stones. - Stone splitting and size reduction. - Visual feedback when a stone is hit (e.g., flash, sound, small explosion animation). **Player Controls Specification:** - Use keyboard arrow keys or a standard controller/gamepad for horizontal movement. - No button required to fire; firing happens automatically at preset intervals. - Ensure controls are responsive and support continuous left/right movement without lag. **Additional Requirements:** - Use HTML5 canvas or equivalent for rendering. - Optimize for smooth 60 FPS animation. - Clearly specify all relevant variables and parameters (player speed, firing rate, stone speed, stone sizes, split mechanics). -- This prompt should guide the development or design team to implement a polished, interactive 2D game feature aligning with the described gameplay mechanics and animation standards.
Related Coding Prompts
Write Code
As a seasoned programmer, your task is to write code in [programming language] to [perform action]. The code should be efficient, well-structured, and optimized for performance. Make sure to follow best practices and industry standards while implementing the necessary algorithms and logic to achieve the desired functionality. Test the code thoroughly to ensure it functions as intended and meets all requirements. Additionally, document the code properly for future reference and maintenance.
Debug Code
Act as a seasoned programmer with over 20 years of commercial experience. Analyze the provided [piece of code] that is causing a specific [error]. Your task involves diagnosing the root cause of the error, understanding the context and functionality intended by the code, and proposing a solution to fix the issue. Your analysis should include a step-by-step walkthrough of the code, identification of any bugs or logical mistakes, and a detailed explanation of how to resolve them. Additionally, suggest any improvements or optimizations to enhance the performance, readability, or maintainability of the code based on your extensive experience. Ensure that your solution adheres to best practices in software development and is compatible with the current development environment where the code is being executed.
Do Code Review
As a seasoned programmer with over 20 years of commercial experience, your task is to perform a comprehensive code review on the provided [piece of code]. Your review should meticulously evaluate the code's efficiency, readability, and maintainability. You are expected to identify any potential bugs, security vulnerabilities, or performance issues and suggest specific improvements or optimizations. Additionally, assess the code's adherence to industry standards and best practices. Your feedback should be constructive and detailed, offering clear explanations and recommendations for changes. Where applicable, provide examples or references to support your suggestions. Your goal is to ensure that the code not only functions as intended but also meets high standards of quality and can be easily managed and scaled in the future. This review is an opportunity to mentor and guide less experienced developers, so your insights should be both educational and actionable.