Sure! Here's a sample of a simple game that meets your requirements. Please note that due to the limitations of this text-based platform, I can only provide you with the code. You can copy and paste this code into an HTML file and run it in your browser to play the game:
In this game, you play as a human emoji represented by
😀. The boss is a red emoji represented by
👹. To attack the boss, press the spacebar. The boss starts with a health of 5, and each successful hit reduces the boss's health. The current boss health is displayed at the top. Once the boss's health reaches 0, an alert will be shown indicating that you have defeated the boss and the game is over.
To play the game, you can copy the above code into a new HTML file and open it in a web browser. Use the arrow keys (left, right, up) to move the player emoji and press the spacebar to attack the boss.