Here's a simplified example of an old FPS game implemented as a single HTML file using JavaScript:
In this simple game, you control a player rectangle by pressing the up and down arrow keys on your smartphone. Pressing the space bar shoots a bullet from the player's position. The goal is to hit a target (not represented in this code example) by shooting the bullet and avoiding it going off-screen. The canvas represents the game area where the player and bullet are drawn and moved accordingly.
Please note that this is a minimal example and does not include a target or additional game mechanics commonly found in FPS games. It serves as a starting point to implement additional features based on your requirements.