prompts.chatprompts.chatprompts.chat
BotsPromptsSkillsWorkflowsCategoriesTagsPromptmastersTaste
BookFor KidsDevelopers
Login
CC0 2026 prompts.chat
DeepWikiHow to...DocsAPIPrivacyTermsSupportAboutGitHub

Classic Arcade Game

Create a standalone HTML file that includes both CSS and JavaScript to generate a Block Breaker game with Canvas rendering.

邱
@loshu2003
9 months agoJanuary 26, 2026 at 12:10 AM
Coding•AI Tools

Content

Classic Arcade Game: Create a standalone HTML file that includes both CSS and JavaScript to generate a Block Breaker game with Canvas rendering.

The game will showcase the following core modules through object-oriented design and physical simulation:

1. **Object-oriented design**: Define game objects using classes or constructors, including `Paddle` (racket), `Ball` (ball), `Brick` (brick), and `Score` (score system). These objects encapsulate their respective properties (position, speed) and methods (drawing, updating).
2. **Canvas Rendering and Game Loop**: Use HTML5 Canvas to draw all game elements. Implement a smooth animation loop using `requestAnimationFrame` to update object states and redraw within the loop.
3. **Physics and Collision System**: Implement the trajectory of small balls and integrate a collision detection system to accurately handle collisions and rebound logic between the balls and bricks, rackets, and the edges of the canvas.
4. **Game State and Interaction Controls**: Manage game states (start, pause, finish, restart), and provide interactive features such as mouse movement, directional key control for the racket, and the spacebar for pausing/resuming.
5. **Difficulty and Progression**: Design a system for calculating scores and implement mechanisms that increase difficulty as the game progresses (e.g., by speeding up the movement of the ball).

The interface features a classic arcade style, with all code integrated into a single file. JavaScript is focused on object modeling, physical simulation, collision algorithms, and state control to enable an expandable brick-breaking gameplay experience.

Related Prompts

Memory Card Game

Text

Develop a memory matching card game

F@f
0

Build a DDQN Snake Game with TensorFlow.js in a Single HTML File

Text

Create a Deep Q-Network (DQN) based Snake game using TensorFlow.js with the latest API, implemented in a single HTML file.

N@niels

Comments (0)

1

Sudoku Game

Text

Create an interactive Sudoku game

F@f
0

Chess Game

Text

Develop a feature-rich chess game

F@f
0