Sure! Here's an example of a simple shooting game implemented as a single HTML file, including JavaScript code enclosed in script tags.
This implementation includes a player, a bullet, and an enemy on a canvas element. The player can be controlled using the right and left arrow keys, and the spacebar can be used to shoot a bullet. The objective of the game is to shoot the enemy before it reaches the player. If the enemy collides with the player, the game is over and the page will be reloaded.