Sure! Here's an example of a simple generative art game implemented as a single HTML file:
Generative Art Game
In this game, a canvas element is used to draw randomly generated rectangles with different colors and positions. The `startGame` function initializes the game and calls the `draw` function repeatedly to generate new shapes on the canvas. The game continues indefinitely until the user closes the game.
To run the game, you can save the above code into an HTML file (e.g., `generative_art_game.html`), then open it in a web browser. The game should start automatically and you will see randomly generated rectangles appearing on the canvas.