Sure! Here's an example of a simple shooting game implemented as a single HTML file using JavaScript:
This code creates a simple shooting game where the player can move left and right using the arrow keys and shoot bullets by pressing the space key. The bullets travel upwards and collide with enemies. When a bullet hits an enemy, both the bullet and the enemy are removed from the game. The game canvas is displayed on a smartphone-sized screen with the player represented by a blue rectangle, bullets as red rectangles, and enemies as green rectangles.