Canvas Game: Create a standalone HTML file containing CSS and JavaScript to generate a modern Breakout game assisted by an AI assistant (e.g., Trae).
Canvas Game: Create a standalone HTML file containing CSS and JavaScript to generate a modern Breakout game assisted by an AI assistant (e.g., Trae). The interface must implement the following core modules through Canvas high-definition rendering and responsive control: High-Definition Rendering System: The Canvas adapts to the window.devicePixelRatio (DPR) by dynamically obtaining it, sets the physical size and CSS style, and uses ctx.scale(dpr, dpr) to ensure crisp drawing on all screens. Modular Game Objects: Define the paddle (paddle), ball (ball), and a 2D array of bricks (bricks) using object literals, and encapsulate a brick initialization function (createBricks). Intelligent Collision & Game Logic: Implement collision detection based on Axis-Aligned Bounding Boxes (AABB). Upon hitting a brick, increment the score and increase the speed level; integrate life (lives) management and game-over conditions. Multi-Channel Input Control: Support paddle movement control simultaneously via keyboard (arrow keys), mouse movement, and touch events designed for mobile devices. Main Game Loop & State Control: Drive a loop containing drawing, updating, and detection using requestAnimationFrame, and provide buttons for state control such as start, pause, and reset. The interface must use a modern CSS variable theme, with all code consolidated into a single file. The JavaScript should focus on physics simulation and state management
Create a Deep Q-Network (DQN) based Snake game using TensorFlow.js with the latest API, implemented in a single HTML file.
Develop a feature-rich chess game
Develop a memory matching card game
Create an interactive Sudoku game