Sure! Here's an example of a simple generative art game implemented as a single HTML file with JavaScript:
In this game, random shapes (circles and rectangles) of various colors and sizes are generated on a canvas. The shapes will continuously be generated and animated as long as the game is active. When the game loses focus (e.g., user switches to another tab), the game will pause, and it will resume when it regains focus.
You can play this game by copying the above code and saving it as an HTML file, then opening it in a web browser on your smartphone or any other device.