Sure! Here's an example of a simple 2D action game implemented as a single HTML file:
To play the game, simply copy and paste the code into an HTML file and open it in a browser. Use the arrow keys on the keyboard to control the movement of the blue cube. Avoid touching the red cubes and try to eat all the black cubes to win the game.