Sure! Here's an example of a simple shooting game implemented as a single HTML file using JavaScript:
This game is a simple shooting game where the player controls a blue square at the bottom of the canvas using the left and right arrow keys. The player can shoot red bullets towards a green enemy square using the spacebar. The objective is to hit the enemy with the bullet. Colliding with the enemy or failing to hit it with a bullet results in a game over message. The game continuously updates and redraws the canvas using the `requestAnimationFrame` method.
Note: Please be aware that this example is a basic demonstration and may not have the complete features or advanced gameplay you might expect from a commercial shooting game. It's a starting point that can be expanded upon based on your requirements.