Sure! Here's an example of a simple platform shooter game implemented in a single HTML file with JavaScript:
This code sets up a canvas for the game, initializes game variables, handles user inputs, updates game logic, and draws the game elements on the screen. The player can move left and right using the arrow keys, shoot bullets using the space key, and collide with enemies. The game loops at a speed of 60 frames per second using the `setInterval` function. The score is displayed on the screen.