Sure! Here's a simplified example of a first-person shooter game implemented as a single HTML file using JavaScript. Please note that this is a very basic demonstration and may not fully meet all your requirements, but it should help you get started:
In this basic example, the game allows you to control a player character (a green rectangle) using the arrow keys. The objective is to avoid colliding with the enemy character (a red rectangle) that moves towards the player. If a collision occurs, the game ends and displays the final score.
Please note that this is just a starting point, and you can further enhance and expand the game as per your requirements. You can add different weapons, additional enemies, power-ups, levels, and more.