Here's a simple text-based game inspired by No Man's Sky, implemented as a single HTML file with JavaScript enclosed in script tags.
No Man's Sky Game
In this game, the player starts on Earth and can explore different planets randomly. By clicking the "Explore" button, the player visits a new planet and adds it to their inventory if it hasn't been discovered before. The "Inventory" button displays the planets the player has discovered so far.
Please note that this is a simplified example and doesn't encompass the extensive gameplay of No Man's Sky. It's a basic concept to demonstrate the implementation of a game using JavaScript in HTML.