Sure, below is an example of a simple 2D racing game implemented as a single HTML file using JavaScript:
This code sets up a simple 2D racing game where the player controls a car using arrow keys to avoid obstacles moving from top to bottom. The game ends when the car collides with an obstacle. You can replace the `emozi_all/game.png` and `emozi_apple.png` with your own pictograms for the car and obstacle.
Please note that this is a basic example and can be further enhanced and customized according to your requirements.