Sure! Here's an example of a simple game where you have to hit brown squares to score points and avoid red squares as they deduct points. The game will run when the HTML file is opened in a web browser. It uses JavaScript and is enclosed within script tags.
To use the game:
1. Copy the entire code and save it in a new HTML file (e.g., "game.html").
2. Open the HTML file in a web browser.
3. You will see a canvas where the game is displayed.
4. Brown squares will spawn randomly, and you have to click on them to score points.
5. If you accidentally click on a red square, you will lose points.
6. The game speed increases as your score increases.