Sure, here's an example of a simple game implemented as a single HTML file with JavaScript:
In the example above, the game involves a chicken and a player controlled by touch input on a smartphone. The player can move on the canvas, and their goal is to catch the chicken. The score is displayed on the top left corner of the canvas. The game loop continuously updates and draws the game elements on the canvas. The player's movement is handled through touch events.