Sure! Below is an example of a simple text-based survival game implemented as a single HTML file using JavaScript. The game allows the player to make decisions to survive and offers upgrade options at certain milestones.
In this simple survival game, the player is prompted to choose from a set of actions: "gather", "hunt", "eat", or "upgrade". Their choices affect their health, food supply, and chances of survival. The game ends when the player's health reaches zero.