Sure, here's a basic shooting game implemented as a single HTML file using JavaScript:
This is a basic shooting game where you control Xavier (represented by a blue rectangle) using your mouse. Clicking on the canvas fires bullets (represented by red rectangles) to destroy incoming enemies (represented by green rectangles). Your goal is to survive as long as possible without getting hit by the enemies. The score increases every time an enemy is destroyed. When the game ends, an alert will display your final score and the page will reload to start a new game.