Here is an example of a simple shooting game implemented as a single HTML file with JavaScript:
This code sets up a simple shooting game where the player can move left and right and shoot bullets by pressing the spacebar. The bullet travels upwards towards the top of the canvas. The player is represented by a rectangle and the bullet is represented by a smaller rectangle. The game will update and render the player and bullet continuously using the `requestAnimationFrame` function.