Sure, here's a simple game called "Toys Attack" implemented as a single HTML file using JavaScript:
This game is a simple avoidance game where you control a "player" square at the bottom using the left and right arrow keys on your smartphone. The objective is to avoid a "toy" square that moves downwards from the top. If the toy touches the player, the game ends, and an alert is displayed. You can then reload the page to play again. The game loop continuously updates the game state and renders the game objects on the canvas.
Please note that this is a basic implementation and can be expanded upon to add more features, levels, and graphics.