Sure, here's an example of a simple game implemented as a single HTML file using JavaScript and enclosed in script tags:
In this game, you control a yellow emoji character and your goal is to avoid getting caught by a red enemy emoji. Use the arrow keys to move the player emoji around the canvas. If the player emoji collides with the enemy emoji, a game over message will be displayed.