How does one write a story for a story-based videogame. Is it done in the form of a screenplay? Is it written as any normal prose? Is it written as documentation that goes with the other early design documents? An outline as guidance until it can be implemented into the actual game itself? Is there an industry standard approach? Are there multiple options?
A lot of this depends on what kind of game you are creating. For example there is software that is specifically designed to help you with non-linear story design. See my answer to the question " Writing Beta Any software for video game non-linear story design?" for more details, but basically you will want to have a look at articy:draft from Nevigo. The software is quite expensive though, but it has a trial period so you could give it a try and see if it fits what you are looking for.
I also posted a question about "Are there tools that can aid an author in writing a branching storyline?" and Memor-X answered that you could use a flowchart software like yEd.
If you have a big world planned for your game you could also use a wiki. That was my answer to the question " Writing Beta What software/techniques do people use to gather ideas?". A wiki is useful to share your ideas and to keep it interlinked, which is quite hard to do in simple Word documents or similar writing software.
You also mentioned that it could be part of the early design documents. I looked up quite a lot about the process of writing in the creation of videogames for the question "How do you do “beta reading” for a game before the game is ready?", which lead me to the conclusion that you would write drafts first, but evolve the documentation throughout the process of actually creating the game. This means that you need an efficient way of communicating the current status of your game and the world you are creating to everyone involved in the creation.
You could also have a look at something that is designed for a specific genre, such as World Anvil. It's basically a wiki desinged for people creating or running RPGs. It's free for the basics and there is a monthly model if you want to have some more features, for example for making things look fancier or sharing it with people that will have read access or write access. The basic version is completely public, so be aware of that when planning to use the tool.
As an update 1,5 months after writing this answer: I've started using the tool myself and find it very useful. There is a lot of hints and tips that will make you think more about the thing you are creating. It's always the same, but a very nice start. The access model can be a bit weird at the beginning, but overall I am very satisfied. Apart from being a user of the site I am not affiliated with them in any way. I just recommend that you check out the basic version if you are interested in creating a game or any other world. Those guys have some really nice ideas for people starting out with creating their own world and there are lots of video tutorials on YouTube that you can check out to get more information about how to use the tool and why they chose to implement the things they implemented. Here is one random example from their channel: Creating Buildings for your World - WorldAnvil Series
Twine can help you, too. It's an open-source software for creating and sharing interactive nonlinear story games, so if you want to create that kind of game you can directly do it with this tool. Or you can use it to see what people think about your ideas and how a game with decisions could roughly play out sotrywise.
All in all: if you are writing a game yourself only for your own entertainment a couple of simple Word documents might suffice. But if you've ever worked in a bigger team you know that you need some king of revision history to look up who changes something to what and why. Like clicking on the "Edited X hours ago" link on StackExchange to see who changed answers and question and see their comment (if they've left one...) about their reasons for changing it. There is no single approach and no single best software to help you.
You can find software that will help you with certain things, but first of all you need to define:
- What kind of game you are creating.
- How many people will be involved.
- How important it is to go back to a previous state.
- How you want to communicate changes.
- Who will need to read the story beforehand (Only writers? Programmers? Customers? ...).
- Whether or not you need to design it in a way that you can show to other people outside the project.
Most of this information comes from personal research regarding videogame creation and hobby work in the field.