Sure! Here's a simple platformer game with enemies and a boss implemented as a single HTML file using JavaScript:
To play the game, simply copy and paste the code into a new HTML file and open it in a web browser. The player (represented by a red rectangle) can move left and right using the arrow keys, and jump by pressing the spacebar. The goal is to avoid colliding with the enemies (green rectangles) and defeat the boss (blue rectangle) by colliding with it. Additional game logic such as tracking scores, lives, and winning conditions can be implemented as per your requirements.