Sure! Here's an example of a simple 2D superhero game implemented as a single HTML file using JavaScript. Note that this is just a basic implementation and can be expanded upon to add more features and complexity.
In this game, you control a superhero represented by the player object. The game randomly generates an enemy with different stats and powers. If you defeat the enemy, its powers are added to your own. The player's stats are displayed on the canvas, and the enemy's power is displayed near its position.
Please note that this is a very basic implementation of the game and can be expanded upon and improved with more advanced gameplay mechanics, visuals, and interactions.