Here's an example of a simple first-person shooter game implemented as a single HTML file using JavaScript. In this game, if you miss your target, you'll be "shot" and the game will end.
To play the game, open the HTML file in a web browser, either on a smartphone or a computer. Use the arrow keys (left, up, right, down) to move the player (represented by a blue rectangle) and try to reach the target (represented by a red rectangle) without missing it. If you miss the target, the game will end and display a "Game Over" message on the screen.