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 you control a player with left and right arrow keys or touch gestures on smartphones. The player shoots projectiles to destroy enemies, and the score increases for each enemy destroyed. The game is displayed using a canvas element and the game logic is written in JavaScript.