Sure! Here's an example of a simple shooting game implemented as a single HTML file:
This code sets up a simple shooting game where the player can move horizontally and shoot bullets using the spacebar. The goal is to hit the enemy square with the bullets and earn points. The game loop updates the positions of the player, bullet, and enemy each frame and checks for collisions. The score is updated and displayed on the canvas.