Sure, here's an example of a simple sniper shooting game implemented as a single HTML file using JavaScript:
This game sets up a canvas where a sniper and a target are displayed. The player can aim by moving the sniper's position horizontally. The player then shoots by clicking on the canvas, and a bullet moves towards the target. If the bullet hits the target, an alert is shown indicating success. If the bullet misses or goes out-of-bounds, an alert is shown indicating failure. The game then resets, randomizing the target's position for the next round.
Please note that this is a very basic implementation. To enhance the game, you can add more features, such as levels, scoring, wind effect on bullet trajectory, and better graphics.