Here is an example of a simple game using JavaScript enclosed in script tags in a single HTML file:
This example creates a simple game where the player automatically moves and shoots random color enemies. The player moves horizontally and shoots automatically. The enemies move down the screen and respawn at the top with random colors when they reach the bottom. The game loop is handled with `requestAnimationFrame` for smooth animation. The game is started by calling the `init` function at the end of the script.